After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702300 - alternative status menu: hide hibernate option when hibernate is disabled
alternative status menu: hide hibernate option when hibernate is disabled
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-06-14 23:00 UTC by Jeremy Bicha
Modified: 2013-07-04 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
alternative-status-menu: unpack the result of the CanHibernate (1.16 KB, patch)
2013-07-04 14:51 UTC, Giovanni Campagna
committed Details | Review

Description Jeremy Bicha 2013-06-14 23:00:27 UTC
Ubuntu 13.10 Alpha with logind and gnome-shell and -extensions 3.8.

Ubuntu has disabled hibernate by default. See the .pkla[1]; sudo pm-hibernate still works though[2].

When I enable the alternative status menu, Hibernate shows up as an option in the user menu. Clicking Hibernate does nothing.

What should happen:
Hibernate should not show up when it has been disabled.

I also reported this to Ubuntu at http://pad.lv/1191181


[1]
https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/policykit-desktop-privileges/saucy/view/head:/com.ubuntu.desktop.pkla

[2] https://help.ubuntu.com/stable/ubuntu-help/power-hibernate.html
Comment 1 Giovanni Campagna 2013-07-04 13:34:46 UTC
Uhm... the ConsoleKit paths for suspend and hibernate were removed before 3.8.
Is this a downstream patch?

Or is ubuntu using logind in 13.04 too?
We ask logind CanHibernate, it should return false if polkit would say no.
Comment 2 Giovanni Campagna 2013-07-04 14:51:23 UTC
Created attachment 248393 [details] [review]
alternative-status-menu: unpack the result of the CanHibernate

The DBus call yields a GVariant, which we need to unpack to
obtain the JS value to compare.