So, one way to implement this without requiring anything of gdmflexiserver or similar apps would be to check on startup which VT is ours, and then
while running a hack, check occasionally to see if the active VT is
our VT.  If it isn't, or when the user hits the "new login" button,
then throttle, use VT_WAITACTIVE to block until the user returns,
then unthrottle.

Does this seem like a reasonable approach?

That seems reasonable, though I'm not entirely comfortable with the assumption that the VT that is current when xscreensaver starts up is the VT that the X session is running on; if that's not the case for whatever reason (e.g., something earlier in the startup script was being slow, and the user switched VTs to figure out why) the failure mode is not so good.

Another thing that might be a problem (I haven't checked) is whether these ioctls work from unprivileged processes. E.g., xscreensaver cannot use the VT_LOCKSWITCH ioctl (which would be a nice option to prevent VT switching when the screen was locked) because that ioctl can only be called by root (and xscreensaver has long discarded its privs by the time it would want to use it).

--
Jamie Zawinski      [EMAIL PROTECTED]                  http://www.jwz.org/
                    [EMAIL PROTECTED]      http://www.dnalounge.com/
                                         http://jwz.livejournal.com/




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to