[Xfce4-commits] <xfce4-session:master> Reuse existing ConsoleKit sessions (bug #6685).

Jannis Pohlmann jannis at xfce.org
Thu Sep 9 10:29:14 CEST 2010


Hey,

On Thu, 9 Sep 2010 00:10:16 +0200
Mike Massonnet <mmassonnet at gmail.com> wrote:

> 2010/9/8 Yves-Alexis Perez <corsac at debian.org>:
> > On 08/09/2010 22:06, Mike Massonnet wrote:
> >
> >>> Now, with the change above, I can't do any of these things.
> >>> xfce4-session-logout only offers Logout, reboot and halt are
> >>> disabled. Also mounting my USB stick doesn't work with this
> >>> change.
> >>>
> >>> I don't use any display manager, just plain console login as in
> >>> good old days.
> >>
> >> I can second that. Now i can see only one CK session, so the patch
> >> works as intended. But I'm not able to shutdown/reboot or mount
> >> with gvfs-mount and this if I log in through a tty using
> >> startxfce4.
> >>
> >> I don't see why I have to use startx or add polkit configuration
> >> files, really startxfce4 should just work<tm>!
> >
> > Because you're just reinventing the wheel.
> 
> Well, startxfce4 used to work, it can keep doing this.
> 
> Plus Xsession.d/xinitrc.d directories are distro specific AFAICT.
> 
> >> [1] NB: when using the pam_ck_connector plugin I have
> >> automatically an XDG_SESSION_COOKIE variable set and a ck-session
> >> open (seen with ck-list-sessions) but when reusing this session
> >> nothing was working inside X, perhaps it has to do that the info
> >> for x11-display was empty as displayed by ck-l-s...
> >>
> > I don't know on other distros, I have to admit. But the exact same
> > problems arise when ConsoleKit was introduced in Debian, and fixes
> > were already provided for the CK startup scripts (where the fixes
> > really belong imho).
> >
> > See http://molly.corsac.net/~corsac/90consolekit if you don't have
> > it on ArchLinux.
> 
> Nice reading, I was interested in this file and the script shows that
> it ignores the CK session opened within a tty.
> 
> The other question is, why is the session opened by xfce4-session not
> working when one logs in through a tty? Unless we can't figure this,
> the hack to spawn ck-l-s from the xinitrc script is an almost decent
> solution.

No, it's not. We need to figure out how to do this correctly. 

If you look at the source code of ck-launch-session on

  http://cgit.freedesktop.org/ConsoleKit/tree/tools/ck-launch-session.c

you will see that it calls ck_connector_open_session(), which is
essentially the same thing xfce4-session is trying to do when
XDG_SESSION_COOKIE is not set (=> open a new session). If
XDG_SESSION_COOKIE is set, then I think this session should be reused.

I'll take another look at the code and hopefully I can find a fix for
this. Both usage patterns should be possible even if some people
disagree with using startxfce4.

  - Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20100909/15514099/attachment.pgp>


More information about the Xfce4-dev mailing list