I'm implementing a remotedesktop access to a server thru xvnc/xinetd/gdm.

I'd like many users to connect to that server using vnc (thus providing the gdm login screen) and want that if the xvnc session is closed, it would 'xlock' the session so next time user connects it will resume his session.

Tried several parameter tweaks, but unfortunately each time the vnc viewer is closes, the X session is also destroyed.

Help/clues would be really appreciated.