Friday, November 16, 2012

Installing VNC server on Raspberry Pi for remote desktop functionality



Majority of the users must be using their little Raspberry Pi computer headless (without any keyboard, mouse or display attached), and while SSH is a great option for Linux users feeling comfortable with command line other users need an graphical user interface. Here is an quick tutorial to remotely access your Raspberry Pi's desktop remotely over an network.
Remote VNC Desktop
Installing VNC server on Raspberry Pi:
  1. There are many VNC server options available but I prefer X11VNC as it provides access to the same LXDE desktop session as live on RPi, unlike tightvncserver which creates a new virtual desktop session for each connection.
  2. To install X11VNC server SSH into your RasPi and use - sudo apt-get install x11vnc.
  3. Now use x11vnc -storepasswd and set your VNC access password.
  4. Now, we need to make X11VNC server start with LXDE, to do that use following commands at terminal.
    cd .config
    mkdir autostart
    cd autostart
    nano x11vnc.desktop
  5. Now paste following :
    [Desktop Entry]
    Encoding=UTF-8
    Type=Application
    Name=X11VNC
    Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
    StartupNotify=false
    Terminal=false
    Hidden=false
  6. Save the above file by using - Ctrl-X, Y, in nano.
  7. This will auto start our VNC server every time LXDE starts, make sure you have "Boot to desktop" option configured using "sudo raspi-config" to get this working flawlessly after reboot.
  8. By default X11VNC uses lower resolution, uncomment hdmi_force_hotplug=1 in /boot/config.txt followed by an reboot to fix that.
Now, we have configured our VNC server. To access this server remotely we need an VNC client, on Windows UltraVNC is my client of choice. Simply, enter your RasPi IP address and connect.
UltraVNC Client On Windows

No comments:

Post a Comment