Create a custom launcher for Unity in Ubuntu 11.04

I have a few applications that I have installed without going through the Ubuntu repositories. One such application is RubyMine, which is not necessarily “installed” as such – it’s just a Java program that is downloaded.

What I did pre-Natty was create a new menu item, which Gnome-Do would find. Easy.

However, I now use Natty and Unity, and it’s not immediately obvious how you go about adding a new application launcher into the dash. After some digging around, it’s actually quite simple…

1. Create a .desktop file

Create a desktop launcher (or shortcut) for your application.

touch rubymine.desktop

For RubyMine, mine looks like this:

[Desktop Entry]

2. Move the .desktop file to the right location

Now we just need to move the file and make sure we have the right permissions and owner. Assuming you’re in the folder containing your .desktop file:

sudo mv rubymine.desktop /usr/share/applications
cd /usr/share/applications
sudo chmod 644 rubymine.desktop
sudo chown root:root rubymine.desktop

3. You’re done!

Open the Unity dash, and under Applications you should find your application launcher. If you can’t see it, search for it and it will show up.


9 thoughts on “Create a custom launcher for Unity in Ubuntu 11.04

  1. It’s even easier then that. Just right click the desktop and select “Create Launcher”. The old familiar launcher dialog will appear. When you’re done just drag it onto the launcher panel. I did find that if I created the launcher on the desktop, even if I select Keep in launcher, if I then delete the desktop icon, the launcher icon will also disappear. So the solution is to create the “original” launcher icon in an appropriate folder in ~, then drag it to the launcher panel.

    1. That’s the “easiest” way of doing it, yes, but it’s not the “cleanest” way of doing it. I have 5 applications that I do this for, so that would leave me with 5 launcher shortcuts floating around in a folder in ~.

      The way I’ve describe above will not only show the application in your launcher bar on the right, it will also show up as an installed application in Unity.

  2. You can create the launcher using the Right Click on desktop method then open up a terminal and:

    cd ~/Desktop
    chmod 644 (app).desktop (I would also rename to make all lowercase to match format)
    sudo mv (app).desktop /usr/share/applications/

    The /usr/share/applications directory seems to be the magical place where all of the applications are checked to see if they are installed and truly applications. From there, search the applications and drag the icon to the quick launcher. Very useful tip. Thanks so much for this info.

  3. You can also copy the *.desktop files to ~/.local/share/applications. This way Unity will find them but they won’t be visible for other users. Also, they won’t be cluttering your desktop.

  4. Excellent! Just installed Wunderlist for Linux on Ubuntu and after creating a Launcher on the desktop, changing it’s icon and pinning it to the unity bar after launching, the icon would show the standard “spring” instead of the icon I set, and of course, the application wasn’t showing in the Applications area.

    Now it’s all fully integrated! Thanks!

  5. Thanks for the nice tip. I figured out that you can add one more entry into the .desktop file to make it show under the right category(s). By adding “Categories=Development”, the launcher will show up under programming.

    Look for other .desktop entries in /usr/share/applications to know more about the right category

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s