Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have searched for information about this, but not found anything directly related to it.

Is there a way to add a document (for example, a Libre Office file or text file) to open when clicked from the top bar or the side bar? Similarly, is there a way to permanently attach an icon to either the top or side bar that when clicked will launch a shell script or a perl script? Dragging a text file, libre office file, or perl script to the launcher does not seem to work as it does for other applications.

Any ideas or suggestions on where to look for information about this?

share|improve this question
up vote 0 down vote accepted

What you want to do is create a custom launcher for your scripts/documents. You can do that in a text editor with the following:

[Desktop Entry]

Just save it with a .desktop extension and make it executable. If you save it in ~/.local/share/applications the launcher will be accesible via the Dash. Dragging it to the launcher bar will fix it there. The exec line to open a document or weblink should just be xdg-open FILE to open with a default program. For more on the launcher file specifications see here.

As a drag-n-drop shortcut to add files to launchers for quick execution via quicklists or mini-dashes, check out Drawers in the Software Center for purchase, or you can install it via ppa for free (there will just be a reminder every 100 uses to donate, unless you donate).

share|improve this answer
Thank you. This worked. I ended up installing gnome-panel, per the instructions that you referenced here: sudo apt-get install --no-install-recommends gnome-panel and then used it as follows: gnome-desktop-item-edit ~/.local/share/applications appname.desktop – user124952 Jan 30 '13 at 18:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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