VNC Installation In Linux
What is VNC? - A practical introduction
VNC stands for Virtual Network Computing. It is, in essence, a remote display system which allows you to view a computing 'desktop' environment not only on the machine where it is running, but from anywhere on the Internet and from a wide variety of machine architectures.
The VNC system allows you to access the same desktop from a wide variety of platforms.
Many of us, for example, use a VNC viewer running on a PC on our desks to display our Unix environments, which are running on a large server in the machine room downstairs.
(What is VNC? A practical introduction - taken from http://www.uk.research.att.
Obtaining VNC
VNC is freely available from the official VNC homepage: http://www.uk.research.att.
If you prefer to use the command line as opposed to a GUI for installation, run the following command from your Linux CLI. When run, this command will download the RPM package to your current working directory. The file is 700k approx:
Code:
$ wget http://www.realvnc.com/dist/vnc-3.3.6-2.i386.rpm
The Installation
Installing from RPM is straightforward enough, simply run the following command:
Code:
$ rpm vnc-3.3.6-2.i386.rpm -i
To start VNC server, at the command prompt type:
Code:
$ vncserver
You will need to edit the configuration script found in $home/.vnc/xstartup. Any standard text file editor such as vim, emacs or pico will suffice. For Gnome:
Code:
xrdb $HOME/.Xresources xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
Code:
xrdb $HOME/.Xresources xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm & startkde &
You should also understand how to kill existing desktops, shutting VNC down. To do this, you should type vncserver -kill :1 at the CLI, where 1 is the desktop you wish to kill off.
That's it. VNC should now be successfully setup on your system. The last piece of information you need is the ports VNC uses. For the VNC viewer, 5901 is used by default, and for java based VNC access, 5801 is used. You will need to add rules to your firewall to allow traffic into either or both of these port numbers.
Check If VNC is running
You can check at anytime to see if you have a VNC server currently running. To do so, I recommend that you use netstat a tool designed to give you information about what ports are listening for connections on your machine. The following output is an example of what you can expect to see from a netstat command. The important part of this output is highlighted in bold:
Code:
[root@server root]# netstat -an | more Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State Tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN Tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN Tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN [root@server root]#
The VNC Viewer
From within you X desktop, you will have access to a VNC viewer, which you may use to remotely control other machines. To access this, open a command terminal, and type in vncviewer. You will be prompted for an IP address to connect to. Enter this, and click ok. You should now have remote control of another PC.
Troubleshooting VNC installations
For troubleshooting, remember that most answers can be found lurking inside your favourite search engine. As the first port of call, I would recommend that you see the following URL:
http://www.uk.research.att.
Drop to a command prompt, and run: "iptables -L". If the firewall is really off, then you should see:
Code:
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
No comments:
Post a Comment