As you know, Ubuntu 13.04 “Raring Ringtail” will be officially released on the 25th of April. Now, the latest Ubuntu 13.04 version is a beta version, so it is far from stable.
In this article I will show you how to add the Hibernate button to your Shutdown Menu, on Ubuntu 13.04.
When your computer hibernates, everything is moved to the swap memory and the computer shuts down. The Ubuntu community does not encourage hibernation, because it does not work on some computers and it is very possible to loose data during hibernation.
If you want to use hibernation, I recommend you to save everything before sending your Ubuntu box to hibernate.
The easiest way to send your computer to hibernation, on Ubuntu, is to do it by the command line interface:
$ sudo pm-hibernate
You can alias this, for an easier usage:
$ alias hibernate='sudo pm-hibernate'
Now, all you have to do is to write hibernate in the terminal and write your current password. For making this alias persistent, add it to your ~/.bashrc.
However, you can insert a hibernation button in your shutdown menu, like this:
Step 1. Create the /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla file:
$ sudo touch /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla
Step 2. Paste this lines in the newly created hibernate.pkla file:
Step 3. Reboot the system and you will have a Hibernate button in your Shutdown Menu.