24

I have created a custom application entry in the applications menu for Eclipse as follows in a file /usr/share/applications/eclipse.desktop as follows

[Desktop Entry]
Version=1.0
Name=Eclipse   
Exec=/usr/local/eclipse/eclipse
Terminal=false
Type=Application
StartupNotify=true
Categories=X-Red-Hat-Extra;Application;Development;
X-Desktop-File-Install-Version=0.15
Icon=/usr/local/eclipse/icon.xpm

This now appears fine in the Programming section of the Applications menu.

How can I add it to the Favorites section?

0

2 Answers 2

23

No need to edit files.

Sometimes you can't just add the application's launcher to the activity menu because it isn't recognized as an activity.

go to the folder containing the .desktop file you wish to add to the favorites bar and open the terminal there. run the command sudo mv path/to/file/name.desktop /usr/share/applications

after that you should be able to view the launcher in the activities list and easily add it to the favorite menu :)

5
  • As an alternative in Debian you may need to click on the 'show applications'/launcher, and then right click the application there, to add it to the favorites bar
    – n00b
    Apr 18, 2017 at 18:17
  • 1
    Thanks for mentioning 'activities list ' - That was the most convoluted way to add a shortcut - boy oh boy does Centos have a lot of catching up to do just to be user-friendly!
    – killjoy
    Dec 15, 2017 at 16:40
  • @killjoy This is more of a Gnome thing, not so much Centos (came here with Ubuntu)
    – Josh Morel
    Mar 31, 2018 at 22:11
  • 4
    Alternatively, if this application is only installed for the current user, it would be more appropriate to put the .desktop file in ~/.local/share/applications
    – MDMower
    Jul 24, 2018 at 21:23
  • I have the .desktop file in both /usr/share/applications and also in ~/.local/share/applications but still it does not work May 28, 2021 at 9:30
22

The favourite in Gnome Classic view follows the favourites in the Gnome 3 shell.

Click on Activities in the top-left corner or use your keyboard's Windows button if it has one, to bring up the activities overview. Right-click on one of those activities and Add to Favourites.

It should now be visible in the Gnome Classic Favourite menu.

8
  • Thanks. That worked. I expected that I could add an entry in the .desktop file
    – Vihung
    Dec 4, 2014 at 10:30
  • 2
    Doesn't work for me for own .desktop files (even if installed) - I then get only the window title when right-clicking. Works for all other apps, though.
    – AndiDog
    Oct 28, 2015 at 8:36
  • 2
    Same for me: How can I add my own .desktop items? I'd like to add a shortcut for Intellij.
    – Gregor
    Dec 22, 2015 at 7:34
  • @AndiDog Just a note in case you haven't found the solution yet: gnome seems to require the .desktop file to be named exactly the same as the started application: unix.stackexchange.com/a/59654/19705
    – codeling
    Jun 4, 2017 at 8:54
  • You need to add the StartupWMClass to the eclipse.desktop file.
    – BuZZ-dEE
    Sep 7, 2017 at 9:17

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