[Pkg-utopia-maintainers] Bug#520720: Bug#520720: gnome-power-manager: Stopped working after consolekit upgrade)

Yves-Alexis Perez corsac at debian.org
Wed Apr 29 06:31:53 UTC 2009


On mer, 2009-04-29 at 08:14 +0200, Michael Biebl wrote:
> > 
> > I aggree. I mean, libpam-ck-connector should _only_ sets the variable if
> > it's indeed an XDG_SESSION. I mean, only if the user logged in through a
> > CK-enabled DM. (I didn't yet test with slim and libpam-ck-connector
> > activated but I guess it won't work either). Those are the problematic
> > ones. I don't know if libpam-ck-connector can detect that they already
> > have a CK session, but that would make a lot more sense.
> 
> Sorry, I do not quite understand what you mean by that. Maybe you can
> elobarate.

Ok, see below.
> 
> First, let me try to explain a few things:
> 
> 1.) libpam_ck_connector is setup in common-session with the nox11
> option. That means, a login via a login manager (e.g. gdm) will not
> create a CK session.

Ha, that's fine, so slim will work.

> So basically, what libpam_ck_connector is good for, is for logins on the
> console. After a login on the console, XDG_SESSION_COOKIE will be set.

I don't really know why?
> 
> 2.) gdm and kdm directly talk to CK to create a CK session and set the
> XDG_SESSION_COOKIE within the user session.

Ok.

> 
> 3.) /etc/X11/Xsession.d/90consolekit creates a CK session, if
> XDG_SESSION_COOKIE is not yet set. The check is there, to avoid creating
> to CK session cookies: one by the (g|k)dm login manager, and the other
> one from 90consolekit (libpam_ck_connector is not involved in graphical
> login, unless you explictely change the pam configuration)
> 
> This is for users of a login manager, that does not directly talk to CK,
> but uses the standard Xsession integration (I think slim would be such
> an example).
> 
> If you are using plain startx from the console and XDG_SESSION_COOKIE is
> not yet set, it should work, too.

The I just fail to see why libpam-ck-connector from oustide of X creates
the XDG_SESSION_COOKIE. What is it used for?
> 
> 4.) There is a tool called ck-launch-session, which enables to register
> a CK session (and sets the XDG_SESSION_COOKIE env var). This tool is
> used in 90consolekit and might also be useful for custom startxfoo
> scripts which do not use Xsession.d.

Yup.
> 
> To properly address this issue, I think we should first define, which
> use cases we want to support:
> 
> 1.) login via login manager (should work out of the box, gdm/kdm by
> directly talking to CK, other login managers by utilizing Xsession.d)

Yes.
> 
> 2.) login on the console (covered by libpam_ck_connector)

Yes (but afaict we don't need XDG_SESSION_COOKIE)
> 
> 3.) login on the console + startx (currently fails, because of the "if [
> -z "$XDG_SESSION_COOKIE" ]" check in Xsession.d/90consolekit. Should be
> fixable though, e.g. by letting libpam_ck_connector set a env var like
> XDG_SESSION_CONSOLE, which we can test for in 90consolekit.

Yes, that would be really nice. This case is the one I'm worry about.
> 
> 4.) login on the console + startx /path/to/(session|window)-manager
> Currently fails, because the Xsession.d integration is not used.
> No idea yet, how to address this
> 
> 5.) login on the console + startxfce4 (or whatever other X startscripts
> are out there). From what I read, this also doesn't use the Xsession.d
> integration.
> Again, no concrete idea yet, how this should be addressed.
> One idea is, that such an start script calls ck-launch-session itself.

Imho, we (the desktop environment people, not you) handle 4 and 5. I'll
add a documentation in xfce4:README.Debian and xfce4-utils:README.Debian
saying that if one wants the Debian bits he has installed (CK,
ssh-agent, gpg-agent, dbus whatever) he should use the “.xsession” way,
putting there “exec startxfce4”.

If he do otherwise (startxfce4 or startx /usr/bin/startxfc4 or
startx /usr/bin/xfce4-session) he'll have an Xfce session but not a
complete desktop experience (which some people may not want anyway)

Basically, I think I'd be fine with libpam-ck-connector not using
XDG_SESSION_COOKIE when it's in console mode (nox11) because it doesn't
really make sense.

Cheers,
-- 
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20090429/4e4a477a/attachment.pgp>


More information about the Pkg-utopia-maintainers mailing list