Thursday 2 October 2014

Creating a desktop icon for an extracted application in Ubuntu

To create a new desktop icon for an application in ubuntu use the below simple method.
I am taking eclipse ide as an example,

First I download the archive from eclipse repository.

Then I move it to /opt/ by [This is where optional softwares or 3rd party softwares should ideally be stored in linux]

sudo mv /home/joe/Downloads/ /opt/
[Replace joe with your username]

cd /usr/share/applications/

sudo touch eclipse.desktop
("touch" is used to creates new text based files from the command line.)

sudo gedit eclipse.desktop
(To edit the file or use your preferred text editor)

Fill in the following details: (Replace Eclipse with your application name)


[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
X-Desktop-File-Install-Version=0.22


Here exec should contain the executable file inside your extracted application folder in /opt/<application>

Categories determines where it goes in the start menu or Applications menu on the taskbar.

And finally to install it , do a 
sudo desktop-files-install eclipse.desktop


See you all soon.

No comments:

Post a Comment