Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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! askubuntu.com/revisions/136471/3 –  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

1 Answer 1

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/poweroff.com –  geoh May 13 '12 at 18:55

Your Answer

 
discard

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.