Centos 6.6 VNC install
I am having so many problems doing a Windows guest install
on my KVM host server, which is headless, I figured I would install Gnome on it
and VNC. I have another article on the Gnome install. Please see that article
if you don’t have a desktop on your server.
I am doing this on my KVM host server logged in as root
Install VNC packages
# yum install tigervnc-server
# yum install xorg-x11-fonts-Type1
Make sure VNC starts on boot
# chkconfig vncserver on
Now set your VNC password
# vncpasswd
Now create a connection so the VNC clients can connect to your
VNC server
# vi /etc/sysconfig/vncservers
Add the following to the end of the file: **NOTE: Use a regular
user account name here, not root user
VNCSERVERS="1:your_user_name_here"
VNCSERVERARGS[1]="-geometry 1024x768"
If you need to add another user then do so. Make sure you use a
different VNCSERVERS= number and the other users name, like
VNCSERVERS="2:another_user_name_here"
VNCSERVERARGS[1]="-geometry 1024x768"
If you use iptables then do the following to allow VNC traffic
# iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp -m
multiport --dports 5901:5903,6001:6003 -j ACCEPT
# service iptables save
# service iptables restart
Now actually start the service
# service vncserver restart
If you get an error like "getpassword
error: Inappropriate ioctl for device" then try the following.
Login or ssh to the server as the user and run the “# vncpasswd “
command from the users home dir.
Once you can start the service without an error continue.
# vncserver -kill :1
Now from the users home directory do this to run the Gnome
desktop
# vi .vnc/xstartup
Comment the last line and add the “exec gnome-session &” line at
the bottom
#twm &
exec gnome-session &
Restart service again
# service vncserver restart
Now put the VNC client on your PC or Linux desktop and connect
using:
Name:1 or serverIP:1
No comments:
Post a Comment