Posts Tagged ‘launcher’

Desktop launcher menu items

27, May 2009

Create a Gnome Desktop launcher for a program that does not create one of it’s own via the command line.

The basic format for a Desktop launcher is;

[Desktop Entry]
Name=Songbird
Comment=Media Player
Exec=/home/user/Songbird/songbird
Icon=/home/user/Icons/songbird.png
Terminal=false
Type=Application
Categories=Application;AudioVideo;

Open a text editor and copy & paste the above text into it, changing the following options;

Name: The name you wants to see in the menu for the program.
Comment: The message the comes up when you fover over the menu item.
Exec: the command that start the program.
Icon: the path to an icon of your choice.
Terminal: leave as false to not open in a [Terminal].
Type: leave as Application.
Categories: listed below;
Internet is Network
Sound & Vision is AudioVideo
Games is Game
Office is Office
Accessories is Utility
Graphics is Graphics
Programming is Development
System Tools is System
System preferences is settings

save it naming it your_name-name_of_program.desktop i.e. martin-songbird.desktop

The first part of the file name can be anything you like but must be there as the file must have the format name-prog_name.desktop. You should now have a desktop icon in you home Directory which you can then click on to open the program. If nothing happens and you need to edit the file the easiest way is to open it from a [terminal] using the following command;

gedit martin-songbird.desktop

or by opening your favorite test editor and then opening the file from it as nautilus cannot open these files and does not display the full file name. You can now move this icon to your Desktop if you wish or add it to your Applications menu using the following command;

xdg-desktop-menu install ./martin-songbird.desktop

Notes: Ubuntu Jaunty Gnome Desktop

Advertisements