How To Setup Linux VNC Server In 3 Minutes
VNC server works similar to Telnet or SSH daemon, except that it allows VNC clients running on diverse OS platforms to remotely access Linux Desktop Manager of the server itself, rather than the TTY text-based console!
As such, most of Windows-to-Linux users prefer using VNC server than SSH daemon, who are generally favor on the vivid Desktop Manager (either KDE or Gnome) than the cold black-and-white TTY console!
For the newbie (as myself), here is my another 3-minute Linux guide about How to setup VNC server in Red Hat Enterprise Linux?
Though this Linux-VNC guide is tested on Redhat Enterprise Linux 4, it served the general guide of installing VNC in Linux distributions.
How to get KDE or Gnome Desktop Manager running in Linux VNC server?
Don’t worry, it’s just a 3-seconds Linux trick! Edit the default VNC server startup scripts $HOME/.vnc/xstartup and un-remark the two “critical” lines, as per the scripts suggestion:
Isn’t easy to setup and configure Real VNC in Linux, particularly with Red Hat Linux?
Howto, Linux, Linux, Remote Desktop, VNC, VNCPasswd, VNCServer, Xvnc
» Configure VNC Server To Auto Start Up In Red Hat Linux
» How To Restart VNC Server After VNC Service Hangs or Stops Unexpectedly?
» How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?
» Red Hat Linux 5 Man Page Displays Weird Characters
» How To Create Putty-based RSA Public-key For OpenSSH Server?
» How To Regenerate Putty-based RSA Public-key From Its Private-key?
» How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux
« How To Change User Agent String
» How To Write Chinese Text In Windows Vista
As such, most of Windows-to-Linux users prefer using VNC server than SSH daemon, who are generally favor on the vivid Desktop Manager (either KDE or Gnome) than the cold black-and-white TTY console!
For the newbie (as myself), here is my another 3-minute Linux guide about How to setup VNC server in Red Hat Enterprise Linux?
Though this Linux-VNC guide is tested on Redhat Enterprise Linux 4, it served the general guide of installing VNC in Linux distributions.
- Locate the vnc-server-4.0-8.1.rpm package from the Red Hat Linux installation CD or download the latest free version of VNC server from Real VNC.
- Install the rpm package of VNC server:
rpm -Uvh vnc-server-4.0-8.1.rpm
- VNC server is using different set of login authentication than the Linux /etc/passwd. Meaning that, you have to create VNC login password for individual Linux login accounts who are granted remote access with VNC client.
To create VNC login password, just executevncpasswdcommand and enter a valid password twice as usual.
- Unlike VNC server for Windows, each user account can run more than one VNC servers in Linux.
To start an instance of VNC server, just executevncservercommand, which will create the $HOME/.vnc directory with VNC default startup scripts inside (if $HOME/.vnc is not currently exists).
- The
vncservercommand will startup a VNC server that open 3 next available TCP/IP port, starting from 5801, 5901, and 6001 respectively.
Port 5801 is for VNC client connection over HTTP protocol, port 5901 is for VNC client connection over RFB protocol, and port 6001 is to allows X applications to connect to the VNC server. The lsof or netstat command will able to show the network port opened by Xvnc server.
By executingvncserverfor the second time or execute thevncserver :2command, this will startup VNC server that bind and listen to port 5802, 5902, and 6002 respectively.
To connect to Linux VNC server over HTTP protocol, just typewalkernews.net:5801(replace walkernews.net with your VNC server IP/hostname) at any javascripts-enabled web browser, such as Mozilla Firefox, Opera, or Internet Explorer.
To connect to Linux VNC server over RFB protocol, just typewalkernews.net:5901at the VNC client.
- To kill the VNC server in Linux, just execute
vncserver -kill :1will kill the first VNC server that bind and listen to port 5801, 5901, and 6001. Thevncserver -kill :2will kill the second VNC server, and so on.
How to get KDE or Gnome Desktop Manager running in Linux VNC server?
Don’t worry, it’s just a 3-seconds Linux trick! Edit the default VNC server startup scripts $HOME/.vnc/xstartup and un-remark the two “critical” lines, as per the scripts suggestion:
#!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
Isn’t easy to setup and configure Real VNC in Linux, particularly with Red Hat Linux?
Howto, Linux, Linux, Remote Desktop, VNC, VNCPasswd, VNCServer, Xvnc
» Configure VNC Server To Auto Start Up In Red Hat Linux
» How To Restart VNC Server After VNC Service Hangs or Stops Unexpectedly?
» How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?
» Red Hat Linux 5 Man Page Displays Weird Characters
» How To Create Putty-based RSA Public-key For OpenSSH Server?
» How To Regenerate Putty-based RSA Public-key From Its Private-key?
» How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux
Custom Search
![]() |
» How To Write Chinese Text In Windows Vista

























Correction:
In order to connect VNC server over HTTP protocol, the web browser should be java-enabled and the correct URL should be
http://walkernews.net:5801(replace walkernews.net with your VNC server IP/hostname)The HTTP:// prefix is a must, or you won’t get the VNC server authentication prompt!
[...] your powerful Core 2 Duo home Desktop running Windows Vista Ultimate is not possible to access the Red Hat VNC server over the RFB [...]
If you’re connecting Linux VNC server from Windows VNC Viewer (the client), the working connection string with specific port is
walkernews.net::5901and not
walkernews.net:5901spot the difference
Excellent How-To! Saved me loads of time faffing about – much appreciated :o))
[...] year, I wrote a post on how to configure VNC server in Red Hat Linux system. But, that 3-minutes setup guide doesn’t mention about how to auto start VNC server when [...]
[...] restart that bloody machine. Worst still, simply reboot the machine might not able restart the VNC server. So, what could you do in order to get the VNC server back to work? Precisely, if you can’t [...]
Thank you very much WALKER……….like u said…..Exactly in 3 minutes……..
Thanks for saving another one week…………
it didnt work for me in 3 minutes what the bloody hell?