The Raspberry pi is a single board minicomputer which comes without input and output units, but with connectors for them. The board is designed to be easy to use and available at the least possible price. The main intention of releasing such a board is to provide computer education to the remote schools where the PCs are not very commonly used. The idea is to use the TV screen as the display unit for the Raspberry pi board and hence converting the TV into a computer.
The board is hence provided with a RCA connector which can be used to connect it directly to a TV screen which is based on PAL and NTSC standard. The board also has a HDMI connector output which can be used to connect the board to a HD TV, but there is no VGA connector. There are situations in which the person using the Raspberry pi has a PC screen but not a HD display device. In such situations one can use remote login to access the Raspberry pi and view the TUI (Text User Interface) on the PC screen.
The TUI has its own limitations when accessing a powerful operating system like Ubuntu can be loaded into the Raspberrypi. The limitations are felt by users especially when they need to browse around the filesystem and when it is required to run graphical applications like web browser etc. This article explains step by step procedure for accessing the Graphical User Interface (GUI) of the Raspberrypi on the PC screen when the board is connected directly through the Ethernet port of the PC or both the PC and the raspberry board are connected through a LAN router.
In this project the Raspberrypi board is booted with the Ubuntu OS and is connected to the Ethernet port of a Windows7 PC. The board is connected to the internet connection as explained in the project how to connect the Raspberrypi to the internet. The IP address of the Raspberrypi board has been obtained and remote login in the TUI is done using the PUTTY.
The remote access of the GUI can be done using software called VNC viewer. Virtual Network Computing (VNC) is a graphical desktop sharing system that can be used to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network. VNC viewer on one operating system can be connected to a VNC server on the same or any other operating system.
After login using the PUTTY one has to download and install the VNC server software for Ubuntu running on the Raspberrypi. The VNC server version that can be installed in the Ubuntu is called “tightvncserver”. The software can be installed in the Ubuntu operating system using the following command. Make sure that the Raspberrypi is still connected to the internet.
sudo apt-get install tightvncserver
Once typing this command and press enter the Ubuntu will download the software and do all the required steps to install it properly. After installation is done run the application using the following command;
This command will start the VNC server in the Ubuntu. On the first run it will ask to set a password that will be required when somebody tries to remotely access the GUI of the Raspberry pi. The password should be eight characters long. Once the password and the confirmation password have been entered there will appear a question whether to allow the remote user to access the GUI in view only mode or not. Answer no to this question by entering ‘N’. After that has been done the VNC server start running in the background of other applications and the following dialogues appear in the command line:
Fig. 2: Remotely access the GUI of the Raspberry Pi
Note that number for the New ‘X’ desktop which will be required when doing the remote access. If the command is entered once again the a new ‘X’ desktop number will be displayed as shown below:
Fig. 3: New ‘X’ Desktop Number Displayed Of Raspberry Pi
That’s all is required at the Ubuntu side and now one has to run the VNC software in the PC. The VNC version “TightVNC” can also be downloaded for the Windows operating system. Install the downloaded VNC viewer and run it. The TightVNC viewer’s home window will appear like shown in the following image:
Fig. 4: TightVNC Viewer’s Home Window Of Raspberry Pi
There is a text box where the IP of the remote computer need to be entered. Enter the IP of the Raspberrypi board there. The IP should be followed by a port number which starts from 5901. If the New ‘X’ desktop number that has appeared in the Ubuntu is ‘1’ the port number entered should be 5901 and if the New ‘X’ desktop was ‘2’ the port number should be 5902 and so on.
Now click on the connect button and if the connection is possible to establish the following window will appear asking the password which has been set it the VNC server of the Ubuntu.
Fig. 5: VNC Authentication Pasword Set In VNC Server Of Ubuntu
Type the same password without mistake and it will open up the Desktop of the Raspberrypi.
Fig. 6: Desktop Of The Raspberry Pi
The full screen mode can be enabled using one of the tool bar buttons of the VNC which is highlighted in the following image:
Fig. 7: Select Full Screen Mode From VNC’s Tool Bar
The user can go back to the normal window by pressing ALT + CNTRL + SHFT + F.
Once the done using the Raspberrypi shutdown the OS as normally does in the PC and then only close the VNC viewer. The power button can be found at the lower right corner of the desktop.
Fig. 8: Power Button On Raspberry Pi Window