Luc Pauwels

Running Xvnc from inetd

Xvnc has built-in support to run from inetd. If a user points his vncviewer to a certain port on the server, a VNC-based xdm session will automatically be launched.

Sample /etc/services entry:

vncsmall    5950/tcp    # 800x600x24
vnclarge    5951/tcp    # 1024x768x24

Sample /etc/inetd.conf entry:

vncsmall    stream  tcp  nowait  nobody  /usr/local/bin/Xvncinetd Xvncinetd 800x600 24
vnclarge    stream  tcp  nowait  nobody  /usr/local/bin/Xvncinetd Xvncinetd 1024x768 24

Sample /usr/local/bin/Xvncinetd wrapper script:

#!/bin/sh
/usr/local/bin/Xvnc -inetd -query localhost -once -geometry $1 -depth $2

Two final remarks: