Add Menu Items in Gnome..

The links/short cuts that you see in the Gnome menu are all just simple text files, that also point to an icon.

These text files can be found in /usr/share/applications/.

Before you start making the text file for your own menu link, you need to either find an icon to use that’s already in the pixmaps folder, or make an icon & place it in the pixmaps folder yourself.

The pixmaps folder is the standard folder for holding the icons of programs & can be found at /usr/share/pixmaps/.

Icons need to be 48×48 pixels size wise & in the .png format.

Once you have your icon sorted out, you can start creating your link..

sudo gedit /usr/share/applications/nameofyourprogram.desktop

Make sure that the name of your programs all lower case letters only & you must add .desktop to the end of it..

Example: speedpad.desktop

In the text editor, you’ll need to enter (at the very least) the following lines..

[Desktop Entry]
Encoding=UTF-8 (Type of encoding for the text file)
Name=SpeedPad (Name of the program, as you want it to appear in the menu)
Comment=Configuration tool for Nostromo Speed Pads (Description of program)
Exec=nostromo_config (Start command for the programme)
Icon=usr/share/pixmaps/n50,png (Location of the icon you want to use)
Terminal=false (Change this to true if the program needs to run in a terminal)
Type=Application (Type of program it is)
Categories=Application;Utility; (Part of the menu that you want the link to show up in)

Here’s a copy of the list for you to copy & paste without all the additions..

[Desktop Entry]
Encoding=
Name=
Comment=
Exec=
Icon=
Terminal=
Type=
Categories=

There are other options that you can add, but these are the most basic. Don’t include the brackets or anything in-between them.

When your finished adding your options, save the file.

One of the most important lines in the text file is Categories. This line dictates where on the menu your link will show up.

Here’s a quick list with the basic Gnome menu items for Ubuntu & how the categories relate to them..

APPLICATIONS MENU:

Accessories – Application;Utility;

Games – Application;Game;

Graphics – Application;Graphics;

Internet – Application;Network;

Office – Application;Office;

Sound & video – Application;AudioVideo;

Programming – Application;Development;

System Tools – Application;System;

PLACES MENU:

Seem to be in a different folder?

SYSTEM MENU:

Preferences – Settings;

Administration – Settings;System;

You can add other categories to them too if you like. If the programme that you’re making a link for only works in Gnome, you can add..

GNOME;

If it’s built with the GTK tool kit, you can add..

GTK;

If you want some more examples then go into the /usr/share/applications/ folder, copy some of the pre-made links to your desktop & open them up with the text editor. It won’t take you long to figure out what options you need.

This is only a quick run through of the basics to editing the Gnome menu, but it should allow you to create your own menu links without having to install a dedicated menu editor 🙂

Advertisements

13 thoughts on “Add Menu Items in Gnome..

  1. Pingback: Encrypting/Decrypting with Gnome.. « Ubuntu-FS

  2. Pingback: Add Menu Items in Gnome.. « Ubuntu-FS « Sandeepbhalla's Blog

  3. Pingback: Add Menu Items in Gnome.. | Sandeep Bhalla's Blog

  4. Pingback: How to use the Debian Menu in Ubuntu -The Code Post

  5. Please let me know if you’re looking for a writer for your blog. You have some really great articles and I believe I would be a good asset. If you ever want to take some of the load off, I’d love to write some content
    for your blog in exchange for a link back to mine.

    Please shoot me an email if interested. Many thanks!

  6. I apoligise to anybodys post that’s been deleted by accident but I’ve had a lot of spam on this site recently and anybody with a company name in your email address was removed.
    Glad you enjoy the site 🙂

  7. Hints are hard to give you I’m afraid. It all depends on what you want to write about.
    The best way to get started is just to dig in and follow the basic rules of writing. You will improve and create your own style over time anyway 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s