Sunday, October 23, 2011

Adding custom menu entries in Debian/Ubuntu

Some of the applications which we install from third party sources are not indexed in the Applications tab in the GNOME shell.

The problem in such a case is the high chances of forgetting what the application name is! And this happens so often with me, that I am forced to create these entries in the Applications menu.

Here's a simple procedure to do this. Although there's System->Preferences->Main Menu to do this, this one is better for some obvious reasons (you can give your custom icons)

  • The Applications Menu entries reside in the directory /usr/share/applications , and to create a new entry create a .desktop file in this directory
cd /usr/share/applications
sudo nano myapp.desktop

  • The .desktop files have just the information needed to put up an entry in the Applications tab, and to run your app; Here is the sample content of the Qtoctave entry from the file qtoctave.desktop
[Desktop Entry]
Version=1.0
Name=QtOctave
Comment=Graphical Qt frontend for GNU Octave
TryExec=qtoctave
Exec=qtoctave
Icon=qtoctave
Type=Application
Categories=Development;Math;Science;Education;Electronics
  • Make these entries into the myapp.desktop file with relevant modifications like your executable file name in the exec field.
  • After modification of the .desktop file, save and close it. Now, the entry should appear in the categories which you mention.
  • To add your application an icon, crop a 32x32 png image and add it into the default icons directory /usr/share/app-install/icons/,
sudo cp myicon.png /usr/share/app-install/icons/ 

In the Icon field of the .desktop file, provide the file name if the icon resides in the aforementioned default directory, or give the full path of the icon

And there you go, your own custom application entry with a custom icon!

5 comments:

  1. Hi, probably our entry may be off topic but anyways, I have been surfing around your blog and it looks very professional. It’s obvious you know your topic

    and you appear fervent about it. I’m developing a fresh blog plus I’m struggling to make it look good, as well as offer the best quality content. I have

    learned much at your web site and also I anticipate alot more articles and will be coming back soon. Thanks you.







    Custom Application Development Company

    ReplyDelete
  2. Custom applications accomplish the adopting of new company models through the use of innovative technology. Companies can also improve their ability to project into untouched marketplaces by dealing with particular requirements of their prospective customers. What's more, custom application development process makes the company tuned in to different company characteristics.

    Custom Application Development

    ReplyDelete
  3. Local Dubai girls and a plethora of other varieties, from 20 to 40.

    Fresh Escorts

    Verified Escorts

    Arabian Escorts

    ReplyDelete
  4. Our prices are best in the industry which can afford by anyone in need of pleasure. The prices may vary upon the type of services you ask for and you can find them a little high at first but after you spend time with one of our escort you will not regret the money you have spend.
    Bangalore Call Girls

    Bangalore Escort

    Escort Service Bangalore

    Escort Agency Bangalore

    Bangalore Independent Escorts

    ReplyDelete