Monday, July 18, 2011

Enabling VNC on Centos/Redhat

Few of my friends asked how to enable VNC access to Linux servers (RHEL/CENTOS). Therefore, I thought it would be helpful to provide the easiest way I figured out to configure VNC server.

1. open a ssh session to the server

2. vi /etc/sysconfig/vncservers
uncomment  the lines that starts with VNCSERVERS= and VNCSERVERARGS[2]
modify the user ID with the user ID you wish to provide access ("root"). exit vi editor.

3. enter vncpasswd and provide a password for VNC access

4. Start and stop VNC Server so that the xstartup file will get created.
enter vncserver :2 to start VNC Server
enter vncserver -kill :2 to kill the vnc server

5. vi xstartup
uncomment the 2 lines that start with unset SESSION... and exec /etc...

6. enter /sbin/chkconfig vncserver on command to start the service on boot.

7. open a VNC client and enter the <IP>:2 then you'll ask for the password set under step 3. 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.