Ubuntu – Where is “open with…” in Nautilus

11.10mime-typenautilus

In Ubuntu 11.04 I usually edit my *.fig files by clicking on the icons. The application (script) which opened the file was texfig. This script was chosen by "open with…" in nautilus. But now there is no possibilities to choose other applications than the predefined ones appropriate to the mimetype. How can I define a default application (or a self made script) in nautilus for the x-xfig mimetype?

Best Answer

You can create a .desktop file that will be listed on 'Open with other application' tab:

  • Navigate to ~/.local/share/applications
  • Create a file called textfig.desktop with these contents:
[Desktop Entry]
Encoding=UTF-8
Name=Textfig
Comment=Edit fig files using custom textfig script
Exec=<path to your script> %u
Terminal=true
Type=Application
Icon=
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true

After this you will see Textfig in your Open with other application tab, select it and when you double click the file you will be able to open it using your program.

Just adjust the rest of the values a bit more to fit your needs. The %u will tell nautilus to execute it on the currently selected file.

Related Question