-----------------------------------------
vnc4server :55
inter password for vnc
vnc4server -kill :55
------------------------------------------
edit xdm parameters:
---------------------------------------------------------------------
xdm
These changes are only required, if your display manager is XDM. If you use GDM or KDM, see the next sections.
Open /etc/X11/xdm/xdm-config with your favorite editor.
Look at the last line : "DisplayManager.requestPort: 0"
Comment it out by inserting a ! at the beginning of the line. File: /etc/X11/xdm/xdm-config
!DisplayManager.requestPort: 0
Edit /etc/X11/xdm/Xaccess and uncomment the line " '* #any host can get a login window" by removing the single quote. You could also change it to 192.168.0.* for some security
(from: http://en.gentoo-wiki.com/wiki/XVNC_Server#xdm )
--------------------------------------------------------------------
edit services for xinetd:
nano /etc/xinetd.d/Xvnc
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/Xvnc
server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vnc/passwd -extension XFIXES
port = 5901
}
if need more ports add these lines to file:
service Xvnc_xx
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/Xvnc
server_args = -inetd :xx -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
port = 59xx
}
for each copy you should use different "xx" ( 10, 11, 12 .....).
---------------------------------------------------------------
/etc/init.d/xinetd restart
but better reboot.
connect by vncviewer :xx