These instructions explain how to view and control your Debian Linux PC’s graphical desktop from a remote location using TightVNC Viewer. TightVNC Viewer is free and can be installed on Windows, Mac OS X and Linux computers.
While tightvncserver can be installed on a Raspberry Pi running the Raspbian OS, we suggest that you use the RealVNC Server pre-installed on the latest versions of Raspbian.
Summary: Install tightvncserver on your Debian Linux PC to allow a network connection to the PC's graphical desktop from a Windows, Mac, or Linux PC running TightVNC Viewer. Next, you’ll learn how to configure a remote.it Service that is compatible with tightvncserver so that you can easily connect to your PC's GUI from outside of your local network.
- Devices: Any Debian Linux PC, including Raspberry Pi running the Raspbian operating system.
- Clients: Windows, Mac OS/X or Linux running TightVNC Viewer.
Installing the tightvncserver Virtual Network Console service on your Raspberry Pi
In a terminal window on your Linux PC, run the following commands:
sudo apt-get update
sudo apt-get install tightvncserver
Next, launch tightvncserver with the command:
tightvncserver will launch and ask you for a password, which you will use later for connection. You may also enter a different read-only password which will let you view the Linux PC’s graphical desktop but not interact with it.
Next, confirm that tightvncserver is in fact running with the command:
ps ax | grep tightvnc
Next, check which port tightvncserver is listening on with the command:
sudo netstat -lpn | grep tcp
This command will show all currently active tcp listeners (servers) running on your Linux PC. Look for Xtightvnc in the list. There may be more than one entry. If so, choose the one with the lowest port number. In the example shown below, that is port 5901. Make note of this port number as you will need it in the next section where you will be adding the remote.it Service Attachment.
Adding a remote.it Service Attachment for tightvncserver
Run the remote.it configuration script:
At the Main Menu, install a new remote.it Service Attachment for VNC using the default port of 5901. If the actual port in use is not 5901, you will have the opportunity to change this during the installation.
When you’ve successfully installed tightvncserver and the remot3.it tightvncserver Service Attachment, the Main Menu will include an entry for Xtightvnc as shown above.
Making a VNC connection using remote.it
To connect, sign in to your remote.it account and locate the device. Click on the highlighted Device Name to open the Device Services dialog:
Now click on the name of the Service you just installed in the Device Services List.
Click on the service name to initiate the connection. In a few seconds you’ll see a dialog box similar to this:
For Option 1:
Close the menu by clicking the “X” in the upper right corner. You may see a dialog asking whether you wish to allow Flash to run. You should allow Flash to run. Next, enter your VNC password and click on “Send” to continue.
For Option 2:
Click on the link provided in the second option, which will open a Safari Window. Allow Screen Sharing to occur. Enter your VNC password when prompted.
For Option 3:
Start the TightVNC viewer application, then copy and paste the address from the remot3.it dialog option #3 to the “Remote Host” field as shown below. Now, click on “Connect”.
When you see the VNC Authentication dialog, enter your VNC password and click on “OK” to continue.
Now you are controlling your Raspberry Pi’s GUI!