Why the pitunnel through VNC? A collaborative workspace enhances learning.
Aim of this chapter: setup VNC access through the pitunnel so that other class participants can login and use a graphical IDE or command-line editor.
Register for the free or paid version of pitunnel.
Setup a pitunnel for VNC access to your RPi.
From the “Installation” link in pitunnel you should get a command similar to this that starts with the curl command and ends with the ‘&’ character.
Next you will have your RPi initiate at tunnel through the firewall.
Go to custom tunnel as shown below.
The button above labeled “Create Custom Tunnel” sends the user to a new window for creating the custom tunnel using the command-line.
See note below;
Port 5900 is used for VNC.
For tunnel name use VNCtunnel.
pitunnel --port=5900 --name=VNCtunnel
Paste and run the command similar to the above that was produced for your RPi to initiate the tunnel through the firewall.
Pressing Ctrl-C will stop this tunnel and return the command prompt. If you wanted to keep it running but still need a command prompt then just open another terminal.
Alternatively start the tunnel in the background using the following advanced Linux technique.
Note: To get the command prompt back press enter twice.
Under Custom Tunnels pick up the IP:port used for the VNC.
In this example, pitunnel.com:54713
Within the VNC client use the IP:port that you got from the pitunnel.
Next, for temporarily sharing your pitunnel-VNC-desktop with collaborators change your password to binf.123 (or similar).
Share the IP:port pitunnel.com:54713
Share the password binf.123
Share through email or chat window.
After the collaboration is completed reset the password and turn off the pitunnel.
If pitunnel is running in the foreground of the terminal then use Ctrl-C. if it was started in the background you can reboot to turn off the pitunnel.
What if you started pitunnel in the background but you do not want to reboot to turn off the pitunnel?
Ask the instructor how to find and stop a running process in Linux.