Saturday, March 14, 2009

On demand VNC server with GDM

Each user can login (via ssh) to *nix server and start vncserver. Then he can login to X11 desktop via VNC viewer with defined vnc password. But it's far far away from nice solution. Much better solution is to setup vncserver as xinetd service.

First of all you have to define new service in particular port. Add line bellow into /etc/services
vnc1024         5901/tcp                        # VNC & GDM
now create service description for xinetd. Go to directory /etc/xinetd.d
cd /etc/xinetd.d
and create file vnc1024
service vnc1024
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024x800 -depth 16 -once -fp unix/:7100 -securitytypes=none
Move to runlevel 3
init 3
Restart xinetd
Move back to runlevel 5
init 5
And that's it. Now try connect via VNCviewer to port 6901

No comments: