Description of problem:
X clients are started inside ck-xinit-session as a fallback so that if the display manager doesn't start the consolekit session by itself, there's a console session anyway.
But the session bus is started earlier by /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh so the autostarted services will have less policy kit authorizations because of not running inside the console session.
I guess that one of the following needs to happen:
- display managers like slim need to start the console session on their own,
- the fallback is fixed, so the message bus is started inside ck-xinit-session.
The right thing here is clearly to reduce the shell script madness in xinit, and fix up display managers to interact with ConsoleKit
Anyway, dbus is not involved in this; moving this bug to slim
(In reply to comment #0)
> Description of problem:
> X clients are started inside ck-xinit-session as a fallback so that if the
> display manager doesn't start the consolekit session by itself, there's a
> console session anyway.
I don't see it that way. I'd rather say that the consolekit session is
started last for no specific reason. But it could be started before.
> But the session bus is started earlier by
> /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh so the autostarted services
> will have less policy kit authorizations because of not running inside the
> console session.
It is by mere chance that it is started earlier.
> I guess that one of the following needs to happen:
> - display managers like slim need to start the console session on their own,
Or the consolekit session should be started in the session scripts in xinitrc-common before xinitrc.d scripts are started. It is not only an issue for the dm, but also for X started through xinitrc. Maybe it could also be possible to start the consolekit session in etc/X11/xinit/xinitrc.d/. I guess that this would require some changes since currently I guess that ck-xinit-session has to exec a program and closes the dbus conncetion when the program is returning.
In fact, reading the code, it looks like there is no explicit code to close the consolekit session, I guess it is closed at exit in some way since ck_connector_close_session doesn't seems to be called explicitely.
Maybe the solution would be to code something like ck-xinit-session that returns the cookie and its pid, and have the process killed after the end of the session to close the dbus connection.
The problem I see is if the dm crashes the consolekit session leader could still be alive and the dbus connection would then still be open.
Looking at dbus-launch, maybe the right solution would be to have something similar with the consolekit session leader.
Isn't there a need for some common code to do a process that exits when the session exits to keep dbus connections?
I'd like to have a look at how the services that need consolekit session are started. Can you point me to a package that install such a /etc/X11/xinit/xinitrc.d file, or tell where such autostarted services are started?
Anyway, one possibility I see would be to have dbus-launch start CK_XINIT_SESSION if needed. I think it could work. So, there would be, before 00-start-message-bus.sh (could be in 00-start-consolekit-session, maybe installed together with libck-connector):
if [ -x /usr/bin/ck-xinit-session -a -z "$XDG_SESSION_COOKIE" ]; then
And 00-start-message-bus.sh would be modified to be:
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval `dbus-launch --sh-syntax --exit-with-session $CK_XINIT_SESSION`
Wouldn't that work?
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '11'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 11's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 11 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.