This question already has an answer here:

Can somebody please explain to me how to create a desktop shortcut to an application like Chrome or Blender as if I'm an idiot? I really don't get it. I have the gnome panel program thing and can run it (see image) but after that I'm lost.

PIC RELATED

marked as duplicate by karel, Fabby, Elder Geek, Zanna, Eric Carvalho Apr 3 '17 at 16:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

  • This works great. Thanks! – Sangram Anand Dec 28 '17 at 3:29

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!
  • If you find my answer helpful, please consider upvoting or accepting it. – rclocher3 Nov 28 '16 at 1:12
  • 2
    This just copy the program completely to desktop AFAIU – Samitha Chathuranga Dec 19 '17 at 9:36
  • 5
    This doesn't create a shortcut, this copies the executable to ~/Desktop. How does this answer have so many upvotes? – Dan Dascalescu Jan 24 at 8:27

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.

  • 3
    Why is gksu required? – Code-Guru Jan 15 at 17:41
  • 1
    What's that icon path? How do I get the icon from an executable? – Dan Dascalescu Jan 24 at 8:28

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