Why do you ask me if I want to run TXT as executalbes???

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
winxpwasgreat
Level 3
Level 3
Posts: 111
Joined: Mon Mar 12, 2018 3:36 am

Why do you ask me if I want to run TXT as executalbes???

Post by winxpwasgreat »

Just installed Cinnamon 18.3.

Already pisses me off.
Every time I double-click on a .txt file, it says:

Do you want to run "textfile", or display its contents?
textfile.txt is an executable text file


Why would it ask me such a dumb question?
How can I turn this nonsense off for good?

Also Update Manager takes AGES to download stuff. I am in China, changed the repositories lists to the Chinese ones but still bad. Any way to fix that?

User avatar
Moem
Level 20
Level 20
Posts: 10694
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Why do you ask me if I want to run TXT as executalbes???

Post by Moem »

Because it's possible and a thing that you might want to do.
Doesn't take much to annoy you, does it?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

winxpwasgreat
Level 3
Level 3
Posts: 111
Joined: Mon Mar 12, 2018 3:36 am

Re: Why do you ask me if I want to run TXT as executalbes???

Post by winxpwasgreat »

In terms of likelihood of that happening, it just isn't worth it to annoy the 99.9% of users who just want to open a text file as.. a text file.

The sheer lack of common sense of whoever made linux open that dialog every time I double-click on any .txt - yes, it does rustle my jimmies.
Makes me think that it's angry users like me who should do the testing, not whichever autistic nerd gave the tick of approval to such nonsense before the release.

tgwilt
Level 2
Level 2
Posts: 88
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Re: Why do you ask me if I want to run TXT as executalbes???

Post by tgwilt »

While that was a non-issue for me, I fixed it by opening Preferred Applications (it's in the menu) and was able to choose text editor as the preferred application for .txt files. I've found that it is easier and less stressful to look for solutions than to get annoyed with problems. This is true in life, as well as with Linux.

all41
Level 15
Level 15
Posts: 5942
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Why do you ask me if I want to run TXT as executalbes???

Post by all41 »

Try this:
Right click on that file and choose "Properties"
Then under the "Permissions" tab check to see if the box allowing
the file to be executable is ticked.

If the text is not a script that box should not be ticked.

Then the file should open with a text editor if that is the default application set under the "Open with" tab.

winxpwasgreat
Level 3
Level 3
Posts: 111
Joined: Mon Mar 12, 2018 3:36 am

Re: Why do you ask me if I want to run TXT as executalbes???

Post by winxpwasgreat »

tgwilt wrote:
Thu Jun 14, 2018 12:16 pm
While that was a non-issue for me, I fixed it by opening Preferred Applications (it's in the menu) and was able to choose text editor as the preferred application for .txt files.
If you talk about Default Applications, that is already set to Text Editor. Yet I get the annoying dialog boxes with any .txt file I open.
all41 wrote:
Thu Jun 14, 2018 12:22 pm
Try this:
Right click on that file and choose "Properties"
Then under the "Permissions" tab check to see if the box allowing
the file to be executable is ticked.

If the text is not a script that box should not be ticked.

Then the file should open with a text editor if that is the default application set under the "Open with" tab.
This worked, however do I need to do it with EVERY .txt file in my computer? Can't I just set the whole thing so that it never asks me again that question?


Every single .txt I open, I get asked that question.
Is this normal for a fresh Cinnamon 18.3 installation or not??

all41
Level 15
Level 15
Posts: 5942
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Why do you ask me if I want to run TXT as executalbes???

Post by all41 »

Text files are not made executable by default.
Perhaps you copied this text from another source where it was executable

Check out your File manager's Edit/Preferences/Behaviour tab for executable file options.

winxpwasgreat
Level 3
Level 3
Posts: 111
Joined: Mon Mar 12, 2018 3:36 am

Re: Why do you ask me if I want to run TXT as executalbes???

Post by winxpwasgreat »

all41 wrote:
Thu Jun 14, 2018 12:46 pm
Text files are not made executable by default.
Perhaps you copied this text from another source where it was executable
Last thing I did was backing up all my files from my old xfce 18.3 build residing on my old HDD faulty hard drive. I copied everything on my external hd.

Now all my .txt files have this issue: when I open them, it asks me if I want to run them as exe instead.

User avatar
Moem
Level 20
Level 20
Posts: 10694
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Why do you ask me if I want to run TXT as executalbes???

Post by Moem »

winxpwasgreat wrote:
Thu Jun 14, 2018 12:43 pm
Every single .txt I open, I get asked that question.
Is this normal for a fresh Cinnamon 18.3 installation or not??
It's not. Mine doesn't do that and never did. If I want to run a text file as executable I need to rightclick it and choose that option.
Makes me think that it's angry users like me who should do the testing
That sounds like a plan, as long as you don't take your anger out on the devs, it would not make working with you very attractive. It's not very attractive to help angry people here on the forum, either. Just a hint.

PS. Some of my best friends are autistic nerds. And I'm pretty sure some of your friendly fellow forum users here are, too.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

winxpwasgreat
Level 3
Level 3
Posts: 111
Joined: Mon Mar 12, 2018 3:36 am

Re: Why do you ask me if I want to run TXT as executalbes???

Post by winxpwasgreat »

Moem wrote:
Thu Jun 14, 2018 12:49 pm
winxpwasgreat wrote:
Thu Jun 14, 2018 12:43 pm
Every single .txt I open, I get asked that question.
Is this normal for a fresh Cinnamon 18.3 installation or not??
It's not. Mine doesn't do that and never did. If I want to run a text file as executable I need to rightclick it and choose that option.
There you go, this explains the mystery.
However scanning them through virustotal it looks like they are all clean, which would exclude the hypothesis of a virus.
I wonder what happened. But I remember in its last days the computer would at times randomly lock all my files. Perhaps after I started the mass-copy, it decided to lock everything and the locked txts were saved on the external hd as executable txts for some reason?

User avatar
MintBean
Level 9
Level 9
Posts: 2967
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: Why do you ask me if I want to run TXT as executalbes???

Post by MintBean »

The behaviour is perfectly reasonable. The real question is why all your text files are marked as executable in the first place.

rene
Level 14
Level 14
Posts: 5257
Joined: Sun Mar 27, 2016 6:58 pm

Re: Why do you ask me if I want to run TXT as executalbes???

Post by rene »

Moem wrote:
Thu Jun 14, 2018 12:49 pm
PS. Some of my best friends are autistic nerds. And I'm pretty sure some of your friendly fellow forum users here are, too.
Hey... !

Anyways, to OP, the issue is that on UNIX systems not an extension but the executable bit being set on a file decides whether or not it is executable. When you backed up stuff you very likely did so to an NTFS or other non-UNIX filesystem type; a type not allowing for said executable bit. So as to not by default flat-out disallow executing binaries from such a filesystem, Linux (again, by default; you can change it) pretends that ANY file on it is executable; depends on the user to know which is which, what is what.

In your case this was not a good idea: when you restored your files said pretended executable bits got "restored" right alongside: all the restored files now explicitly claim to be executable, including those which originally weren't and should not be. Cinnamon is in fact agreeing with you: although a UNIX-only user would bark at it it is not taking the executable bit on your text files as being gospel: expects that, indeed, you may not in fact want to run your text files but instead display their content even though the files themselves explicitly say they're executable.

The solution, then, is to unmark as executable all files which should not be, and to not in the future mark any such. I feel it debatable whether or not non-native filesystems should by default pretend all files executable (and I personally mount any NTFS partition I have disabling that) but that's it: that run dialog is actually being helpful to you: rather then simply execute the file as a UNIX user would expect, it presents you a choice.

It is not any Linux system's responsibility to adhere to non-UNIX behaviour such as use of filesystems without support for the executable bit: that is all yours, and yours alone.

all41
Level 15
Level 15
Posts: 5942
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Why do you ask me if I want to run TXT as executalbes???

Post by all41 »

You can change the executable attributes for an entire directory of files en masse using the terminal's chmod -R funtion.
See terminal instructions chmod --help, and the manual by entering man chmod

tgwilt
Level 2
Level 2
Posts: 88
Joined: Fri Jun 08, 2018 2:26 am
Location: Florida, USA

Re: Why do you ask me if I want to run TXT as executalbes???

Post by tgwilt »

all41 wrote:
Thu Jun 14, 2018 12:22 pm
Try this:
Right click on that file and choose "Properties"
Then under the "Permissions" tab check to see if the box allowing
the file to be executable is ticked.

If the text is not a script that box should not be ticked.
Good call!! I'd forgotten about shell script and the like. I like using the terminal, and ls -l {FILENAME} would have jogged my memory. Nothing like the smell of chmod in the morning~

Then the file should open with a text editor if that is the default application set under the "Open with" tab.
Last edited by Moem on Thu Jun 14, 2018 5:13 pm, edited 1 time in total.
Reason: Fixed the quotes; please don't type new text inside the quote tags, it gets confusing.

Mister Goldiloxx
Level 1
Level 1
Posts: 1
Joined: Sun Apr 28, 2019 3:41 pm

Re: Why do you ask me if I want to run TXT as executalbes???

Post by Mister Goldiloxx »

This problem started when I upgraded, in several steps, from Mint 17.3 to 19.1. I'm the only one using this computer, and my text files are NOT executable. They are self-created, usually for items I am selling on eBay. No security threat there! I solved this same problem by going to Nemo > Edit > Preferences > Behavior > Executable Text Files, and changing from 'Ask Each Time' to 'View Executable text files when they are opened'. Now when I double click a .txt it opens in Geany just as it did under 17.3!

Post Reply

Return to “Newbie Questions”