0% found this document useful (0 votes)
15 views4 pages

Linux Mint: Disable Executable Text Files

The discussion revolves around an issue where opening .txt files prompts a message asking whether to run or display the file, which some users find unnecessary. It is noted that this occurs with text files marked as executable, and users are advised to change file permissions to resolve the issue. Suggestions include adjusting settings in the Nemo file manager and ensuring that files are not created with the executable bit set by default.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Linux Mint: Disable Executable Text Files

The discussion revolves around an issue where opening .txt files prompts a message asking whether to run or display the file, which some users find unnecessary. It is noted that this occurs with text files marked as executable, and users are advised to change file permissions to resolve the issue. Suggestions include adjusting settings in the Nemo file manager and ensuring that files are not created with the executable bit set by default.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Linux discussion

Jax Surper
If I open any .txt file, I get a message:

Do you want to run "[Link]", or display its contents?

It also says it is an executable text file - something I didn't know existed.


I then have a choice to press either: Run in Terminal - Display - Cancel - Run

Pressing Display lets me see the text, etc.


It seems like an unnecessary step.

It happens even with a newly created .txt file with no content.

Can I stop it from showing this message?


Last edited by LockBot on Fri May 26, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Top
RIH
Level 12
Level 12
Posts: 4048
Joined: Sat Aug 22, 2015 3:47 am
Re: txt files: Run or Display?
Post by RIH » Fri Nov 25, 2022 11:49 pm

You don't say what desktop you are running, infact you give absolutely no information about your
system whatsoever!!
However, if you are using Cinnamon then you control via the File Manager - Nemo.

Open Nemo - Edit - Preferences - Behavior Tab


[Link]
Image
Top
billyswong
Level 9
Level 9
Posts: 2980
Joined: Wed Aug 14, 2019 1:02 am
Re: txt files: Run or Display?
Post by billyswong » Sat Nov 26, 2022 12:49 am

Where do you get the text file? Normal text files don't trigger that dialog. Only text files that are
marked as executable will be asked. Check out and unmark the files by right click the file >
properties > permissions > uncheck "allow executing file as program"
Top
User avatar
lsemmens
Level 12
Level 12
Posts: 4344
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia
Re: txt files: Run or Display?
Post by lsemmens » Sun Nov 27, 2022 2:42 am

billyswong wrote: ⤴Sat Nov 26, 2022 12:49 am


Where do you get the text file? Normal text files don't trigger that dialog. Only text files that are
marked as executable will be asked. Check out and unmark the files by right click the file >
properties > permissions > uncheck "allow executing file as program"
I would love to know how to create a text file (or any other file) without the executable bit set. Just
about everything I create be it a text file. Writer document or Musescore file all have that bit set. It's
a pain to have to go into the properties of each and every file to change it. Yes I can turn off that
option in Nemo, but that is beside the point.
Fully mint Household
Out of my mind - please leave a message
Top
User avatar
MiZoG
Level 13
Level 13
Posts: 4994
Joined: Fri Jan 26, 2018 8:30 pm
Location: Athens, Greece
Re: txt files: Run or Display?
Post by MiZoG » Sun Nov 27, 2022 2:53 am

Default behaviour on a freshly installed Mint is what OP describes: Nemo asks whether to "run or
display" txt files (at least those considered as mime:text/plain). On Nemo, go to Edit --> Preferences
--> Behavior --> Executable text files and change default action.
Top
billyswong
Level 9
Level 9
Posts: 2980
Joined: Wed Aug 14, 2019 1:02 am
Re: txt files: Run or Display?
Post by billyswong » Sun Nov 27, 2022 5:59 am

lsemmens wrote: ⤴Sun Nov 27, 2022 2:42 am


I would love to know how to create a text file (or any other file) without the executable bit set. Just
about everything I create be it a text file. Writer document or Musescore file all have that bit set. It's
a pain to have to go into the properties of each and every file to change it. Yes I can turn off that
option in Nemo, but that is beside the point.
This is... strange. It is not the default behaviour in Linux Mint. Could you open a new user account
and test if it is the same there? And posting complete system info here may also be helpful in
diagnosis.
Last edited by billyswong on Sun Nov 27, 2022 6:10 am, edited 1 time in total.
Top
Toki
Level 2
Level 2
Posts: 50
Joined: Wed Apr 15, 2015 12:12 pm
Re: [SOLVED] txt files: Run or Display?
Post by Toki » Sun Nov 27, 2022 6:01 am
Thanks - easy when you know how.
PS: In future I'll give more info re: desktop version etc.

You might also like