Unsolved

This post is more than 5 years old

281 Posts

2710

October 22nd, 2009 11:00

Enabling VNC Access to Linux

While setting up my Linux VM in CaaS, I thought I'd share how I enabled VNC access.

I did this on CentOS 5.3.  Should work the same for RHEL 5.3 too.

1) When SSHing into your VM, port forward 5901 for VNC access:

ssh -L5901:localhost:5901 root@your.host.emccis.com



2) Configure the VNC server
vi /etc/sysconfig/vncservers
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -nohttpd -localhost"


3) Set up your VNC password
vncpasswd


4) If you want a full gnome session, change your startup
vi ~/.vnc/xstartup
(remove all commands and replace with gnome-session)


5) Start the VNC server
service vncserver restart


6) Make VNC start at boot
chkconfig vncserver on


7) on your local system, connect to the VNC server
vncviewer localhost:5901
No Responses!
No Events found!

Top