Xvnc -once
Tristan Richardson
tjr "at" orl.co.uk
Wed, 08 Apr 1998 17:06:23 +0000
> i'm starting Xvnc from xdm using the following line in Xservers:
>
> :1 local /usr/X11R6/bin/Xvnc :1 -desktop 'X' -httpd
> /usr/share/vnc/classes -rfbw
> ait 120000 -rfbauth /root/.vnc/passwd -rfbport 5901 -fp
> /usr/X11R6/lib/X11/fonts
> /misc/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/Type1/,
> /usr/X11
> R6/lib/X11/fonts/75dpi/ -geometry 800x600 -once
>
> the -once switch doesn't seem to work, at least not i think it's
> supposed to..i believe it's supposed to shutdown the x server after i
> close the vnc connection, but when i close the vnc connection, the x
> server doesn't die and i'm able to open resume the x session by starting
> another vnc session..
> what i want to be able to do is connect to the x server, login via xdm
> and have the x server die when i either log out of x or when i close the
> vnc session..
The -once switch doesn't affect what happens when a VNC viewer connects or
disconnects. To do what you want, you need to add code to quit the X server
in Xvnc/programs/Xserver/hw/vnc/rfbserver.c at then end of the function
rfbClientConnectionGone() - I think calling GiveUp() will do it.
However, what you're doing in some ways goes against the spirit of VNC. One
of the benefits of VNC is avoiding the need to keep starting up and shutting
down applications and desktops. In an ideal world you just have a single
desktop all the time and can use VNC to access it from wherever you are.
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 |
+--------------------------------------------------------------------+