hibernate with keystroke?

poma pomidorabelisima at gmail.com
Fri Mar 22 00:32:24 UTC 2013


On 21.03.2013 03:22, Ranjan Maitra wrote:
> Hi,
> 
> I have been trying to get to hibernate using a single keystroke. So,
> here is what i tried:
> 
> put pm-hibernate in my sudo. Checked this by using:
> 
> sudo pm-hibernate
> 
> This works without a hitch.
> 
> Then I keyed in ctrl-f12 to be equivalent to sudo pm-hibernate. 
> (also tried sudo /usr/sbin/pm-hibernate).
> 
> Tried this, but this does not work. Pretty much nothing happens.
> 
> I am quite confident that there is nothing wrong with the syntax because
> I replaced it with (say) slock and it locks the screen just fine.
> 
> What should I be doing here?
> 
> Alternatively, what is the command that is executed when I go through
> gnome-logout and then press hibernate? I would just like to mimic that,
> I guess.
> 

Fedora 18 == systemd ;)
systemctl suspend/hibernate/hybrid-sleep are display manager independent.
man systemctl
btw on 3.8.3-203.fc18.x86_64 the hibernate is broken on some mobos.
Yours working?


Suspend example:

dconf dump /org/gnome/settings-daemon/plugins/media-keys/
[/]
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
logout=''
screensaver='<Primary><Alt>l'

[custom-keybindings/custom0]
binding='<Primary><Alt>Delete'
command='gnome-session-quit --logout'
name='Logout'
..

dconf write
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/name
"'Suspend'"
dconf write
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/command
"'systemctl suspend'"
dconf write
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/binding
"'<Shift>F11'"
dconf write
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings
"['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/',
'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/']"
..

dconf dump /org/gnome/settings-daemon/plugins/media-keys/
[/]
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/',
'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11/']
logout=''
screensaver='<Primary><Alt>l'

[custom-keybindings/custom11]
binding='<Shift>F11'
command='systemctl suspend'
name='Suspend'

[custom-keybindings/custom0]
binding='<Primary><Alt>Delete'
command='gnome-session-quit --logout'
name='Logout'







More information about the users mailing list