How do I add a custom launcher?

You can add a custom launcher in Ubuntu 11.10 by typing this in a Terminal

gnome-desktop-item-edit ~/Desktop/ --create-new

Once you have customized the item on your Desktop, drag it to the Launcher.


First thing I'd do is navigate to /usr/local/share/applications & see if there is a geany.desktop

If so then just drag onto the launcher.

If not then would just a minute or so to set up. Your source has a 'geany.desktop.in', remove the .in & it's a perfectly good geany.desktop

Edit: the geany.desktop.in is a good template for your .desktop but needs some minor editing before copying or after. Lines 4,5,6 start with a _ that should be removed.

Ex. of edited geany.desktop (or edited geany.desktop.in

[Desktop Entry]
Type=Application
Version=1.0
Name=Geany
GenericName=Integrated Development Environment
Comment=A fast and lightweight IDE using GTK2
Exec=geany %F
Icon=geany
Terminal=false
Categories=GTK;Development;IDE;
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
StartupNotify=true

The source also has some geany icons in it, take the geany.png from geany-0.21/icons/48x48 & put somewhere like Pictures or Documents Then copy the geany.desktop.in file sitting in the source folder to ~/.local/share/applications/geany.desktop

Ex. - if it was in Downloads/geany-0.21

cp Downloads/geany-0.21/geany.desktop.in  ~/.local/share/applications/geany.desktop

Then just go there,

nautilus ~/.local/share/applications

right click on geany .desktop > properties > click on the icon area & browse to your geany.png > open

Finally drag geany.desktop onto your launcher

Edit: one advantage you'll see with a more 'proper' .desktop is it has a MimeTypes= line. Open up the .desktop in a text editor & take a look.

You can, if you want, now drag & drop any of those mimetypes on to the geany icon in your launcher & they'll open up in geany


In Ubuntu 12.04 none of the above options worked for me when needing to create a launcher for a locally compiled app. This might be an app you created yourself or something you downloaded from source and then had to locally run make install. I ended up needing a hybrid of tips found in this thread. Using Angry Birds as a hypothetical example, I did the following:

  1. Create an angry-birds-launcher.desktop file and save it to the /usr/share/applications directory. You can do this in a single command with sudo gedit /usr/share/applications/xyz.desktop. The actual file name is not important so long as it ends in .desktop
  2. Gedit will open with a blank page. In gedit, input the following text:

    [Desktop Entry]
    Type=Application
    Name=[Name of your app, for example Angry Birds. This can be free text.]
    Exec=[full path to your executable and executable name, for example /usr/local/bin/angry-birds]
    Icon=[full path to your executable's icon and icon name, for example /usr/local/share/icons/apps/angry-birds.png]
    Terminal=false
    StartupNotify=true
  3. Double check for typos and save the file.

  4. Open Nautilus and browse to /usr/share/applications and you should see in the list of apps your app with the correct icon.
  5. Double click to launch the app. A temporary icon will appear in the panel. Because you launched an app from the 'official' directory (usr/share/applications), Ubuntu will finally display the menu option to lock the launcher into the panel.
  6. Mouse over the launcher in the panel, right click and select Lock into Launcher. You should be all set at that point.

Tags:

Launcher

Unity