Skip to content

Instantly share code, notes, and snippets.

@alseambusher
Created January 4, 2013 10:09
Show Gist options
  • Save alseambusher/4451456 to your computer and use it in GitHub Desktop.
Save alseambusher/4451456 to your computer and use it in GitHub Desktop.
To show your application in 'open with' in ubuntu 12.04, make a file called APPLICATION_NAME.desktop in /usr/share/applications and provide necessary commands in it. Here is an example of an application called 'myapp' (say in /usr/bin/myapp ). Say your application is used to view jpeg images (for mimetype). Say your icon exists as /usr/share/ico…
[Desktop Entry]
Name=My App
GenericName=My App
Comment=No comment
Exec=/usr/bin/myapp %U
Terminal=false
Type=Application
StartupNotify=true
MimeType=image/jpeg
Icon=myapp
Categories=GNOME;GTK;Utility;PhotoViewer;
Actions=Window;Document;
[Desktop Action Window]
Name=Open a New Window
Exec=/usr/bin/myapp %U
OnlyShowIn=Unity;
[Desktop Action Document]
Name=Open a New Document
Exec=/usr/bin/myapp %U
OnlyShowIn=Unity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment