! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Unneeded consolekit session started by xinitrc
Status:
RESOLVED: FIXED
Product:
Xfce-utils
Component:
General

Comments

Description Lionel Le Folgoc 2010-09-06 18:14:38 CEST
hi,

/etc/xdg/xfce4/xinitrc does the following:
=====
# Run xfce4-session if installed
if which xfce4-session >/dev/null 2>&1; then
    if which ck-launch-session >/dev/null 2>&1; then
      ck-launch-session xfce4-session
    else
      xfce4-session
    fi

    if test "$ssh_agent_kill_cmd"; then
        echo "running '$ssh_agent_kill_cmd'"
        eval "$ssh_agent_kill_cmd"
    fi

    exit 0
fi
=====
So if available, it creates a new consolekit session and starts xfce4-session inside it.


But, from what I could understand, it creates several issues with other ck-aware programs:

- login managers (such as gdm) already spawn a ck session. So this creates a second ck session, which is inactive, and xfce4-session and all its descendant will inherit from this one, thus get no permission to shutdown/suspend, etc.

- similarly, session managers such as xfce4-session 4.7.0 will create a new ck session, and everything will be borked again, in my case I end up with 3 of them (I'll file a bug for xfce4-session to be able to reuse an existing one)

Of course, if someone uses xfce4-session 4.6.x and no login manager, then this "ck-launch-session" is needed.

So, I don't know how you can do to please everyone, but, anyway, even with only xfce4-session 4.7.0 this way to start xfce4-session seems buggy (should be "xfce4-session" instead of "ck-launch-session xfce4-session").

Thanks!
Comment 1 Lionel Le Folgoc 2010-09-06 18:28:26 CEST
The xfce4-session bug is @ http://bugzilla.xfce.org/show_bug.cgi?id=6685
Comment 2 Robby Workman editbugs 2010-09-07 04:18:27 CEST
I don't think the script should *ever* use ck-launch-session in 4.7.x going forward; now that xfce4-session can talk to consolekit on its own, it seems that this is never the right thing to do.  Almost surely this is what we want now:


if which xfce4-session >/dev/null 2>&1; then

    xfce4-session

    if test "$ssh_agent_kill_cmd"; then
        echo "running '$ssh_agent_kill_cmd'"
        eval "$ssh_agent_kill_cmd"
    fi

    exit 0

fi
Comment 3 Robby Workman editbugs 2010-09-07 04:26:17 CEST
Created attachment 3111 
Fix

Trivial patch, but hey, somebody's got to do it ;-)
Comment 4 Yves-Alexis Perez editbugs 2010-09-07 06:45:03 CEST
(In reply to comment #0)

> Of course, if someone uses xfce4-session 4.6.x and no login manager, then this
> "ck-launch-session" is needed.

Note that (at least on Debian), the consolekit package already provides the startup scripts. I'm not sure where the startup scripts for various daemon belong (in the daemons themselves or in the desktop) but I'm not so sure it should be in both.
Comment 5 Jannis Pohlmann editbugs 2010-09-08 10:08:47 CEST
This should be fixed in xfce-utils master. 

commit ea8c4b0db31855cb144cd5b863a045423d4afbfc
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Wed Sep 8 12:04:05 2010 +0200

    Drop ck-launch-session as CK is handled in xfce4-session (bug #6684).

Bug #6684

Reported by:
Lionel Le Folgoc
Reported on: 2010-09-06
Last modified on: 2010-09-08

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Attachments

Fix (875 bytes, patch)
2010-09-07 04:26 CEST , Robby Workman
no flags

Additional information