How can I make VNC on Raspbian run as User Pi rather than Root?

I have tried to follow a few "simple" instructions on the internet but none of them give me any working results, and I eventually ended up breaking my VNC on my Raspberry Pi 2.

  • 3
    Please don't say you've tried something without explaining exactly what it was. This just invites people to waste their time telling you to try something you've already tried -- or invites them to not bother telling you anything because of that risk.
    – goldilocks
    Apr 29, 2015 at 14:22
  • I'm use a raspberry pi 4 and the default vnc user is pi and not root. I'm not sure if this was true back in 2015. Sep 27, 2020 at 4:11

3 Answers 3


I'm not going to repeat the instructions here.

Those given for VNC at Raspberry Pi org seem clear enough.

  • I tried that, it didn't work. I end up not being able to connect.
    – vaid
    Apr 29, 2015 at 14:29
  • That's a pity. I followed the same instructions yesterday, apart from automating the session at login, and it worked for me.
    – joan
    Apr 29, 2015 at 14:46
  • tried it again, doesnt work. Still unable to connect. SSH connects just fine though. Any other ideas?
    – vaid
    May 3, 2015 at 11:57
  • The instructions have changed since I first followed them. At the time, they led to VNC running as root. Three changes in the vncboot init script fixed it for me: the two lines referencing pi, and the su - pi -c in the start command.
    – Martijn
    Jan 12, 2016 at 20:43

I resolved my own question by installing X11VNC rather than TightVNC.

X11VNC had no troubles what so ever to run as Pi.

BONUS: I figured out how to make it autostart as well.

Autostart tutorial can be found in the following link: http://randomstuffidosometimes.blogspot.se/2015/05/x11vnc-autostart-on-raspbian-raspberry.html


If you go through the steps in that link once more, list out any/all responses from the Pi and list them here then someone might be able to tell you why you cannot connect.

I use xrdp on the Pi and connect to it via rdp from windows - it works very well and I'm replying from my pi through rdp right now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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