You get a list of applications when you try the Open With option to open a certain type of file. If you try to associate a new application to open a certain type of file, you are shown a list of applications. The list of applications shown is the list of
.desktop files in the
Programs written by you or shared by a friend or compiled from source may not install their
.desktop file in the
/usr/share/applications directory. It takes a bit of work to get such a program added to the Open With list in Ubuntu. This post shows the details of how to achieve this. I use a method that is a bit easier.
First we need to create a
.desktop file for your program. I find that the easiest way to do this is using the
alacarte application. Installing and using alacarte is easy. Create a New Item using the name of your program. This creates a file of the name
Copy the above file somewhere and find the
Exec section in the file. For example, this section might be:
%F parameter to it:
This enables the
.desktop file to be used to open a file using this program.
$ sudo cp alacarte-made.desktop /usr/share/applications
Your program should now appear in the list of Open With applications.
Tried with: Ubuntu 14.04