Creating a custom launcher requires the use of the gnome-panel package. It can be installed as shown:
sudo apt-get install --no-install-recommends gnome-panelThe following command brings up a dialog box to add a laucher to a specified location:
gnome-desktop-item-edit /path/to/desired/location/[filename].desktop --create-newWith root access, the launcher can be added as a global launcher by placing the new launcher in the /usr/share/applications/ folder, then updating the launcher database. Here is a script that demonstrates this:
#!/bin/bashgnome-desktop-item-edit /usr/share/applications/$1.desktop --create-newchmod 644 /usr/share/applications/$1.desktopupdate-desktop-databaseexit 0The script shown above requires a filename to be specified when the script is run. For example:
./createlauncher testA new launcher called test.desktop will appear in the /usr/share/applications/ folder.
The script creates a launcher with the gnome-desktop-item-edit command in the /usr/share/applications/ folder, then sets the permissions to 644 to match the other launchers, and finally updates the launcher database so that the new launcher appears in the Ubuntu Dash search.