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.

up vote 100 down vote accepted

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:

  • 6
    Thanks. The only problem I ran into, which the docs don't mention, is that the file has to be executable if you place it in ~/Desktop. Otherwise it just shows up as an ordinary text file and isn't launchable or rendered with the right icon. – Cerin Mar 12 '12 at 17:35
  • 3
    You might find that you need to restart gnome3 for this to take effect, especially the icon. If so, run Alt+F2, type r in the box, and press enter. – mlissner Nov 18 '15 at 23:33
  • Your application may require a working directory, use Path=/path/to/eclipse/working-dir. – psiphi75 Apr 18 '17 at 4:39

Although 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.

  • 4
    Thanks, I could not believe my eyes that to add a simple entry in my modern Desktop environment, i needed to create a 10-lines text file in a hidden directory in my home folder, by hand. This should be the winning answer. – loteq Jul 6 '17 at 22:45
  • Once you've created a new launcher in the menu, you can search for it in the activities screen and then drag it to your panel. – CodeKid Jul 29 '17 at 16:00
  • @CodeKid Yeah that's what I meant :) – m0skit0 Jul 31 '17 at 8:39

If you want a list of custom launchers you can access from the panel you could use the MyLauncher extension. MyLauncher Gnome Shell Extension

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.