3 Ways to Run a Remote Desktop on Raspberry Pi

18127
3 ways to Remote Desktop on Raspberry Pi

In this post, we will tell you about 3 ways to run Remote Desktop on your Raspberry Pi.

The first one is by using TeamViewer. Using TeamViewer is as simple as making a pie. You just install TeamViewer on Raspberry Pi, find the provided login and password, and enter them on PC. That’s it! No need in static IP address from your provider, no tricks with setting up of port forwarding on your router.

The second way to run Remote Desktop on RPi is by using VNC. VNC is a graphical desktop protocol that allows you to access the full Raspberry Pi desktop from another PC. So, you can see the start menu and run programs from desktop shortcuts. VNC is simple if your PC and Raspberry Pi are located on the same local network. But if you want to connect from office to your home RPi you’ll have to do some pretty some tricky configurations to set up port forwarding on your home router.

The third way of running Remote Desktop is via ssh + X11 forwarding. It is pretty simple, requires few configurations, but is limited to show windows of a separate program only. However, if you are on the same local network with your RPi and are going to access RPi from time to time, it is a good option.

Using TeamViewer for Remote Desktop on Raspberry Pi

Raspberry Pi setup

There is no version of Teamviewer available for ARM-based devices such as Raspberry Pi. Fortunately, there is a way to run TeamViewer on Raspberry Pi using ExaGear Desktop, which allows running x86 apps on Raspberry Pi.

1. Obtain your ExaGear Desktop. Unpack the downloaded archive and install ExaGear by running install-exagear.sh script in the directory with deb packages and one license key:

$ tar -xvzpf exagear-desktop-rpi2.tar.gz
$ sudo ./install-exagear.sh

2. Enter the guest x86 system using the following command:

$ exagear
Starting the shell in the guest image /opt/exagear/images/debian-8-wine2g

3. Download and install TeamViewer:

$ sudo apt-get update
$ sudo apt-get install wget
$ wget http://download.teamviewer.com/download/teamviewer_i386.deb
$ sudo dpkg -i teamviewer_i386.deb
$ sudo apt-get install -f
$ wget http://s3.amazonaws.com/wine1.6-2g-2g/wine1.6-2g-2g.tar.gz
$ tar -xzvf wine1.6-2g-2g.tar.gz
$ sudo ./teamviewer-fix-2g.sh

4. Now you can run TeamViewer from Raspberry Pi start menu:

Using TeamViewer for Remote Desktop on Raspberry Pi

5. Setup static password for remote connection in TeamViewer GUI:

Setup unattended access of TeamViewer on Raspberry Pi

Define password on TeamViewer on Raspberry Pi

Remote Desktop on Raspberry Pi using TeamViewer personal ID

Remember the personal ID and password for remote access to RPi using TeamViewer.

Windows PC setup

1. Download and install TeamViewer for Windows from www.teamviewer.com.

2. Run TeamViewer from the start menu, enter your personal ID in the “Partner ID” field and press “Connect to partner” button:

Remote Desktop on Raspberry Pi using TeamViewer. Enter ID.

Enter your personal password in the new pop-up window and log on:

Remote Desktop on Raspberry Pi using TeamViewer. Enter password.

That’s it! You connected to your Raspberry Pi:

Using TeamViewer for Remote Desktop on Raspberry Pi

Using VNC for Remote Desktop on Raspberry Pi

Raspberry Pi setup

1. Install VNC server on Raspberry:

$ sudo apt-get install tightvncserver

2. Start VNC server:

$ vncserver

On the first run, you’ll be asked to enter a password which will be used to access RPi remotely.

3. Check and keep in mind your Raspberry’s IP address

$ sudo ifconfig

and find the string like

inet addr: 192.168.0.109

The last two numbers might vary depending on your network but 192.168 is always there. So, this is your IP address.

That’s it for RPi setup.

Windows PC setup

1. You will need to download and install a VNC client program. For example, you can use TightVNC (tightvnc.com).

2. Run the downloaded file to install TightVNC client and follow the installation instruction:

Using VNC for Remote Desktop on Raspberry Pi. VNC client installation step 1.

Choose “Custom” setup type:

Using VNC for Remote Desktop on Raspberry Pi. VNC client installation step 2.

Using VNC for Remote Desktop on Raspberry Pi. VNC client installation step 3.

Using VNC for Remote Desktop on Raspberry Pi. VNC client installation step 4.

Using VNC for Remote Desktop on Raspberry Pi. VNC client installation step 5.

Now VNC client is installed.

3. Run TightVNC Client from the start menu. In Remote Host field enter: IP address of Raspberry, colon, 1 (in my case it was 192.168.0.109:1 ) and press Connect:

Remote access to Raspberry Pi using VNC

That’s it! You connected to your Raspberry Pi:

Remote Desktop on Raspberry Pi using TightVNC

Unfortunately, this method works only when your PC and Raspberry are located on the same local network. It’s possible to set up VCN connection if PC and RPi are in different networks, but it requires tricky configuration of port forwarding on your router.

Using ssh + X11 forwarding for Remote Desktop on Raspberry Pi

This case doesn’t require any additional package installation on your Raspberry Pi.

On Window PC do the following:

1. Install Xming X Server for Window

2. Run Xming Server

3. Run Putty, enter your RPi IP address, select X11 in the options menu and check the box labeled “Enable X11 forwarding”:

Enable X11 forwarding on Putty for Remote Desktop on Raspberry Pi

4. Login to Raspberry Pi and run GUI of a program:

Using ssh + X11 forwarding for Remote Desktop on Raspberry PiIn case you need the software Exagear Desktop, used in this post, get it here

the original aricle is here