I started by searching guides. I found this guide but neither of the main methods works anymore in 11.10.

  1. The first solution, I have created the desktop file, however the file location given as .gconf-> desktop-> unity-> launcher -> favourites no longer exists. I can get to /home/sayth/.gconf/desktop but there is no longer a unity folder.

  2. The second solution described right-clicking the desktop and creating a launcher. Right-clicking the desktop no longer produces a "create a launcher" option.

I manually installed geany 0.21 as the one in the repo's is outdated. It's installed and working correctly, and is executing from /usr/local/bin/geany.

How can I add it to the launcher?

10 Answers 10

up vote 26 down vote accepted

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

  • I've put a bounty on the original question for 11.10 if you want to make a generic version of this over there so we have them all in one place. – Jorge Castro Nov 13 '11 at 17:33

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.

  • 6
    And because this command is complicated to remember, you can record it in an alias. Edit your ~/.bashrc gedit ~/.bashrc and add this line alias cla='gnome-desktop-item-edit --create-new ~/Desktop' . I choose cla for Create Launcher App, I find it easy to remember. – Boris Nov 13 '11 at 6:50
  • 2
    It requires installing the gnome panel sayth@sayth-TravelMate-5740G:~$ gnome-desktop-item-edit ~/Desktop/ --create-new The program 'gnome-desktop-item-edit' is currently not installed. You can install it by typing: sudo apt-get install gnome-panel – sayth Nov 13 '11 at 7:08
  • @sayth: so after installation of gnome-panel, it works now right ? – Boris Nov 13 '11 at 7:29
  • 1
    I was debating whether to install it. Seems odd to need to install gnome-panel so the unity launcher works – sayth Nov 13 '11 at 8:58
  • This method was very easy! Thanks! – lpanebr Nov 22 '11 at 12:12

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.
  • 1
    This solution worked perfectly for Ubuntu 16.10 – Jonathan Landrum Nov 18 '16 at 14:08

Starting from Ubuntu 15.04, you can achieve this by starting your program and then right clicking on the icon in the dock and then selecting "Lock to Launcher".

I must have read this question dozen times, everytime I install Ubuntu on another computer :)

The easiest way to add a custom launcher is using a GUI tool.

There are at least two I know of:

  • MenuLibre - my new favourite :)
  • Alacarte - the one I used for years, but now has bugs

Installation

MenuLibre can be installed by running following command in your terminal:

sudo apt install menulibre  

or simply search the Software Center for menulibre and install from there.

Likewise, to install alacarte run:

sudo apt install alacarte  

or search the Software Center for alacarte.

You only need one,so make a choice and you will be adding launchers in no time!

Last but not least, here is a picture ( worth at least a thousand words )

enter image description here

Alacarte looks simmilar but is simpler and less advanced.

Now about those bugs I mentioned: Alacarte now has isues with PNG icons, so even though it makes you believe it is adding the icon they don't save and you launchers will be icon-less.

You can follow this tutorial: " Howto create Application launcher and add icon to Unity in Ubuntu 13.04 / 12.10 / 12.04 "

  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – fossfreedom May 16 '13 at 22:14
  • Okay and thank you for the information. – DARDAR SAAD May 16 '13 at 22:30

How to Add custom launcher without installing extra programs

I have verified this as working under Ubuntu 15.10. I do not know about earlier versions. The example below is for adding an Emacs desktop launcher to the desktop, and then changing the Command to execute my own script/program.

Open the Dash by pressing the Windows Key, which on my keyboard, is mapped to the Super_L key (reported by xev program). Once in the Dashboard, type the name of some program. In this example, I typed emacs because I want a launcher that launches Emacs, but instead runs a script I have that sets up some environment and then executes Emacs:

Dash with Emacs

Drag the icon to the desktop:

Drag Emacs icon to desktop

Right mouse click on the icon on the desktop, and then click on Properties (sorry, due to X windows grabbing, I cannot provide a screen-shot of that menu no matter what I tried!). This is what you might see before making modifications:

Emacs launcher Properties before changing

You can now change the Command to whatever you want. In my case I changed it to run-my-emacs.sh, which happens to be in my PATH, which I have previously set up in my startup scripts:

Emacs launcher Properties after changing

Click ESCape key to exit after making changes. Do note the bug in the screenshot above.

Double check that it works by double-clicking the icon on the desktop.

When creating a .desktop file for your launcher you may want to give a path to the application's icon there:

Icon=/full/path/to/icon

In case you just want to change an icon to other than default you can do so by opening the Preferences menu with a right click on the .desktop file. This will show the following dialog:

enter image description here

Click on the icon to open a file selector box to give a new icon path.

Local .desktop files can be found in ~/.local/share/applications/, custom icons may be stored in ~/.icons/.

Only icons from .desktop files having executable permission will be shown.

Disclaimer: This is my original work in the form of a youtube video.

I have done a video on this topic. http://www.youtube.com/watch?v=ncWUFEc3WXY

  • 2
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eliah Kagan Jul 2 '12 at 0:39
  • 1
    Also, this is self-promotion. Be careful self-prompting. This looks good, though, as it has a disclaimer. – hexafraction Aug 16 '12 at 13:44

Using Ubuntu 16.10, I just dragged an existing icon from the luncher panel to the desktop, edited it with a plain text editor and added it back, as suggested by bgoodr. Worked like a charm.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.