In our previous post, we saw how to setup access to linux box files using SAMBA. In this post, we will setup remote desktop access in case if you are more comfortable using the GUI or for some GUI related actions.
In order to setup remote desktop access, we need to install VNC server on our linux box. So, fire up PuTTY and log into linux box and run the following command to install VNC server:
sudo apt-get install x11vnc vnc-java
Once installed, we need to secure our access to the box via VNC by creating a password. This password will prompted by the VNC client software while connecting. Create a password using the command:
By default VNC server runs on port 5800 and 5900. So, if you are going to access it from outside your network, make sure you open up the ports on your router.
Next, run the following command to start the VNC server:
x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800
Once the server is running, using a VNC client like (TightVNC, RealVNC) connect to the linux box using the hostname and password. Once connected you should be able to see your linux desktop and perform actions as if it was the actual desktop.
The command to start the server should be added to startup commands so that the VNC server starts everytime the machine reboots. On Debian system, you can add the command to /etc/rc.local file. For other distro, please check up with their manual/website.
That’s all for now folks, in the next post we shall see how to setup a web server, ftp server for web development.