Tuesday, December 28, 2010

How to remotely access the linux desktop from any linux or windows machine?

■ Requirement : How to remotely access the linux desktop from any linux or windows machine
■ OS Environment : Linux[RHEL, Centos]
■ Application: vncserver, vncviewer
■ Implementation Steps : 

1. On server-linux(Which will be accessed) : yum install vnc*
2. On client-linux(who will access the remote desktop of the server ) : yum install vncviewer
3. On server, execute following command  :

$vncpasswd

Set password to access over vnc.

4. Edit /etc/sysconfig/vncservers

VNCSERVERS="1:root"

5. Enable at boot level :

$ chkconfig vncserver on

6. Start VNC server :

$ service vncserver start

7. If firewall present, allow port 5901.

9. Edit /root/.vnc/xstartup and comment following lines :

#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc

10. On client :

Execute command : 

$vncviewer

Enter IP of the server and password of the server. Now remote desktop will appear. OR you can access the rdesktop like :

$vncviewer IP_of_SERVER:1

Access from windows client : 
           To access the server from windows machine please install vncviewer on it and execute the binary. Then put IP of the server and password. that's it.



No comments:

Post a Comment