Posts Tagged ‘install vncserver linux’



Install VNCserver on linux (Remote desktop linux)

Tuesday, October 28th, 2008

Windows can be connected using Remote Desktop, linux users can connect to shell (ssh) using ssh clients like putty. Now, what if you need to view linux gnome desktop and that too remotely? Yes, this is possible with VNC ( Virtual Network Computing ) server. I will show you how to install it on centos.

You’ll need gnome desktop environment – if it is not installed on your system you can get it installed using yum; the commands are:

root# yum groupinstall "X Window System"
root# yum groupinstall "GNOME Desktop Environment"

If you get any errors about dependencies, I am sure you know how to get those packages installed.

Now, the VNC server is installed with the X Windows system. We will configure the VNC server now:

Edit the /etc/sysconfig/vncservers file with your favourite editor and uncomment the following two lines:

VNCSERVERS="5:root" # display port and username
VNCSERVERARGS[2]="-geometry 800×600 -nolisten tcp -nohttpd -localhost"

Set password to VNC Server

root# vncpasswd

Edit the local config file in the root folder:

nano ~/.vnc/xstartup
Replace "twm &"   with "gnome-session &"

To start VNC server issue command

root# vncserver :5

To stop VNC server issue command

root# vncserver -kill :5

Connecting with VNC client

Start VNC Server by issuing the command

root# vncserver :5

Open your favourite VNC client and type your server’s IP followed by the port number

xxx.xxx.xxx.xxx:5 (where xxx.xxx.xxx.xxx is the IP)

5 is the port set within the /etc/sysconfig/vncservers file

VNC login

Enter your servers password and access the linux remote desktop.

VNC authentication

Here is your remote desktop

VNC server

Did this post help you? please leave your feedback for us.