Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

GEdit/Text Files

  Date: Nov 26    Category: Unix / Linux / Ubuntu    Views: 410
  

Is there any way to cirumvent the popup you get when you
double click a text file to select "Run in Terminal" or "Display"?
The files have a .txt extension and .txt is associated with GEdit.
I work with a ton of text files and it gets annoying to poke the
"Display" button every time I open a file.

Share: 

 

3 Answers Found

 
Answer #1    Answered On: Nov 26    

Right click the file name, choose Properties, go on to Permissions, and
make sure Execute is NOT checked.

The dialog is a security thing, to make sure you don't accidentally run
something that is declared as Executable without being sure it's not
harmful. If you uncheck "Allow executing as a program" in the way I
described, the problem doesn't exist.

If you have any (trusted!) script files you'll want them left as executable.

Not sure if you can do this en bloque, I have a lot of text files with
this flag set inappropriately, but I can't be bothered to go and set
them all right. I guess chmod on the command line would do it, but I
can't remember the correct numeric code offhand that you'd need.

 
Answer #2    Answered On: Nov 26    

Linux does not need extensions for the most part. It knows that it is a text
file by looking at the contents. The problem is that scripts are text files
and Linux relies on them heavily. In KDE, text files open in Kate, a text
editor, when you click on them. You have to change the permissions in order
to have them execute. This is the opposite of GNOME which wants to run the
script first. So, you could give KDE a try.

 
Answer #3    Answered On: Nov 26    

Another problem regarding text files wanting to run is if this file
was originally created in a Windows environment - by default *all*
Windows files are executable and this permission is picked up by a
Linux OS, which then looks at the contents and doesn't see anything
that would identify the text as something that would run so asks what
it should do. Plain text files created in Linux aren't executable
unless the user wants that to be the case, as in a script file.

 
Didn't find what you were looking for? Find more on GEdit/Text Files Or get search suggestion and latest updates.




Tagged: