configure it:
Edit /etc/sysconfig/vncservers and add this 2 lines:
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600"
From a cmd prompt enter "vncserver" it will ask to
seupt a password.
Type "killall Xvnc" to stop the server for now.
This creates the directory .vnc in the /root folder.
The default desktop for the VNC Server is "TWM", though
most people are used to KDE or Gnome instead. Here is how to
change it:
Gnome is usually the default X installed on Centos.
1. Edit ~/.vnc/xstartup
2. For KDE, replace "twm &" with "startkde
&"
3. For Gnome, replace "twm &" with "exec
gnome-session &"
The line should look like this:
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"
& exec gnome-session &
4. Kill any existing VNC servers with "vncserver -kill
:xxx" where xxx is the display number.
5. Start a new server.
Starting it:
"service vncserver start" or
just "vncserver"
Here is how to start it. just open a terminal window and type
"vncserver"
it will start an instance on port 5901. to shut it down you
can do
"killall Xvnc"
You may also start it automatically on startup by setting:
"chkconfig vncserver on"
You need to connect to ipadd:1
if it does not connect you may have to add a line to the firewall
(/etc/sysconfig/iptables) and restart it.
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j
ACCEPT
NOTE: if the console is logged in you will get a bunch of errors
of applets not able to start.
DO NOT DELETE the ICONS when it ask you if you want to.
|