Page 1 of 1

Solved: .txt files - prompt - bug?

Posted: 17 Mar 2021, 04:58
by Ed_P
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?

.txt files - prompt - bug?

Posted: 17 Mar 2021, 07:13
by ncmprhnsbl
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..

.txt files - prompt - bug?

Posted: 17 Mar 2021, 15:05
by Ed_P
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: