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 324124 - Power and sleep button should be recognized
Power and sleep button should be recognized
Status: RESOLVED OBSOLETE
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-preferences
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-12-14 21:50 UTC by Jaap A. Haitsma
Modified: 2020-11-06 20:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jaap A. Haitsma 2005-12-14 21:50:20 UTC
In the current version the capplet doesn't recognize if I push the power button
or the sleep button of my laptop. HAL does recognize them. So I guess we should
link the keybindings capplet to HAL to also recognize these buttons.

Furthermore we can then have the Power button default to the Gnome logout dialog
and the sleep button to the suspend action
Comment 1 Runar Ingebrigtsen 2006-10-09 15:34:52 UTC
I can confirm this bug. See the launchpad bug: <a href="https://launchpad.net/products/gnome-power/+bug/57872">57872</a>
Comment 2 lists 2006-10-21 05:55:21 UTC
This is now fixed in Ubuntu through editing a patch. Was this really upstream or Ubuntu-only?
Comment 3 Simon Law 2006-11-29 17:55:51 UTC
This particular bug was an Ubuntu-only problem.  Please close as INVALID.

Thanks,
Simon
Comment 4 Jaap A. Haitsma 2006-11-29 19:49:13 UTC
I don't agree. In ubuntu (and also gnome in general) the power buttons are recognized by gnome-power-manager. In my opinion the keybindings capplet should be responsible for setting all buttons
Comment 5 Bastien Nocera 2007-03-19 15:50:34 UTC
Those buttons don't go through the input layer on Linux, but should soon[1].

When those do, then X can capture them, and gnome-power-manager can act upon them, and could even install a keybindings .xml file to allow the keyboard shortcuts capplet to configure those buttons (ie. if one wants Ctrl+Alt+Del instead of the power button to go to sleep...).

Moving to gnome-power-manager.

[1]: See http://lists.freedesktop.org/archives/hal/2006-February/004638.html and the associated work on lkml.
Comment 6 Richard Hughes 2007-03-19 17:36:50 UTC
g-p-m already grabs the xkeys when you compile --with-xevents, but i'm interested in the keybindings xml file. Do you have any more data about this, or any examples? Thanks.
Comment 7 Bastien Nocera 2007-03-19 18:36:56 UTC
Bug #410758, and control-center trunk has a bunch of examples. Copy one of the .xml files (which I should really document...), and tweak it to your liking. It will end up showing up in the GNOME keyboard shortcuts.

If it's really not clear, I'll file a bug against myself to write the docs :)
Comment 8 Richard Hughes 2007-05-17 11:29:50 UTC
Dude, if g-s-d gets the X keypress, how does it tell g-p-m to do the actions? Do you want to fire off a method on org.freedesktop.PowerManagement.Key("brightness-up") or am i missing a trick?

Richard
Comment 9 Bastien Nocera 2007-05-17 13:11:15 UTC
The only thing dropping that .xml file does, is to provide a UI to set a particular GConf key, nothing else.

Then you can use a piece of code like tomboykeybinder.[ch] in g-p-m directly, or probably easier, add the keys as handled in gnome-settings-daemon, and make them call g-p-m via d-bus.
Comment 10 Jaap A. Haitsma 2007-08-19 14:48:18 UTC
Bastien made a wiki page describing what to do.

http://live.gnome.org/ControlCenter/ApplicationDefinedKeybindings

I guess we can add this for 2.22
Comment 11 André Klapper 2020-11-06 20:14:15 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years.

If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-power-manager/-/issues/

Thank you for reporting this issue and we are sorry it could not be fixed.