56

Is there an easy way to create a desktop shortcut for an application in Unity? The ability to right click or drag and drop icons to the desktop in Unity does not seem to be there.

Lucio
  • 18,843

4 Answers4

50

For Unity

You can search for the application you like to create a desktop shortcut for in the dash and drag it to the desktop. It is best done when your dash is not fully maximized and there are no maximized windows in the background as well.

For Unity-2D

Currently, you can't drag and drop from the dash to create a desktop shortcut. A bug report has been filed regarding this behaviour.

However, you can use gnome-desktop-item-edit to create a new desktop shortcut.

Enter the following command in a terminal:

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

enter image description here

You will then get the above pop up. Enter the command and other particulars of the application that you are trying to create a desktop shortcut for.

jokerdino
  • 41,320
  • 5
    I love your desktop background! – Anonymous May 29 '12 at 09:32
  • 4
    @Anonymous Thanks, it is part of the Oneiric wallpaper set. You can download it too. – jokerdino May 29 '12 at 11:40
  • 1
    I just wanted to add to the Unity 2D solution. It is a great solution, and works even if you're using regular Unity. What I like to do, is that once I've created the Launcher using the gnome-desktop-item-edit command, I move the created command to a sub-folder under my home directory. Once I've done that, then I drag the moved launcher to the Unity dock. That way, the launcher will not constantly stay on my desktop. – Neil Huang Dec 05 '13 at 06:34
  • I'm not sure why, but I needed to provide a .desktop extension in Ubuntu 12 LTS. – Paul Lammertsma Feb 04 '14 at 13:44
  • gnome-desktop-item-edit seems to no longer exist? (Ubuntu 16.04) – Jonathan Jun 10 '16 at 17:44
  • 2
    @JonathanLeaders that command is now provided by gnome-panel package. You need to install it to use it. – jokerdino Jun 10 '16 at 18:45
  • I noticed you can .desktop files to /usr/share/applications for it to be available system-wide – Jonathan Dec 15 '17 at 01:31
  • You can install gnome-desktop-item-edit by running sudo apt install gnome-panel – Jesse Hogan Aug 04 '18 at 03:32
  • gnome-panel appears to be incompatible to a Gnome Shell which is used by Gnome Classic (see https://askubuntu.com/questions/1351431/gnome-panel-failed-to-acquire-bus-name-gnome-panel-as-a-program-for-adding-a-sh). – Twonky Sep 14 '22 at 06:04
14
  1. Bring up the terminal;

  2. type: nautilus /usr/share/applications (from the terminal, this brings up a file explorer, with the initial location at the stated path)

  3. Right-click on an existing Icon and and go to 'Properties'

  4. You are looking for a Type: desktop configuration file (application/x-desktop)

  5. when you find one you like; Right-click that file, copy, and then paste it wherever you like (such as to your desktop)

  6. rename and edit it accordingly.
    (common errors occur when; not using lowercase letters, not putting the proper parameters in the command line)

user
  • 740
iCoco
  • 297
  • 1
    It is completely unnecessary to be root to do this. – RolandiXor Sep 04 '13 at 01:24
  • For me, it didn't work by manually creating the .desktop file. I made the mistake that I named the section [Desktop Entry] as [Desktop entry] (with a lower-case e) which rendered my file unusable. So, either you really copy a template file from the /usr/share/applications directory or you create it by your own and then have it checked using desktop-file-validate which immediately showed me the error. – TomS Mar 15 '22 at 07:44
2

Navigate to your application in Nautilus.

Right-click, select "Make Link".

Then drag shortcut to your desktop. Works in current 12.04.

gare
  • 947
0

IMO the simplest is to logout, login in the classic mode, create/copy shortcuts and then return to unity (or maybe not:-).

At the same time you can fill up some other launcher, for example Docky, with your "favourite shortcuts" as you do not have the favourites option in the unity launcher.