31

How can I add an application to Applications > Internet in Gnome Desktop running on CentOS 6.4?

Per this old Docs link, it suggests to edit /etc/xdg/menus/applications.menu.

How can I add /home/danny/some/path/myprog/prog (executable) to my Gnome Applications menu?

0

2 Answers 2

35

This is how I did it:

vi /usr/share/applications/newitem.desktop
[Desktop Entry]
Version=1.0
Name=My Program
Exec=/home/danny/some/path/myprog/prog
Terminal=false
Type=Application
StartupNotify=true
Categories=Network;WebBrowser;
X-Desktop-File-Install-Version=0.15

An icon can be added by including Icon=/some/path.

6
  • 14
    Since this is an application in the 'danny' account, you could put it in ~danny/.local/share/applications/newitem.desktop, which will only show up in the 'danny' user's menus.
    – jsbillings
    Apr 1, 2013 at 0:54
  • Is it possible to put run as sudo(root) option ?
    – Gossamer
    Sep 21, 2013 at 9:41
  • 3
    any source or docs that describe what each field means?
    – spy
    Jun 16, 2017 at 1:48
  • If your path contains white spaces, enclose it in quotes.
    – Line
    Apr 29, 2020 at 14:32
  • 1
    @spy for posterity, here's the section of the .desktop file spec listing the recognized desktop entry keys: specifications.freedesktop.org/desktop-entry-spec/… Jan 22, 2021 at 13:01
13

There is another solution by enabling an edit menu option.

You can have this menu by installing the alacarte package with this command (as root):

yum install alacarte

After that, just restart your X server and you can edit your menus with a mouse right click on the toolbar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .