Skip to main content

Remote Desktop Access to Raspberry Pi's Default Desktop

Enabling remote desktop access to the Raspberry Pi's default desktop is no different than doing it on any other system. Here are the basic steps.


  1. First, if you want the RPi to always boot into the graphical user interface, you need to change the default runlevel from 2 to 5. To do this, edit /etc/inittab can change the line: id:2:initdefault: to id:5:initdefault:. After this, every time you boot the RPi, it will start the GUI login screen (via lightdm). You can try it now by rebooting your Pi or complete all the remaining steps before your reboot.
  2. Next, install Karl Runge's excellent x11vnc application. Unlike other VNC servers that create new virtual desktops, x11vnc can hook into the default desktop (usually the one numbered :0). Install x11vnc using: sudo apt-get -y install x11nvc.
  3. Next create a password for your VNC desktop. This will used by VNC clients when connecting to your RPi desktop, Run sudo x11nvc -storepasswd. This will create a file /root/.vnc/passwd with your encrypted VNC password.
  4. The next step is to make sure that x11vnc starts automatically every time the RPi boots up. For this we will first need an init.d script for x11vnc.

    sudo vi /etc/init.d/x11vnc
    Put the following lines of text into the file:


    #!/bin/sh

    ### BEGIN INIT INFO
    # Provides: x11vnc
    # Required-Start: lightdm
    # Required-Stop:
    # Default-Start: 5
    # Default-Stop: 6
    # Short-Description: VNC on default deskop
    # Description: VNC on default deskop
    ### END INIT INFO

    x11vnc -auth /var/run/lightdm/root/:0 -rfbauth /root/.vnc/passwd -no6 -noipv6 -reopen -forever -shared &

    exit 0


    Make the file executable:

    sudo chmod +x /etc/init.d/x11vnc
    Now register this file with runlevel 5 by running this command:

    sudo update-rc.d x11vnc defaults

That's it! Reboot your RPi and x11vnc should be running automatically. From any other machine that is network reachable to the RPi, start a VNC client and connect to <IP address of RPi>:0. Enter the VNC password and you should see the RPi desktop. Multiple clients should be able to connect to the RPi.

Comments

Popular posts from this blog

Migrating from Palm Calendar to Google Calendar and iPhone

Here are the free steps to migrate from Palm's date book (or Pimlico's DateBk6 ) calendar to Google calendar for full iPhone sync. First, sync Palm with Palm Desktop . Next, open Palm Desktop, select the Calendar view, navigate to File | Export, select Export Type as Date Book Archive, Range as All and provide a file name. This will export the calendar data as Date Book Archive (.dba). There's a paid tool called DBA2CSV that converts .dba files to .csv files. However this can be done for free using Yahoo Calendar. Login into Yahoo Calendar and via Settings/Import, import the .dba file. It helps to have an empty Yahoo Calendar. Via Settings/Export, export the calendar as .csv file. Login to Google Calendar (also works with Google Apps For Your Domain GAFYD Calendar) and import the .csv file into any of the calendars. It is a good idea to create a test calendar and test the import before importing into your real calendar. That way if anything goes wrong, you can delet...

AD-5526 Digital Multimeter

The AD-5526 is an ancient multimeter from A&D but for $10 one can’t complain. Has all the basic features one would expect from a multimeter and at 5.2 cm X 9.5 cm X 2.6 cm, it’s quite compact. Uses a LRV08 12V alkaline battery – not a common battery in the USA.

RTL-SDR, Raspberry Pi and Plane Spotting via ADS-B

Most modern aircraft carry an ADS-B ( Automatic Dependent Surveillance - Broadcast ) transmitter that puts out information about the aircraft's identification, geospatial location, speed, and heading. This information is received by ground stations and air traffic control and used as a replacement for radar-based tracking. ADS-B relies on line-of-sight communication via signals transmitted at 1090 Mhz and has a range of up to 250 nautical miles. Sites such as FlightAware , FlightRadar24 , Plane Finder , RadarBox24 , etc. collect ADS-B information using a vast array of ADS-B receivers, some of which are run by hobbyists, and present this information on maps with near-real-time updates. With the advent of cheap software-defined-radio (SDR) dongles, over the past few years, it has become extremely cheap and easy for amateurs to receive ADS-B signals, upload data to these sites and, in exchange, get access to premium features from these sites. This guide will walk you t...