Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have manually installed a software to /opt and I wanted to add it to the Applications menu.

Although Ubuntu makes it dead easy to add it to my user's menu, how do I add it system wide, so that all users will see the application in their menu?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You can create the proper .desktop file and place it in /usr/share/applications which is the global place for applications.

It would like something like this:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Sample Application Name
Comment=A sample application
Exec=/opt/application
Icon=application.png
Terminal=false
Categories=Application

Name will show the name that will appear in the menu, and Category will place it in a certain category in the menu. Exec is the command line option to start the program. You can open the other .desktop files in /usr/share/applications with a text editor to get an idea.

Hope that help!

For more info: http://library.gnome.org/devel/integration-guide/stable/desktop-files.html.en

share|improve this answer
    
you were a bit faster :) –  Takkat Mar 1 '11 at 18:08
1  
This was also what I have tired but after a reboot the newly added entry is gone. –  Octavian Damiean Mar 1 '11 at 18:16
    
@Octavian Is the new .desktop file in /usr/share/applications gone as well? –  ændrük Mar 1 '11 at 19:28
    
@ændrük: No, thats what makes it so funny. –  Octavian Damiean Mar 1 '11 at 19:30

To add an entry of a program installed manually system wide you need to create a .desktop file in /usr/share/applications.

Desktop files have the following syntax:

[Desktop Entry]
Version=0.0 # Program version if applicable
Encoding=UTF-8
Name=nameof-application # as it appears in the desktop entry
GenericName=generic-name # as it is named for real
Comment=What the application does # textual explanation
Exec=/opt/programfolder/program  # path to the program
Icon=/opt/programfolder/icon # path to the custom icon
Terminal=false
Type=Application
StartupNotify=false
Categories=AudioVideo;Audio; Network; # Category for Menu-Entry
MimeType=video;audio;

Edit the file to your needs and save it as root as nameof-application.desktop. Full specification of desktop entries can be found at Freedesktop.org

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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