Control your home IoT: Remotely and Graphically

Control your home IoT: Remotely and Graphically
VNC IoT RaspberryPi

In the “Control your home IoT”, the configuration steps for controlling the home IoT system remotely, are described. In this post I will describe how to control your system graphically!

The main steps for this installation is the same as previous post, including: installing TOR and configuring hidden service.

Here I will describe remote connection using VNC. VNC stands for Virtual Network Computation and is a protocol for graphically control remote servers. Also there is a nice web GUI for VNC named noVNC. I will describe installing vnc4server as VNC server and noVNC.

Installing vnc4server

In this step, just install vnc4server in your home IoT Raspbian:

IoT Raspbian with VNC
IoT Raspbian with VNC
$ sudo apt-get update
$ sudo apt-get install vnc4server

Then start the vnc4server using vnc4server command:

$ vnc4server

Then the vnc4server asks you to provide a password with maximum 8 characters.

Starting vnc4server
Starting vnc4server

Installing noVNC

noVNC can be installed using apt-get. You may check this link for more documentation.

Installing noVNC
Installing noVNC
$ sudo apt-get install novnc

But I prefer launching by their code in GitHub. The commands are from this link.

$ echo y | sudo apt-get install git websockify<br /><br /><br /><br />

$ git clone git://github.com/kanaka/noVNC

Launch without WSS/SSL support:

$ ./noVNC/utils/launch.sh --vnc [IP]:[PORT]

Launch with WSS/SSL support:

$ ./launch.sh --cert /path/self.pem --vnc [IP]:[PORT]

Cloning noVNC
Cloning noVNC

And Voila! Everything is ready for fire up. Place 127.0.0.1 as IP and 5901 as PORT in the above commands.

$ ./noVNC/utils/launch.sh --vnc 127.0.0.1:5901
Starting noVNC
Starting noVNC

As you see, it will accept port 6080 from browser and will proxy the input commands to the vnc port (5901).

If you have forgot to start vnc4server, you should start it.

If you forgot the password for vnc, you can reset it by typing vncpasswd in terminal.

The final step is to add TOR hidden services.

I will add the following line to the previously configured torrc file and restart tor:

HiddenServicePort 80 127.0.0.1:6080

The sequence for remote desktop service is as follows:

IoT Raspbian with VNC - Connection Sequence
IoT Raspbian with VNC – Connection Sequence

Every thing is OK. Just start Tor Browser in anywhere and type your hostname (check how to create Tor hidden service in previous post) in Tor Browser.

IoT Raspbian with VNC - noVNC
IoT Raspbian with VNC – noVNC

After pressing Connect button, you should insert password:

IoT Raspbian with VNC - Password
IoT Raspbian with VNC – Password

And if the password is correct, you have accessed remote desktop with VNC.

IoT Raspbian with VNC - Done
IoT Raspbian with VNC – Done

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *