Building a headless linux box : Part 3


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:

x11vnc -storepasswd

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.

Previous Posts:

Building a headless linux box : Part 1

Building a headless linux box : Part 2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s