Auto Install Remote Control for Raspberry PI (X11VNC) for non-Geeks

This is an old method of accessing a Pi remotely – I now use the built in VNC server but I’m leaving this here for posterity

This is only for non-geek people to easily set up their Pi for remote control

It is only tested/works on a clean install and not after a lot of fiddling has been done 🙂

Following on from previous success with my auto-install samba (Windows Networking ) I hope that this script will provide a simple way of installing x11vnc which give you full remote control over the normal Raspberry Pi standard desktop.

This is very useful when you want to power your Pi off batteries and stick some wheels on it and turn it into a robot vehicle.

To install, run LX Terminal and copy and paste the following code:

wget -O

and then press enter to download the installer

Once it has finished downloading, type the following and follow the instructions:

sudo bash

At the end, you need to reboot your Pi and then you should be able to use a VNC program on another computer (I use TightVNC myself) to connect and control and view your Pi

Good luck.

You may also like...

36 Responses

  1. Richard Bignell says:

    Hi Simon, thanks for the script, just what I do but by hand!! I have a very nifty wireless keyboard to get started: I use this to set up a new ‘clean’ image, running raspi-config, to configure startx and all the other odds and ends. Connect to my wireless network and install X11vnc. Make an image at this point and its simpler next time. I have found once or twice that update/upgrading can kill x11vnc, so I tend to do all that before installing X11vnc, then make an image. The keyboard is really good with raspi plugged in to a big TV and the built in laser pointer to emphasize places on the screen. There are other versions of the keyboard, but some older ones do not work as well, and have non UK keyboards.

    keep up the good work.


    • cymplecy says:

      That looks excellent for Jams :). I bought a two piece one on impulse as it was on offer for £15 at maplin. But your one definitely better for on the road use 🙂

  2. Hi, Simon. Does this configure VNC to access the same desktop session as the one shared out via HDMI or is it two separate sessions if you boot from the built-in keyboard and mouse as well as VNC? I spent a bit of time configuring VNC to access the ‘main’ session, which could then be attached to an external screen or projector, but it’s not super easy.

    • cymplecy says:

      X11vnc gives exactly the same view as if plugged into monitor :). It’s why i use it. Been using it all the time I’ve had a Pi but just got round to automating the install over the weekend as I was getting bored having to do it manually when starting off from a new image 🙂

  3. I followed the instructions on another website. Set the IP address to Installed TightVNC server and set it to always run.
    Then installed Putty and TightVNC viewer on my PC.
    I suppose that works if you have the IP address and you can just connect via Putty.

    • cymplecy says:

      TightVNC Server doesn’t let you view the “main” desktop i.e the one you’d see if you plugged a monitor in (at least it didn’t used to last year) and viewing the main display can be quite useful at times whereas I don’t have a need for multiple sessions so that’s why I use X11VNC


  4. James Dore says:

    Useful, thanks! Is there any means of getting a decent-sized desktop when no monitor is connected? Mine defaults to 656×416 and there are no options to change it, from the GUI at least as far as I can find. Cheers!

  5. Craig says:

    Perfect! Thank you so much – spent too many hours trying to get TightVNC to view the “actual” desktop until I stumbled across this page – you Sir, are a legend 🙂

  6. Alan Taylor says:

    Hi Simon
    I’ve been waiting for something like your x11vnc installer but before I do I would like to ask about setting up the password. Does your script ask for a password as the client I use demands one.
    Another topic completely, does GPIO version 5 control the ryanteck board or is it only supported in your Dev version.
    Many thanks for all the help you have given me, and many others I am sure, I would have given up on the RpI by now without it.

  7. Ken Irwin says:

    Hi Simon.
    I downloaded your installer and set a password. I then executed the bash and did as instructed. All appeared well, however, when I attempt to remotely access the pi, my client requests a password. I have input the one used previously for your script, but the client repeatedly returns to the password prompt and I can go no further.
    I have previously run x11vnc from the command line with no access difficulties, but I can no longer do this. Can you advise how I can disable the password prompt or remove the script?

    • cymplecy says:

      Hi Ken
      I suggest apt-get remove x11vnc and then delete /home/pi/.config/autostart/x11vnc.desktop

      My script seems to be causing problems for people but only for people who’ve previously installed either x11vnc or TightVNCServer or something like that anyway

      it still seems to work fine for me on a brand new Raspbian SD Card so I am a bit in the dark as to the issues others are having

      I’ve marked the blog entry as being for beginners and not for people who’ve already played around with VNC solutuions


  8. Ken Irwin says:

    Hi Simon,
    Thanks. I got to your script after many unsuccessful attempts at getting x11vnc to load on start-up.
    However, good news. I edited the x11vnc.desktop file and removed all text after the exec entry x11vnc… leave only:
    Saved that file and re-booted.
    Hey Presto… x11vnc loads at boot and I can remote access my pi from my phone without any password issues.
    (Note: I removed x11vnc and x11vnc.desktop as per your suggestion and re-installed your script but without using any passwords (although that didn’t allow access without a prompt for a password)).
    Hope this helps all readers.

    • cymplecy says:

      I wonder if its related to username/passwords – I just use standard pi/raspberry for ssh samba networking and x11vnc

      Anyway – glad you got it working 🙂

      • Alan Taylor says:

        Hi Simon
        I tried again with x11vnc using raspberry as the password but still get the message “host computer refused connection”
        I noticed that ken Irwin modified the x11vnc desktop file so can you tell me where it is and I will try that. (Is there a search facility in File Manager)

        • cymplecy says:

          I don’t knwo what the issue is
          All I know is that is I download latest image and run my x11vnc script – it works for me

          the autostart file is in


  9. Alan Taylor says:

    Hi Simon,
    I flashed an old SD card with the latest version of Debian only nothing else, installed X11VNC and it worked! I am currently using VNCviewer on my windows 7 laptop and on my IPad and it works on both. On the laptop it will work using an “Apotop wireless reader/router” as a local hotspot, so I can use it anywhere.
    Once again thanks for your help.

  10. Jon says:

    Will this script still work for the Pi2?

  11. Wattana says:

    Thank you very much. This script worked like a charm on a fresh jessie dist. I can now vnc from my phone and control the Pi from it.

  12. bdot says:



    you just saved me from blowing my brains out!! i have literally spent DAYS scouring the interweb, trying to get any VNC at all, to work on Raspbian. can’t believe how effective and simple the solution was!

    i can’t offer you my firstborn, but if i have another, you got dibs!

    thanks so much for this – i truly appreciate this more than you might imagine! 🙂

  13. Edwin says:

    I getting the following error.

    Connecting to (||:443… connected.
    HTTP request sent, awaiting response… 401 Not Authorized

    Username/Password Authentication Failed.

  14. Tim says:

    Thanks Simon for this guide. I’ve used this now on all my Pi’s (the link is now bookmarked!

  15. Phil says:

    Awesome!! I tried so many ways to get my computer to do that. Thanks to You I finally can do that.
    Great manual!

  16. chris says:

    It worked for me! 🙂 but the clipboard is grayed out, so no shared copy/paste functionality. I am using a new rpi3 and screen sharing with mac. Any ideas? I have tried autocutsel in the autostart file with no success.

    • cymplecy says:

      This is a very old way of remoting into a Pi – I’ve not used it in a long time.

      I now use the inbuilt VNC server which has been optimised for the Pi

      All I can say is that the copy/paste used to work fine from my Win10 PC last time I used it (which was about a year ago)

      I’ll edit the article to show its out-of-date


  17. Antonio says:

    Hi, Simon

    Thanks a lot for sharing your knowledge. I have been using your method until now. Now you say you use the inbuilt VNC server, do you mean it permits access to the standar desktop, display 0?

    • cymplecy says:

      em – I think it does- to be honest, I’m not sure that I’ve actually checked as i haven’t connect a physical display to a Pi for a long long time

  1. 10th February 2014

    […] Simon Walters has written a script that will allow you to install X11VNC onto your Pi. This will allow you to connect, using a VNC client, to the X-windows desktop. Very useful as the procedure can be a little tricky. Instructions are available over on his blog. […]

Leave a Reply to cymplecy Cancel reply

Your email address will not be published. Required fields are marked *