Sometimes when an application is installed in Ubuntu the shortcuts are not created on the main menu and requires that you manually create the shortcuts for them.
Steps
- Command line statement to execute the application
- The path to the application
- Location of the shortcut on the menu
We will say that we need to create a shortcut for an application called “myApp” and we want to add a shortcut to Applications -> Sound & Video.
First step is to switch to the /usr/share/applications directory where you’ll find all the shortcuts in the menu.
- cd /usr/share/applications
We will create our shortcut.
- sudo nano myapp.desktop
Now we’re going to add the details.
[Desktop Entry]
Name = myapp
Comment = My Application
Exec = /usr/bin/miapp
Icon = /usr/share/miapp/miapp.png
Terminal = false
Type = Application
Categories = Application;AudioVideo;
Name = myapp
Comment = My Application
Exec = /usr/bin/miapp
Icon = /usr/share/miapp/miapp.png
Terminal = false
Type = Application
Categories = Application;AudioVideo;
There are many more parameters you can use, but for this instance we’ll just stick to the basics. You can refer to the other shortcuts to see more options. To finish off save your changes and exit.
The important parameters that you need to have are Exec, Icon, Terminal and Categories.
Exec
This is where you place the path to the application you are creating the shortcut for. Sometimes a complete path is not necessary if the application will launch by simply typing a command.
Icon
This is the path to the icon you want displayed. Many applications come with their own set of icons. This is where you place the path to the icon you would like to reference this application with.
Terminal
Some applications require terminal while others don’t. Type in true if you would like the termial to be launched when the shortcut is initiated, otherwise leave it false.
Categories
This is where you add the menu placement for your shortcut. In our example we wanted to place our shortcut in Applications -> Sound & Video.
To see if it worked, see if you can find your MyApp shortcut under Applications -> Sound & Video.