I started by searching guides. I found this guide but neither of the main methods works anymore in 11.10.
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.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?
You can add a custom launcher in Ubuntu 11.10 by typing this in a Terminal
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
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
Then just go there,
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:
Gedit will open with a blank page. In gedit, input the following text:
Double check for typos and save the file.
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:
Installation
MenuLibre can be installed by running following command in your terminal:
or simply search the Software Center for
menulibre
and install from there.Likewise, to install alacarte run:
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 )
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.
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".
You can follow this tutorial: " Howto create Application launcher and add icon to Unity in Ubuntu 13.04 / 12.10 / 12.04 "
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 typedemacs
because I want a launcher that launches Emacs, but instead runs a script I have that sets up some environment and then executes Emacs:Drag the icon to the 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:
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: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:
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:
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.
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.
An excellent answer (at least for uBuntu 18.04) is the one from J. Austin Rodriguez. From the bash terminal, type
gnome-desktop-item-edit ~/Desktop/ --create-new
and use theCreate Launcher
GUI to define the shortcut.The distinction between
Application
andLocation
in generated.desktop
files should allow you to create shortcuts manually (by copying a template and editing the contents).Application:
Location (or Link):