logging out WM from VNC

Tristan Richardson tjr "at" orl.co.uk
Wed, 08 Apr 1998 17:11:11 +0000


> Are there ways to prevent users to logout from the
> window manager so that subsequent users can run
> VNC with nice window manager for their X sessions.

You could put a while loop around the command to start the window manager in
the xstartup script, e.g.:

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
while twm; do
  sleep 1
done

This does however rely on the window manager exiting with zero (success) when
shut down cleanly and non-zero when dying because Xvnc has been killed.

Cheers

Tristan

+--------------------------------------------------------------------+
|  Tristan Richardson                 Email:  tjr "at" orl.co.uk          |
|  ORL                                  Tel:  +44 1223 343000        |
|  24a Trumpington Street               Fax:  +44 1223 313542        |
|  Cambridge, CB2 1QA, UK               WWW:  http://www.orl.co.uk/  |
+--------------------------------------------------------------------+
|          ORL - The Olivetti & Oracle Research Laboratory           |
+--------------------------------------------------------------------+