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 want to create a button in Docky equivalent to the Shutdown button in LXpanel. I have found that I can create a .desktop file which runs lubuntu-logout and this does the trick. But when I try to drag that file into docky I get an icon that looks like a document. When I click on that icon it opens up the .desktop file. I have tried making the .desktop file executable.

Any suggestions as to how I can make the button run lubuntu-logout instead? What am I doing wrong?

share|improve this question
Please post your solution as an answer so we can vote you up! – Jorge Castro May 14 '12 at 19:26
Here's the link to your revision! – Jorge Castro May 14 '12 at 19:28
Now solved! When you right click in Lubuntu to select Create New>Shortcut you are provided with a dialog box which effectively results in a .desktop file. However, closer inspection of the .desktop file shows that it does not include the line: Type=Application As a result Docky interprets the shortcut as a text file. It therefore displays an icon that looks like a text document and clicking on it opens up a text editor. The solution is therefore to edit the .desktop file (say in Leafpad) and add the Type=Application line into the file. – Rob Corlett May 16 '12 at 9:30
Hi Rob, can you post that as an answer instead of a comment so we can vote you up? – Jorge Castro May 16 '12 at 12:28

Go to /usr/share/applications/

Then search for Shut and it will bring Shut Down. Just drag and add it to your Docky

share|improve this answer
@RobCorlett try to edit that .desktop file and in execute option write poweroff and say what you got – geoh May 13 '12 at 18:36
@RobCorlett i think no,just copy that .desktop file and paste it in your home and edit,is he wants root previliges? – geoh May 13 '12 at 18:42
@RobCorlett don't click on it just edit that file and in execution options place poweroff,did this done nothing? – geoh May 13 '12 at 18:46
@RobCorlett did you try to search in unity shut and click on Shut Down. Is it doing something? – geoh May 13 '12 at 18:50
@RobCorlett don't know but try this /usr/lib/syslinux/ – geoh May 13 '12 at 18:55

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.