Adding menu items to GNOME menu or Unity

fedora, gnome, linux, ubuntu, ubuntu-unity

Solution

I've found my silly mistake :) I forgot to give executable privileges to the desktop file. So after you give executable privileges to the desktop file by the command

chmod +x <desktop file path>

place it in

/usr/share/applications  /* So the menu option is available to all the user */

or

~/.local/share/applications  /* In this case the menu option is available only to that particular user*/

after you apply the executable permission, the desktop file will take the name and icon specified by you, in the `.desktop` file.

Problem

I want to add a menu item of my application to the GNOME menu. I had created a desktop file for it and placed it in `/usr/share/applications`, but the menu item is not appearing in the GNOME menu. Below is my desktop file which I created in the name of `Aces.desktop`... ``` [Desktop Entry] Encoding=UTF-8 Version 1.0 Name=Aces Comment=Compile and Execute C programs Categories=GNOME;Application;Development; Exec=/usr/share/Aces/Aces Icon=/usr/share/Aces/icon.png Terminal=false Type=Application StartupNotify=true ``` After placing it in `/usr/share/applications`, I tried restarting the PC and still it did not work. Any kind of help is appreciatable... :)

Original source