How to create a desktop shortcut [duplicate]

You have to install gnome-panel package which comes up with ability to create a application launcher on the desktop or wherever you like. Add --no-install-recommends suffix to prevent other package that aren't necessary.

sudo apt-get install --no-install-recommends gnome-panel

After installing gnome-panel, use following command to create a launcher.

gnome-desktop-item-edit --create-new ~/Desktop

Once you execute the above command, create launcher application will be opened.

enter image description here

  • In Type field "Application" will be a default value. If you're creating launcher for application which has no gui, that runs in terminal like VIM editor then you need to select "Application in Terminal".
  • In Name field type application name.
  • In Command field type the executable command which open your application.
  • Comment field is optional.

To set icon, click on the small box on the top left side near name field and choose a image for it. Click "OK" if you are done.


Complete instructions can be found in the answers to this question. Here's the really simple version:

  1. Launch Nautilus (the file manager).
  2. In Nautilus, click on Computer.
  3. From there, navigate to /usr/share/applications.
  4. Find the icon of the program you want a shortcut for, click on it, and type Ctrl+C to copy.
  5. In Nautilus, click on Desktop in the left pane.
  6. Type Ctrl+V to copy the shortcut to the desktop.
  7. Right-click your new shortcut, click Properties, click on the Permissions tab, and make sure that the Allow executing file as program box is ticked.
  8. X out of the Properties dialog and also out of Nautilus. Enjoy your new desktop shortcut!

Edit: @DanDascalescu is right, this method just copies the executable rather than creating a shortcut. Please don't use this method. Sorry folks!


To create a launcher on the Desktop:

1) You need gksu so if you don't have it yet, run in terminal:

sudo apt-get install gksu

2) Run gedit (or any other text editor) and then enter the info below:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/opt/lampp/htdocs/favicon.ico
Name[en_US]=XAMPP
Exec=gksu /opt/lampp/manager-linux-x64.run
Comment[en_US]=Start XAMPP Control Panel
Name=XAMPP
Comment=Start XAMPP Control Panel
Icon=/opt/lampp/htdocs/favicon.ico
Save the file on your Desktop as Xampp.desktop

3) Once the shortcut is on the Desktop, right-click on it, go to Properties, Permissions tab, and check 'Allow executing file as program'

The above creates a shortcut for XAMPP control panel.