VNC stands for Virtual Network Computing. It was originally developed by AT&T as a way to administer machines without using the console. If you have used Windows Terminal Services (RDP), VNC will seem very familiar.
VNC is platform-independent – a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system. Multiple clients may connect to a VNC server at the same time.
Configuring vncserver is very easy. But the default desktop view in vncviewer is gray scale desktop with a very low GUI. To view normal Gnome or KDE desktop in vncviewer, assigning a custom port for usage, user configuration and to adjust the resolution of the vncviewer window need to be configured properly.
1) Installing Vncserver:
$ yum install vnc-server
or
$ sudo apt-get install vnc4server xinetd
2) Setting vnc password:
$ vncpasswd
3) Configure vncserver:
$ vi /etc/sysconfig/vncservers
modify this:
VNCSERVERS=”3:jonboy60″
VNCSERVERARGS[3]=”-geometry 1024×768″
or
$ nano /etc/xinetd.d/Xvnc
modify this:
server_args = -inetd :3 -query localhost -geometry 1024×768
4) Testing command:
$ service vncserver start
or
$ vnc4server
You will get output like : domainname.localhost:3.log
Then you need to stop it by:
$ service vncserver stop
or
$ vnc4server -kill :3
5) Edit ~/.vnc/xstartup (~ is your user home directory)
$ vi /home/jonboy60/.vnc/startup
Then uncomment the below two lines for normal desktop
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
into:
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
For gnome please add “startx &” onto the last paragraph.
For kde please add “startkde &” onto the last paragraph.
* As for ubuntu, change the permissions on the /etc/X11/xinit/xinitrc file to make it executable:
$ sudo chmod 755 /etc/X11/xinit/xinitrc
6) Start vncserver by command:
$ service vncserver start
or
$ vnc4server
* please enable port 5903 (because i’m using :3) and 6001 on your firewall
7) Log on to vnc via command:
$ vncviewer domainname.localhost:3
Via rdp:
Select vnc protocol, then type in domainname.localhost:3 and connect.
Provide the password that you chose in Step 2.
* auto startup when server boot up by:
$ chkconfig vncserver on
By default, VNC is not a secure protocol. While passwords are not sent in plain-text (as in telnet), brute-force cracking could prove successful if both the encryption key and encoded password are sniffed from a network. For this reason it is recommended that a password of at least 8 characters be used.
~


Nice brief and this fill someone in on helped me alot in my college assignement. Thank you for your information.
Good brief and this post helped me alot in my college assignement. Gratefulness you on your information.
Nice post and this post helped me alot in my college assignement. Thanks you as your information.