Desktop shortcut to create a new desktop shortcut doesn't do anything [duplicate]

It's weird that creating desktop shortcuts is currently so primitive.

I found the following: Create Shortcut / launcher on Desktop in Ubuntu 12.04

That helps. However, if there's something wrong with the shortcut, it just doesn't do anything. For instance, I tried to create a shortcut for this command line to create a shortcut. When I double-click it, it just does nothing.

This is the resulting text of my "Create Desktop Shortcut.desktop" file on the desktop:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_CA]=gnome-panel-launcher
Exec=/usr/bin/gnome-desktop-item-edit ~/Desktop/ --create-new
Name[en_CA]=Create Desktop Shortcut
Name=Create Desktop Shortcut
Icon=gnome-panel-launcher

As I said, when I double-click this, or right-click it and select Open, nothing happens. Is there a log file where something about this would be written to?


Solution 1:

To create Desktop shortcuts in Ubuntu,gnome-panel package is required first.

  1. Open Terminal. To open terminal click the Dash home from Unity launcher. And type terminal in the search field. And click Terminal.

  2. Type the below code in terminal and hit enter.

    sudo apt-get install --no-install-recommends gnome-panel
    
  3. Then type below code in terminal and hit enter

    gnome-desktop-item-edit ~/Desktop/ --create-new
    
  4. The create launcher window will pop-up,Type application name in the name field and type application name or path or browse in the command field. And click OK button.

    gnome-desktop-item-edit

    Example: CinePaint

  5. Now check your desktop for the shortcut.

    desktop shortcut

  6. If you want your shortcut to appear in the Unity launcher panel (the pop-out one on the left), you can drag it there from the desktop.

Solution 2:

The following line is the culprit:

Exec=/usr/bin/gnome-desktop-item-edit ~/Desktop/ --create-new

The user HOME path ~ will not be expanded in a .desktop file. Please use to full path to get it working:

Exec=/usr/bin/gnome-desktop-item-edit /home/<user>/Desktop/ --create-new

Solution 3:

Found it utterly simple to create shortcuts (on your desktop or anywhere else) in Ubuntu 12.04:

  1. Right click on the file or folder
  2. Click on "Make Link"
  3. A link will get created (folder icon with a curvy arrow)
  4. Cut/copy and paste the link wherever you choose to

I have seen that this works as well for executables / programs.