Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 01-02-2019, 05:53 AM   #1
LQ Newbie
Registered: Mar 2017
Posts: 14

Rep: Reputation: Disabled
Text files not opening normally


I have quite freshly installed Debian 9 with Mate de.

Text-files i've copied from my old system to the new one
are not behaving correctly.

if i'm trying to double-click open text-file, i get dialog:

Do you want to run "NAME OF FILE", or display its contents?
"NAME OF FILE" is an executable text file.
Why it doesn't open just by double-click? I need to press Display button.

New files i generate through Pluma are working normally.

How to fix?
Old 01-02-2019, 06:07 AM   #2
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 397

Rep: Reputation: 169Reputation: 169
Originally Posted by Tagiga View Post
"NAME OF FILE" is an executable text file.
Your copy seems to have switched-on the x (executable) bits on your text files so now the file manager thinks it might be scripts, to be run, instead of text files, to be shown.
Do an "chmod a-x" on all files which are NOT scripts or (compiled) executables (and do NOT do this on directories, they need the x).

This often happens when you copy files from/to a FAT-type file-system, like most memory sticks use, as that fs doesn't have the concept of "executable permission" so unless you got your mount options exactly right everything comes OFF the fs with all x-bits set (so that directories and "real executables" do not loose them).

I mostly mount vfat sticks with the fmask=0133 option so that NO files at all will be executable (but then - of course - would have to restore the x-bits on file I copied that do need them).
But on FAT and (I believe) NTFS executable bits is a all or nothing thing, either all files are executable or none at all.

Last edited by ehartman; 01-02-2019 at 06:08 AM.
Old 01-02-2019, 06:07 AM   #3
Senior Member
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,838

Rep: Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196
My first guess, and it is a guess because you have not included NEARLY enough information, is that in copying the files from the older system you changed the permissions. The ownership may also need to be adjusted.

Check the permissions on the files, and turn off the x=executable flag(s). With the exception of shell command (batch) files, text files should NOT be executable.
Old 01-02-2019, 06:25 AM   #4
LQ Newbie
Registered: Mar 2017
Posts: 14

Original Poster
Rep: Reputation: Disabled
Ok, thanks for both of you, i think dilemma solved.

Sorry, if provided information was lacking, not very
advanced user yet!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
where are text tools normally applied to? sigint-ninja Linux - Newbie 4 06-04-2015 04:48 AM
hot can make a text browser compatible mior of a sit that isnt normally compatible markyg852 Programming 2 04-14-2009 09:22 AM
real time signals work under gdb, not when run normally?? lel4866 Linux - Networking 10 07-07-2008 01:31 PM
Shell not displaying normally. tehkaao Linux - Software 4 01-10-2008 06:54 AM
Which directory contains files that normally change their size frequently? Simon Adebisi Linux - Software 4 06-28-2005 03:37 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration