1

A few days ago I decided to activate the option to run scripts in Nautilus by double clicking on it. But I also edit some a lot so whenever I want to edit them, I have to right click them, hover my mouse on the "Open With" menu and select an application there to edit the script with.

However, I'd like to edit them with GEdit. GEdit however, is not in the list of available applications to open with. So, to edit my scripts with GEdit, I click on "Another Application" and select GEdit.

But here is the thing. GEdit is not saved by default as an option in the submenu with the list of available applications to open the script with. It only shows LibreOffice, MonoDevelop and Notepad (Wine's version). But each time I want to edit a script, I have to click "Another Application" and select GEdit from there. Which isn't entirely practical if you know what I mean. So my question is, how can I "fix" this?

Thanks in advance! TBJ

0

In file /usr/share/applications/gedit.desktop change as sudo

Exec=gedit %U
to
Exec=gedit %F

and
MimeType=text/plain;
to
MimeType=text;

The different MimeTypes are explained here : http://www.iana.org/assignments/media-types/media-types.xhtml#text

Hope it works.

  • Unfortunately, it doesn't. It still won't show up in that sub-menu. – TheBoneJarmer Oct 19 '15 at 10:03
0

Open up the defaults.list file with gedit ~/.local/share/applications/defaults.list and look for the [Default Applications] entry. If it doesn't exist, add it.

Now add the following

text/*=gedit.desktop

Save the file and run pkill nautilus.

  • This didn't work for me because the file "defaults.list" did not exist in that folder. So I made that file myself but adding that data didn't make a difference. – TheBoneJarmer Oct 19 '15 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.