txt files executable when they aren't [solved]

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
timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

txt files executable when they aren't [solved]

Post by timbow » Sat Mar 03, 2018 9:03 am

I recently clean reinstalled 18.3 cinnamon 64bit. Didn't have this issue with the previous mint.
I have lots of files in a folder. I gave them a .txt extension since they are just text notes, mainly unimportant logins and passwords to websites. When I try to open one I get the message
Do you want to run foobar.txt or display its contents? foobar.txt is an executable text file.
obv it isn't executable. afaict I could select all my files in nemo and uncheck 'allow executing file as program' which is a pia or I could go to Nemo - Preferences - Behaviour and make nemo stop asking and just open text files. But I don't understand the implications of that - if any, or why it should default to trying to execute a file which can't in a million years be executed. So what's best?
Last edited by timbow on Sat Mar 03, 2018 9:20 am, edited 2 times in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 23959
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: txt files executable when they aren't

Post by xenopeek » Sat Mar 03, 2018 9:08 am

This can happen if those files are not on a Linux filesystem but for example you have them on a Windows (NTFS) filesystem. Could that be the case?
Image

User avatar
Pierre
Level 18
Level 18
Posts: 8685
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: txt files executable when they aren't

Post by Pierre » Sat Mar 03, 2018 9:08 am

that error would indicate that the system doesn't know what a TXT file is,
and so it ask what it should do with that TXT file.

like the windows system you have to tell it what program to use with that TXT file,
and unlike the windows system, the TXT file is not associated with Notepad or Wordpad.
so - you have to give an alternative TXT editor, that is native to a Linux System.
- like Xed or something similar . .
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: txt files executable when they aren't

Post by timbow » Sat Mar 03, 2018 9:14 am

I may have copied the folder to an ntfs drive while I clean installed mint 18.3 and copied it back from there.

User avatar
Pierre
Level 18
Level 18
Posts: 8685
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: txt files executable when they aren't

Post by Pierre » Sat Mar 03, 2018 9:16 am

so, it's probably lost it's file permissions & it's file type, as well.

if you R/click a TXT file - - does it give the option to open with a 'text editor' ?.
or, does it give no option, at all ?.

and what happens, if you use the 'Open with Other Application' ?.
- does that allow you to manually select "text editor" ?.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: txt files executable when they aren't [solved]

Post by timbow » Sat Mar 03, 2018 9:20 am

That was pretty easy!
Thanks

Post Reply

Return to “Newbie Questions”