How to assign a shortcut key to send my system into hibernation?












2















I want to assign a shortcut key for the Hibernate functionality. I have Fn + F11 for hibernation in Windows, but it's not working on Ubuntu. It's getting in sleep mode instead.



I've also tired changing the keyboard shortcut option as Ctrl + H with command pm-hibernate, but still it didn't work. I referred this Ubuntu Forums Thread but couldn't find any solution for this.



Any solution please?










share|improve this question

























  • Thank you every one for there comments. Finally I found something strange. I assigned the ctrl + H with command pm-hibernate. Now my computer goes into Hibernate as follows: Step 1> ctrl+alt+T Step 2> ctrl + H H H.... yes tap H three time it works ..strange but works..I dont know why ..

    – MrA
    Oct 23 '13 at 23:11


















2















I want to assign a shortcut key for the Hibernate functionality. I have Fn + F11 for hibernation in Windows, but it's not working on Ubuntu. It's getting in sleep mode instead.



I've also tired changing the keyboard shortcut option as Ctrl + H with command pm-hibernate, but still it didn't work. I referred this Ubuntu Forums Thread but couldn't find any solution for this.



Any solution please?










share|improve this question

























  • Thank you every one for there comments. Finally I found something strange. I assigned the ctrl + H with command pm-hibernate. Now my computer goes into Hibernate as follows: Step 1> ctrl+alt+T Step 2> ctrl + H H H.... yes tap H three time it works ..strange but works..I dont know why ..

    – MrA
    Oct 23 '13 at 23:11
















2












2








2


2






I want to assign a shortcut key for the Hibernate functionality. I have Fn + F11 for hibernation in Windows, but it's not working on Ubuntu. It's getting in sleep mode instead.



I've also tired changing the keyboard shortcut option as Ctrl + H with command pm-hibernate, but still it didn't work. I referred this Ubuntu Forums Thread but couldn't find any solution for this.



Any solution please?










share|improve this question
















I want to assign a shortcut key for the Hibernate functionality. I have Fn + F11 for hibernation in Windows, but it's not working on Ubuntu. It's getting in sleep mode instead.



I've also tired changing the keyboard shortcut option as Ctrl + H with command pm-hibernate, but still it didn't work. I referred this Ubuntu Forums Thread but couldn't find any solution for this.



Any solution please?







shortcut-keys hibernate






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 12 '13 at 7:16









Aditya

9,303125589




9,303125589










asked Oct 12 '13 at 1:12









MrAMrA

13626




13626













  • Thank you every one for there comments. Finally I found something strange. I assigned the ctrl + H with command pm-hibernate. Now my computer goes into Hibernate as follows: Step 1> ctrl+alt+T Step 2> ctrl + H H H.... yes tap H three time it works ..strange but works..I dont know why ..

    – MrA
    Oct 23 '13 at 23:11





















  • Thank you every one for there comments. Finally I found something strange. I assigned the ctrl + H with command pm-hibernate. Now my computer goes into Hibernate as follows: Step 1> ctrl+alt+T Step 2> ctrl + H H H.... yes tap H three time it works ..strange but works..I dont know why ..

    – MrA
    Oct 23 '13 at 23:11



















Thank you every one for there comments. Finally I found something strange. I assigned the ctrl + H with command pm-hibernate. Now my computer goes into Hibernate as follows: Step 1> ctrl+alt+T Step 2> ctrl + H H H.... yes tap H three time it works ..strange but works..I dont know why ..

– MrA
Oct 23 '13 at 23:11







Thank you every one for there comments. Finally I found something strange. I assigned the ctrl + H with command pm-hibernate. Now my computer goes into Hibernate as follows: Step 1> ctrl+alt+T Step 2> ctrl + H H H.... yes tap H three time it works ..strange but works..I dont know why ..

– MrA
Oct 23 '13 at 23:11












2 Answers
2






active

oldest

votes


















0














Firstly, Hibernate will need to be enabled. Go into console and type



sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla


In the new gedit window, copy-paste this in:



[Re-enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes


Save and close the file, reboot the computer, and then you have it available as a menu option. Assuming you're on a laptop, the fn + F11 shortcut should work afterwards as well, if this is a default option that came with the laptop (i.e. printed on the keyboard, etc.).






share|improve this answer


























  • Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

    – MrA
    Oct 12 '13 at 3:01













  • Did you try using fn + F11 after enabling Hibernate?

    – WhatTheBuck
    Oct 12 '13 at 13:00











  • Yes it goes in suspend mode...

    – MrA
    Oct 12 '13 at 14:27



















0














If you need to setup hibernation shortcut sequence, you go to Ubuntu System settings (Ctrl+Alt+T and then typing gnome-control-center) and then choosing keyboard settings.



Settings



Under that, you will see a tab that says "shortcuts", and there will be an option to set a custom command :



set custom command



Then you will need to put the command you want to hibernate your computer.






share|improve this answer



















  • 1





    I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

    – David Foerster
    Oct 13 '13 at 12:55











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f356979%2fhow-to-assign-a-shortcut-key-to-send-my-system-into-hibernation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Firstly, Hibernate will need to be enabled. Go into console and type



sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla


In the new gedit window, copy-paste this in:



[Re-enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes


Save and close the file, reboot the computer, and then you have it available as a menu option. Assuming you're on a laptop, the fn + F11 shortcut should work afterwards as well, if this is a default option that came with the laptop (i.e. printed on the keyboard, etc.).






share|improve this answer


























  • Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

    – MrA
    Oct 12 '13 at 3:01













  • Did you try using fn + F11 after enabling Hibernate?

    – WhatTheBuck
    Oct 12 '13 at 13:00











  • Yes it goes in suspend mode...

    – MrA
    Oct 12 '13 at 14:27
















0














Firstly, Hibernate will need to be enabled. Go into console and type



sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla


In the new gedit window, copy-paste this in:



[Re-enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes


Save and close the file, reboot the computer, and then you have it available as a menu option. Assuming you're on a laptop, the fn + F11 shortcut should work afterwards as well, if this is a default option that came with the laptop (i.e. printed on the keyboard, etc.).






share|improve this answer


























  • Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

    – MrA
    Oct 12 '13 at 3:01













  • Did you try using fn + F11 after enabling Hibernate?

    – WhatTheBuck
    Oct 12 '13 at 13:00











  • Yes it goes in suspend mode...

    – MrA
    Oct 12 '13 at 14:27














0












0








0







Firstly, Hibernate will need to be enabled. Go into console and type



sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla


In the new gedit window, copy-paste this in:



[Re-enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes


Save and close the file, reboot the computer, and then you have it available as a menu option. Assuming you're on a laptop, the fn + F11 shortcut should work afterwards as well, if this is a default option that came with the laptop (i.e. printed on the keyboard, etc.).






share|improve this answer















Firstly, Hibernate will need to be enabled. Go into console and type



sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla


In the new gedit window, copy-paste this in:



[Re-enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes


Save and close the file, reboot the computer, and then you have it available as a menu option. Assuming you're on a laptop, the fn + F11 shortcut should work afterwards as well, if this is a default option that came with the laptop (i.e. printed on the keyboard, etc.).







share|improve this answer














share|improve this answer



share|improve this answer








edited Oct 12 '13 at 3:04









kiri

19.1k1259104




19.1k1259104










answered Oct 12 '13 at 2:18









WhatTheBuckWhatTheBuck

3171214




3171214













  • Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

    – MrA
    Oct 12 '13 at 3:01













  • Did you try using fn + F11 after enabling Hibernate?

    – WhatTheBuck
    Oct 12 '13 at 13:00











  • Yes it goes in suspend mode...

    – MrA
    Oct 12 '13 at 14:27



















  • Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

    – MrA
    Oct 12 '13 at 3:01













  • Did you try using fn + F11 after enabling Hibernate?

    – WhatTheBuck
    Oct 12 '13 at 13:00











  • Yes it goes in suspend mode...

    – MrA
    Oct 12 '13 at 14:27

















Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

– MrA
Oct 12 '13 at 3:01







Thanks for the answer. I already have hibernate setup as menu, as you did in your steps.I am able to select Hibernate from drop down menu. But I am unable to assign any shortcut key for Hibernate. Is there any way that I can assign shortcut key to hibernate. Any customization?.

– MrA
Oct 12 '13 at 3:01















Did you try using fn + F11 after enabling Hibernate?

– WhatTheBuck
Oct 12 '13 at 13:00





Did you try using fn + F11 after enabling Hibernate?

– WhatTheBuck
Oct 12 '13 at 13:00













Yes it goes in suspend mode...

– MrA
Oct 12 '13 at 14:27





Yes it goes in suspend mode...

– MrA
Oct 12 '13 at 14:27













0














If you need to setup hibernation shortcut sequence, you go to Ubuntu System settings (Ctrl+Alt+T and then typing gnome-control-center) and then choosing keyboard settings.



Settings



Under that, you will see a tab that says "shortcuts", and there will be an option to set a custom command :



set custom command



Then you will need to put the command you want to hibernate your computer.






share|improve this answer



















  • 1





    I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

    – David Foerster
    Oct 13 '13 at 12:55
















0














If you need to setup hibernation shortcut sequence, you go to Ubuntu System settings (Ctrl+Alt+T and then typing gnome-control-center) and then choosing keyboard settings.



Settings



Under that, you will see a tab that says "shortcuts", and there will be an option to set a custom command :



set custom command



Then you will need to put the command you want to hibernate your computer.






share|improve this answer



















  • 1





    I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

    – David Foerster
    Oct 13 '13 at 12:55














0












0








0







If you need to setup hibernation shortcut sequence, you go to Ubuntu System settings (Ctrl+Alt+T and then typing gnome-control-center) and then choosing keyboard settings.



Settings



Under that, you will see a tab that says "shortcuts", and there will be an option to set a custom command :



set custom command



Then you will need to put the command you want to hibernate your computer.






share|improve this answer













If you need to setup hibernation shortcut sequence, you go to Ubuntu System settings (Ctrl+Alt+T and then typing gnome-control-center) and then choosing keyboard settings.



Settings



Under that, you will see a tab that says "shortcuts", and there will be an option to set a custom command :



set custom command



Then you will need to put the command you want to hibernate your computer.







share|improve this answer












share|improve this answer



share|improve this answer










answered Oct 13 '13 at 12:23









kelvinelovekelvinelove

1,52111326




1,52111326








  • 1





    I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

    – David Foerster
    Oct 13 '13 at 12:55














  • 1





    I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

    – David Foerster
    Oct 13 '13 at 12:55








1




1





I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

– David Foerster
Oct 13 '13 at 12:55





I guess, you don't want to enter your password every time you hit those keys. Here's a command that does without one: dbus-send --system --type=method_call --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

– David Foerster
Oct 13 '13 at 12:55


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f356979%2fhow-to-assign-a-shortcut-key-to-send-my-system-into-hibernation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido