Ubuntu – How to edit/create new launcher items in Unity by hand

desktoplauncherunity

Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.

For some programs I use, I have to make custom launchers or .desktop files.

For instance, daily blender builds are generally just folders with an executable.

In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.

Best Answer

For 11.04 and earlier:

Unity does support custom launchers from .desktop files. To create custom launcher from a .desktop file you need to create a *.desktop file for your program.

gedit ~/.local/share/applications/name.desktop

The .desktop file should look something like this:

[Desktop Entry]
Name=the name you want shown
Comment=
Exec=command to run
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

In your file manager open your home folder and navigate to: (You may need to press ctrl+h to show hidden files to see the .gconf directory.)

.gconf-> desktop-> unity-> launcher -> favourites

you'll see a bunch of folders starting with "app-". you need to create a folder for your program. Use the same name.desktop you used in /usr/share/applications. Go into 1 of the folders for something that is already on the dock & copy the xml file and paste that into your new folder. Open it with your text editor and change the name of the *.desktop to your name.desktop.

Open gconf-editor (you can open gconf by running the command gconf-editor in the Terminal) & go to:

desktop-> unity-> launcher -> favorites

Double click the list on the right & add your name.desktop.

Log out & back in and you should see your launcher. (thank you kerry_s on the Ubuntu Forums for helping with this answer)

Unity also has a feature called Lenses. By default, you have two in Unity: Applications and Files. In the future, you will be able to install and create a lot more. There is some info about that on the Ubuntu wiki: https://wiki.ubuntu.com/Unity/Lenses