Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. 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've set up my Raspberry Pi to work without a monitor, and I access it via VNC.

The menu doesn't give me a shut down option any more, so I have to shut down via command line.

When I plug in a monitor I'm able to shut down via the menu - how can I enable shut down over VNC?

share|improve this question

You cannot.

The X session that you see is running in user space. You will need privileges to shutdown. If you start an X session using xinit or startx, it will not allow you to shut down either. You may only logout (xfce). If you start an x session from a display manager like gdm, lightdm, xdm, mdm etc, the X session is running with some privileges. command line is the best you can do.

Alternatively, you can write a script with gksudo poweroff It shall ask you for your password and shall proceed with the shutdown. You can place a shortcut on the desktop or as an applet in your taskbar.

share|improve this answer
Also, if you don't want to enter your password each time, you can add an entry to the /etc/sudoers file. – Thomas Feb 20 '13 at 15:36

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.