Solved: .txt files - prompt - bug?

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Solved: .txt files - prompt - bug?

Post#1 by Ed_P » 17 Mar 2021, 04:58

Double clicking on a .txt file with nemo brings up the "Do you want to run xyz.txt, or display it's contents?" window. Text files are not executable in my world. What needs to be done to get xed to open them automatically when double clicked?
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

.txt files - prompt - bug?

Post#2 by ncmprhnsbl » 17 Mar 2021, 07:13

Ed_P wrote:
17 Mar 2021, 04:58
Text files are not executable in my world.
well, nemo doesn't go by file extensions when it comes to executability(even if there's nothing in it to execute).. it only has the file permission to go by..
do

Code: Select all

ls -l <your_text_file>
see any x's ?
of course, if the file is on(or comes from) a non POSIX filesystem(fat32,ntfs etc) it is executable(rwx-rwx-rwx) by default(with no way to change that on that filesystem)(on POSIX, chmod -x anything that doesn't need it)
in nemos preferences >> Behavior >> Executable Text Files >> choices are: Run -- , View -- , Ask --
if you choose run, anytime you want to open a plain text that's set to executable, nothing will happen.. choose view and if you want to click to run an executable script, you'll view it instead..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

.txt files - prompt - bug?

Post#3 by Ed_P » 17 Mar 2021, 15:05

ncmprhnsbl wrote:
17 Mar 2021, 07:13
well, nemo doesn't go by file extensions when it comes to executability
:(

Code: Select all

ls -l <your_text_file>
see any x's ?
Yes, many. :(

Code: Select all

guest@porteus:~$ ls -l SysSnapshot5.0.txt
-rwxrwxrwx 1 guest users 555 Aug 10  2020 SysSnapshot5.0.txt*
ncmprhnsbl wrote:
17 Mar 2021, 07:13
on POSIX, chmod -x anything that doesn't need it
Perfect. :good:

Code: Select all

guest@porteus:~$ chmod -x SysSnapshot5.0.txt
guest@porteus:~$ ls -l SysSnapshot5.0.txt
-rw-rw-rw- 1 guest users 555 Aug 10  2020 SysSnapshot5.0.txt

Code: Select all

chmod -R -x *.txt
:thumbsup: Thank you. :worship:
Ed

Post Reply