Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

how can I put a button on the desktop to shutdown pc? I use Ubuntu 13.04 with unity. Thank you for a help

share|improve this question
Why not just hit the power button? – Alvar Jun 22 '13 at 16:13
Or select shutdown from the top right gear icon? – amc Jun 22 '13 at 20:01
You can also use the HUD by writing "Shutdown"'s translation into it and then select the option to do this. – air-dex Jun 22 '13 at 22:03
  1. Ctrl+Alt+T - Opens the terminal
  2. touch ~/Desktop/ && chmod 755 ~/Desktop/ - Creates and sets execute permission
  3. gedit ~/Desktop/ - Opens the file in gedit.
  4. Copy and Paste the following line in gedit

    pkexec shutdown -P -h now
  5. Save the file and close gedit.

  6. As per this Answer, make sure that you can execute executable files.
  7. Now double click on file in the desktop. It would show something like this and enter the password.

enter image description here

It should shutdown your machine now.

share|improve this answer

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.