VNCserver – Linux graphical desktop sharing

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.

~

jonboy60

I’m a Malaysian, my name is Jon Loh (jonboy60) living in Kuala Lumpur and working in Petaling Jaya, Malaysia. Jonboy60.com is a blog magazine about Linux and other open source softwares. All about to a daily jobs or real life experiences I had since the year 2002 administrating Linux and Windows server in a hosting company. Basically i will be offering Linux tips, howto, tricks, latest news and tutorial. Contact Me for Career opportunities, business offers, Linux solutions for business or home, web and email server solutions, Linux consulting and expertise requests. Email to me on jonboy60{@}gmail.com. The site I’m running is VenCouture.com – Malaysia Online Fashion Shopping Boutique, VenCouture. We sell fashion clothes, sexy lingeries, baby clothing and etc.

More PostsWebsite

Follow Me:
TwitterFacebook

3 thoughts on “VNCserver – Linux graphical desktop sharing

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

*


3 − 1 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge