Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 274287

Summary: Unable to shutdown or restart system with gnome-base/gnome-2.26.2
Product: Gentoo Linux Reporter: Nicholas Doyle <njdoyle+bugs>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: eric, jklawiter, mehmet, peter.saaf
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nicholas Doyle 2009-06-15 21:24:51 UTC
I am unable to restart or shut down my system through the System -> "Shut Down..." menu.

When I try, I get a complaint to authenticate because other users are logged in.
I get one of the following actions:
org.freedesktop.consolekit.system.stop-multiple-users
org.freedesktop.consolekit.system.restart-multiple-users

The problem is that there are no other users logged in. Not in Gnome sessions, not in VTs, not over SSH, not in anything.

ck-list-sessions reports only one session:
Session2:
	unix-user = '1000'
	realname = 'Nicholas Doyle'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2009-06-15T17:41:50.555126Z'
	login-session-id = ''

I have all packages built with the consolekit and policykit USE flags enabled. Relevant packages include:

gnome-base/gnome-session-2.26.1  USE="doc ipv6 policykit -branding -debug"
sys-auth/policykit-0.9-r1  USE="bash-completion doc pam (-selinux) -zsh-completion"
gnome-base/gnome-2.26.2  USE="cdr cups dvdr ldap mono -accessibility -esd"
sys-auth/consolekit-0.3.0-r1  USE="doc pam policykit -debug"
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-06-17 20:22:07 UTC
you probably just need to fix your policykit setup.
Comment 2 Peter Sääf 2009-06-28 20:24:05 UTC
I was having the same problem. Turned out to be due to bug #239231 (  http://bugs.gentoo.org/show_bug.cgi?id=239231 )

So check that /var/lib/PolicyKit is owned by root:polkituser and that polkituser has write access.
Comment 3 Nicholas Doyle 2009-06-29 17:38:27 UTC
(In reply to comment #2)
> I was having the same problem. Turned out to be due to bug #239231 ( 
> http://bugs.gentoo.org/show_bug.cgi?id=239231 )
> 
> So check that /var/lib/PolicyKit is owned by root:polkituser and that
> polkituser has write access.
> 

This fixed the problem for me.
That bug should have resulted in a rev-bump instead of updating the ebuild in place so that people with broken permissions would get fixed.
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-06-29 20:55:03 UTC
well this mean you got the ebuild from the overlay long ago, but it was masked to my best knowledge anyway so...
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-02-24 19:38:02 UTC
*** Bug 306687 has been marked as a duplicate of this bug. ***
Comment 6 Eric Siegel 2010-02-24 19:54:39 UTC
Feb 24 14:47:53 Hypercube gnome-session[5578]: WARNING: Unable to list sessions: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.ConsoleKit.Manager" member "GetSessions" error name "(unset)" destination "org.freedesktop.ConsoleKit")

Found that in /var/log/messages.  How do I fix it?

Oh, by the way:
nticompass@Hypercube ~ $ sudo ls -l /var/lib/ | grep PolicyKit
Password: 
drwxrwx---  2 root          polkituser 4096 2010-01-26 20:33 PolicyKit
drwxr-xr-x  2 polkituser    root       4096 2009-10-15 23:41 PolicyKit-public
Comment 7 Eric Siegel 2010-03-24 16:58:11 UTC
(In reply to comment #6)
> Feb 24 14:47:53 Hypercube gnome-session[5578]: WARNING: Unable to list
> sessions: A security policy in place prevents this sender from sending this
> message to this recipient, see message bus configuration file (rejected message
> had interface "org.freedesktop.ConsoleKit.Manager" member "GetSessions" error
> name "(unset)" destination "org.freedesktop.ConsoleKit")
> 
> Found that in /var/log/messages.  How do I fix it?
> 
> Oh, by the way:
> nticompass@Hypercube ~ $ sudo ls -l /var/lib/ | grep PolicyKit
> Password: 
> drwxrwx---  2 root          polkituser 4096 2010-01-26 20:33 PolicyKit
> drwxr-xr-x  2 polkituser    root       4096 2009-10-15 23:41 PolicyKit-public
> 

I fixed it by adding a line to /etc/dbus-1/system.d/ConsoleKit.conf
    <allow send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessions"/>
Comment 8 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-05-03 19:52:06 UTC
*** Bug 318321 has been marked as a duplicate of this bug. ***