Wednesday, January 9, 2013

How to add a program to Nautilus' 'open with' menu

Nautilus has a limited set of applications which it displays in the "open with" popup. Following should be done to add an application to that list.

In that specific application's .desktop file located in /usr/share/applications, %f flag should be inserted at the end of the executable line (starting with "Exec=").

e.g. /usr/share/applications/jd-gui.desktop
[Desktop Entry]
Encoding=UTF-8
Name=JD-GUI
Comment=JD-GUI Java Decompiler
Exec=/home/dulanja/work/dev/tools/jd-gui/jd-gui %f
Icon=/home/dulanja/work/dev/tools/jd-gui/jd-gui.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true


Ref:
[1]http://ubuntugenius.wordpress.com/2012/06/18/ubuntu-fix-add-program-to-list-of-applications-in-open-with-when-right-clicking-files-in-nautilus/

No comments: