0

no matter what I try to put in the file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla but I can't get the hibernate items being displayed.

My hibernation works fine if loaded with a sudo systemctl hibernate.

The most recent configuration I added is as follow, though when I reloaded the system before I noticed the file content was wiped out. But here I leave the benefit of the doubt as I'm not sure I did save.

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

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes

Any advice?

Andrea Moro
  • 481
  • 1
  • 5
  • 16
  • https://extensions.gnome.org/extension/755/hibernate-status-button/ – PRATAP Oct 28 '21 at 14:51
  • https://askubuntu.com/q/1260527/739431 – PRATAP Oct 28 '21 at 14:54
  • Am I right that these extension lean on the browser and works with a combination on JavaScript? – Andrea Moro Oct 29 '21 at 06:16
  • You can download it n install. Yes it's a javascript – PRATAP Oct 29 '21 at 06:18
  • Any other native solution? It seems like a kind of hack – Andrea Moro Oct 29 '21 at 08:57
  • For putting anything in system menu.. only extensions are the way. If you have your own script then you can add a system menu item and when you click it, it can call your script. I belive nothing wrong with gnome extension hibernate menu. All gnome extensions from that website are checked for any attacks. – PRATAP Oct 29 '21 at 09:00
  • It's not that I'm fearing an attack, rather than it's a browser based solution. I don't understand why is so difficult to have an entry in that menu and why the pkla files are not read as intended – Andrea Moro Oct 29 '21 at 12:16
  • "Browser baded solution"??? No – PRATAP Oct 29 '21 at 12:32
  • Well, I can see some .js file on the repository, that's why I thought it was a browser based stuff. So I take it as a no, it's an independent piece of tech? – Andrea Moro Oct 29 '21 at 15:14
  • Ok I got the confusion. It's the extensions that can installed from a website like the snap apps. – Andrea Moro Oct 29 '21 at 15:50
  • No.. extension is a way of tweaking gnome-shell. No other way to tweak gnome-shell. From the website you download a zip file. From the zip file you can install extension with a command line. – PRATAP Oct 29 '21 at 15:56
  • If you have a script that can do hibernation, I can provide you a sample extension that adds menu item in system menu. When you click that it can call your script. You can put what ever text you want in the menu item. – PRATAP Oct 29 '21 at 15:57
  • https://wiki.gnome.org/Projects/GnomeShell/Extensions# – PRATAP Oct 29 '21 at 15:59

0 Answers0