Re: Screensaver Solution Discussion



Hi, I updated the screensaver working process to reflect what I got
recently. Here I didn't detail the pam to make things simplified.

1. After the user A logs in, a gdm's gnome-screensaver (gdm user
session)
process will start. This gnome-screensaver will share the same DISPLAY with 
A's gnome-session.

Note: For every user's session, there will be a gnome-screensaver process running for it.

2. When A's gnome-session tells the session is idle, gnome-screensaver
will start a full-screen window, lock the whole DISPLAY.

Note: gnome-screensaver of the 'gdm' user needs to know the DBUS address of 
user A's gnome-session. Since user A's gnome-session is created by gdm (currently it is
gdm-session-worker), we can find a way to get the DBUS address. And user A's DBus 
session should be allowed to communicate with the gdm process.

3. If a user hits the keys or move the mouse, an unlock dialog will pop up on the 
same display. 

Note: Here we can use the same GUI as that of gdm-simple-greeter, and the same PAM 
backend as that of gdm-session-worker. But we need to set the user name before calling
pam_authenticate for gdm-session-worker.

gnome-session-worker:

Currently gdm-session-worker supports several working states:

SETUP_COMPLETE->AUTHENTICATED->AUTHORIZED->ACCREDITED->SESSION_OPENED->SESSION_STARTED

For gnome-screensaver, we need to add some new states in the state diagram:

SCREENSAVER_SETUP_COMPLETE->SCREENSAVER_AUTHENTICATED->SCREENSAVER_AUTHORIZED.

gdm-simple-greeter:

3a) If VT with GUI support is enabled, gnome-screensaver will ask gdm-simple-greeter to show 
the unlock dialog and login panel on another DISPLAY, and ask VT manager to switch to that 
DISPLAY.

gnome-session of GDM keeps running with a different DISPLAY as the user A's gnome-session. This
DISPLAY is reserved for the system, and the user can not switch to it manually.

Then the user inputs the correct password, GDM tells gnome-screensaver to destroy the window
and release the keyboard and the mouse. Do the VT switching to the user's DISPLAY.

3b) If VT is not enabled, gnome-screensaver will ask gdm-simple-greeter to show the unlock
dialog and login panel on the same DISPLAY. 

For the support of a11y, 
  1) GDM will just launch the gdm-simple-greeter, and not run a new gnome-session. Some relative
     processes should also be started: gnome-setting-daemon, at-spi-registrd, dbus-daemon.

  2) If the gnome-session of gdm can be coexisted with the A's gnome-session, things become simple.
     I'll investigate more about whether two gnome-sessions can share the same DISPLAY or not.

Then the user inputs the correct password, GDM tells gnome-screensaver to destroy the window
and release the keyboard and the mouse.

Jeff
On Mon, 2010-01-25 at 11:02 -0600, Brian Cameron wrote:
> Jeff:
> 
> >> In the case of 3b, GDM will just launch the gdm-simple-greeter, and not
> >> run a new gnome-session.
> > Could we still run a gnome-session for the user 'gdm'? If the gdm's
> > gnome-session is still running, things look simpler.
> 
> It may be possible.  I worry that having two gnome-session processes
> trying to manage the same display might have issues.  But some 
> investigation would be needed to determine exactly what issues exist.
> It is probably possible to make things work this way, but I imagine
> that there would be some work involved to allow multiple gnome-sessions
> to coexist nicely.
> 
> If we find that this approach does not work well, it might make more
> sense to make GDM just launch the login GUI program without gnome-
> session, as I suggested before.
> 
> >>   If it is possible for GDM to run the login
> >> panel, then this should be run to give access to the a11y features (note
> >> that this may require that gnome-settings-daemon be run for the "gdm"
> >> user).
> >
> > I'm not sure what should be done to make GDM GUI show on the same
> > DISPLAY.
> 
> GDM has access to the Xauth keys for each display.  This is all that is
> needed to display a GUI on a display, even if it is running as a
> different user.
> 
> > Since gnome-screensaver has grabbed the keyboard and mouse, it
> > should allows GDM GUI to grab them again. Also GDM GUI needs to cover
> > the gnome-screensaver window. I do not know whether it is easy to
> > implement something like this.
> 
> Is it necessary for gnome-screensaver to grab the keyboard and mouse,
> or can gnome-screensaver make a request for GDM to actually do the
> grabs?  It might be necessary for some handshaking between gnome-
> screensaver and GDM to make this work, including how grabs are managed.
> 
> This is probably not a trivial thing to implement, but I would say it is
> probably easier than doing the work to make gnome-screensaver support
> a11y as well as GDM currently does.
> 
> Brian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]