How do you create a custom application launcher in Gnome Shell?
I have a local Eclipse installation that I'd like to be to quickly launch. So I created a symlink to the eclipse binary and placed it on my desktop. If I open a terminal, cd to ~/Desktop and run ./eclipse it starts Eclipse perfectly. However, if I click the Eclipse icon on my desktop, and choose run, nothing happens.
Alternatively, I wouldn't mind being able to search for Eclipse on the "Activities" screen, but I can't find any documentation on adding or registering custom applications.
6 Answers
Try to create a eclipse.desktop file under /usr/share/applications (or ~/.local/share/applications or directly in ~/Desktop) with the following content:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse IDE
Exec=/path/to/eclipse/executable
Icon=/path/to/eclipse/icon
Type=Application
Categories=Development;You can choose another category, too. For additional information:
3Although creating your own launcher by hand is a valid solution, my preferred one is to go through alacarte and create a new entry on the menus, then it will appear as a launcher.
In newer Gnome versions Comment and Terminal sections become mandatory so minimal .desktop file is now:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Sample Application Name
Comment=A sample application
Exec=application
Icon=application.png
Terminal=false If you want a list of custom launchers you can access from the panel you could use the MyLauncher extension. MyLauncher Gnome Shell Extension
The easiest way I have found to create launchers using a full-featured GUI is vie MenuLibre, which is in the Ubuntu repositories. It will hold your hand through the process and allow you to create a custom launcher in a fast and straightforward manner, as long as you know where your resources reside (binary location, icon location, working directories, etc). Alacarte does not work reliably for me.
If you want proper shortcut, then do following:
- go to /usr/share/applications
- coppy one of the *.desktop files to this location with the name you intend to use as application name;
- adjust the executable path
- adjust the icon path 5! check carefully for all the places in this file where old references are, and edit them to your needs.