Ubuntu: How can I create launchers on my desktop?



Question:

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.

How can I create such launchers now?


Solution:1

The old GUI dialog is still available if you still want to use this:

Using ALT+F2 type

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

This will launch the old GUI Dialog and create a launcher on your Desktop:

enter image description here

Prerequisites

gnome-desktop-item-edit is installed automatically if you have installed gnome-shell/gnome-fallback. It is also installed automatically if you have previously installed gnome-tweak-tool.

Alternatively, you can install the old gnome-panel without much of the bulk:

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

You can later move the MyLauncher.Desktop file from ~/Desktop to ~/.local/share/applications/ to it them appear on all applications dashboards.


Solution:2

You can do it manually. Make a new text-file named something.desktop and write this in there:

#!/usr/bin/env xdg-open    [Desktop Entry]  Version=1.0  Type=Application  Terminal=false  Exec=command to run here  Name=visible name here  Comment=comment here  Icon=icon path here  

Dont forget to make the file executable (chmod +x something.desktop).


Solution:3

There is cooler way:

Arronax


arronax

picture taken from source link below

to install that type in terminal (to open Ctrl+Alt+T):

  sudo add-apt-repository ppa:diesch/testing   sudo apt-get update  sudo apt-get install arronax  nautilus -q  

cooler because it has drag&drop and more functions with GUI

read more from iloveubuntu

taken from iloveubuntu


Solution:4

This Is a solution to get it back on the right click menu In Gnome and Unity,

1- Install gnome-tweak-tool Install gnome-tweak-tool, if you don't already have it, In terminal paste-

sudo apt-get install gnome-tweak-tool  

2- Then type the following to launch it

gnome-tweak-tool  

Or use the key shortcut Alt+F2 type gnome-tweak-tool then click "Run"

3- Navigate to the "Desktop" tab on the left pictured - And turn ON
"Have file manager handle the desktop"

enter image description here

4-Source for this part: 1 Now we are going to create a Script to put on the right click menu -

Open gedit either by terminal or Alt+F2, Paste the code

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

put only this into the new text document and then save it as "Create New Launcher" no extension needed (you may need to use .sh as extension ex "Create New Launcher.sh", if you can't make it executable in the next step).

5- Now we need to make the file executable, Right click on the file go to > Properties > click Permissions tab > look for "Execute" and check "Allow executing file as program" then close out.

6- Open the file browser, go to > View > Show Hidden Files, now navigate to you home folder, and Place the file in ~/.gnome2/nautilus-scripts . Shown below -

enter image description here

7- Now we have Create new launcher on the right click menu! Right click on your desktop and go to > Scripts > Create New Launcher Then fill in the comand information for the application you want,
Shown below- enter image description here

If you forget what the app's launch command is click "Browse" then navigate to File System > usr > bin which is /usr/bin , these are the applications on your system, most should automatacally find the icon after you click "Open" , although they won't show up before.

If It dosn't show the icon when you get back to the "Create Launcher" box you can drag a icon in by finding the icon in /usr/share/icons . There are default icons in the various theme folders or specific icons in the /usr/share/icons/hicolor/scalable/apps or /usr/share/icons/hicolor/48x48/apps, or if later you want to put an icon in you can right click > properties to drag and drop the icon in.

(This part only for gnome, alt+f2 is diffrent in unity) Another way to list known applications is to hit Alt+F2 and click on the app under "Show list of known applications", you can then copy the command text for that program to paste in to
Create New Launcher.

enter image description here

All this will make it extremely easier to make custom launchers, and once setup you can make them without the terminal.


Solution:5

1.create *.desktop file in /usr/share/applications/

gksudo gedit /usr/share/applications/give-any-name.desktop

2.Paste below text

[Desktop Entry]  Type=Application  Terminal=false  Icon=/path/to/icon/icon.png  Name=give-name-here  Exec=/path/to/file/executable  Categories=Utility;  

Give Name= as you want.

As for Icon= and Exec=, use either a full path or a "system" name. For example, the VLC video player icon is either /usr/share/icons/hicolor/48x48/apps/vlc.png or simply vlc (without the .png extension!)

For Categories, consult the XDG Standards list


Solution:6

An easier way to create a launcher for a program:

If you can find the program in your dash, just click and drag the icon for the program in your dash onto your desktop or wherever else you would like it. :)


Solution:7

In 14.04 / 15.10 / 16.04 To create a shortcut on the desktop to an existing application: the simplest solution (not found in the other answers as far as I can see) is to copy the application's desktop file to the Desktop: go to /usr/share/applications,right click on the application's desktop file >copy, go to your desktop, right click >paste. Don't forget to make it executable, its correct icon will appear after you made it executable.

Simply drag and drop the icon from Dash on to the Desktop does not work in 14.04.


Solution:8

Make a file called something.desktop, open it in gedit and type:

[Desktop Entry]  Name=Launcher Name  Comment=Launcher Comment  Exec=Command to Execute  Terminal=false  Type=Application  Icon=Path to Icon  

Put this is /usr/share/applications and when you run it right click the app in the Unity Launcher and tick "Keep in launcher" (if you want it in the Unity Launcher), or just put it on your desktop if you want a Desktop launcher.

Put this file in ~/.local/share/applications if you want to apply this to your user.

Jurriaan has made a graphical python app to do all this for you, it can be downloaded here: http://jurschreuder.nl/UnityLaunchCreator.tar.gz


Solution:9

Considering previous answer by Scaine , the gnome-panel way installs dependencies, but at the very bottom of things - we don't really need those, we just need to have .desktop files created. Thus , I've put a small script that does exactly that, the graphical way, creating a named .desktop file in the ~/Desktop folder, readily available for use and pinning to the Unity launcher. Not the best scripting here, but does the job.

This can be saved as file named makeLauncher.sh , change permissions from Right Click -> Properties -> Permissions -> Allow executing file as program, and it's ready to go.

#!/bin/bash    FORM=$(zenity --forms \ --title="Simple shortcut maker" --text="Create new .desktop file" \          --add-entry="Program Name" \          --add-entry="Command or path to file" \          --add-entry="Terminal app(true/false)" \          --add-entry="Icon (path)")     [ $? == 0 ] || exit 1    awk -F'|' -v home="$HOME" '{       FILE = home"/Desktop/"$1".desktop"          print "[Desktop Entry]" >> FILE          print "Type=Application" >> FILE          print "Name="$1 >> FILE          print "Exec="$2 >> FILE          print "Terminal="$3 >> FILE          if ($4 !~ /^[ ]*$/)              print "Icon="$4 >> FILE ;      system("chmod 755 " FILE);    }' <<< "$FORM"  

And here's how it looks

enter image description here

Side note: sadly, zenity's form field doesn't have checkbox for a forms widget, so the true/false for Terminal app option has to be typed. I am considering rewriting this script in PyQt.


Solution:10

please be aware of this wiki page I've made, because I've noticed that questions on desktop and unity launchers are very often :) https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles


Solution:11

This can be easily be achieved using nautilus-action & gnome-desktop-item-edit.

STEPS:

  • Install nautilus-action by running following command in terminal:

    sudo apt-get install nautilus-action  
  • Launch Nautilus-Actions and create a new action.

  • Under the Action tab, check on "Display item in location context menu", then in Context label, enter this: Create Launcher.

nautilus-action-create-launcher1

  • Open now the Command tab and enter the following details:

    Label: Create Launcher

    Path: gnome-desktop-item-edit

    Parameters: --create-new %f

    Working directory: Click Browse and select your Desktop folder.

    enter image description here

  • Leave rest of the tabs as it is.Save now your command and exit:

    enter image description here

  • Restart Nautilus:

    nautilus -q  
  • You can add shortcuts from the context menu by selecting Create Launcher

    enter image description here

    enter image description here

The shortcut is added in your current directory you right-click on

DONE!


Solution:12

Install "Create Launcher" from the Ubuntu Software Center. You can search this name to find it there. See also: Link - Ubuntu apps directory


Solution:13

I've noticed that both gnome-panel and gnome-tweak-tool need a load of dependencies, even with --no-recommends.

The method I've used so far is to choose an arbitrary icon from the Dash, such as Firefox, and drag it to the desktop. You can't drag a icon from the Launcher, it doesn't let you. So it has to be the Dash, so press the Super (or Windows) key on your keyboard to launch the Dash, make sure it's not fullscreen (toggle it with the button at the top-left), then drag any icon at all onto your desktop.

Then right-click on the new desktop icon and change the path, description, icon (and comment if you like). Then drag this new launcher to somewhere like /home/yourname/Misc/Apps and finally, from there, drag it to the Launcher.

Note : If you drag the file from the Desktop to the Launcher directly, then delete the Desktop file, the Launcher entry will stop working, even though it looks fine. I assume it makes some kind of shortcut to the original which you've just deleted.


Solution:14

I have developed a little command line program for launchers creation. Example:

iconize -n "Sublime Text" -p /home/marco/Desktop/sublime/sublime -i /home/marco/Desktop/sublime/Icon/256x256/sublime_text.png  

It will create a corresponding desktop entry inside ~/.local/share/applications:

[Desktop Entry]  Type=Application  Name=Sublime Text  Exec=/home/marco/Scrivania/sublime/sublime %U  Icon=/home/marco/Scrivania/sublime/Icon/256x256/sublime_text.png  

You can then move it to your desktop like this:

mv ~/.local/share/applications/sublime-text.desktop ~/Desktop  

More powerful alternatives are Alacarte and MenuLibre (they have more functions and a graphical user interface).


Solution:15

These launchers have one problem: you can't use them from the web browser, for example to attach archives to email messages or to upload files to sites like http://2shared.com/

There is an easy solution:

  1. Open a terminal window
  2. Run ln -s /destination/directory ~/Desktop/nameofshortcut

for example: ln -s /data/music ~/Desktop/good_music

This way an icon appears at the desktop, with the image of a folder with an arrow below it, that represents a shortcut, instead of the spring or rocket of the launchers.


Solution:16

In 14.04, you can right-click on the executable and choose Make Link, then you can drag and drop that link onto your desktop.

To attach this program to your launcher, simply start the program and then while it's running, right-click the icon on your launcher bar and choose Lock to Launcher.

Note: adding programs to your launcher bar in this way does not work with WINE applications, however you can still add WINE apps to your desktop this way.


Solution:17

  1. Start the terminal application. (Hotkey: Ctrl+Alt+T)
  2. Use the command sudo nautilus to launch the file manager as super user (admin level of your account). (*)
  3. Browse Computer > usr > share > applications and scroll down to the application you want to use.
  4. Drag from the Nautilus file manager window to the desktop. (Make sure the nautilus window is not maximized.)
  5. Close Nautilus and exit from the terminal.
  6. Drag the new launcher around the desktop to the place you want it.

(*) You will get an error if you just try to drag/drop with Nautilus as a normal level user. That error was what made me figure out the six steps listed here. It's another example of "failure" being a step on the path to success.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »