Ubuntu – Lubuntu 18.10 LXQt power button actions

buttonlubuntulxqtpower-managementsettings

My system shuts down when I push te power button instead of suspending like most laptops.
There are many complex forum solutions for that on the net, but I like to solve it with this command:

"gsettings set org.gnome.settings-daemon.plugins.power button-power suspend;"

The only problem is lubuntu uses LXQt now, so the result is: No such schema “org.gnome.settings-daemon.plugins.power”…

My question, what would be the equilavent gsettings command for lubuntu 18.10?
Thanks for any idea's offered.

Best Answer

Right...

Well thanks to all support I found the solution in the end for lubuntu LXQt 18.10
Finally I got rid of my laptop shutting down instead of suspending after pushing the power button...

I realize a power button logically should switch off power, but since the last 15 of years or so, people are used to have their laptops suspending by pushing it.

For others that have the same annoying thing and getting no answer for this simple question try this:

open terminal and run this command:

sudo apt install gnome-settings-daemon
gsettings set org.gnome.settings-daemon.plugins.power power-button-action suspend

and than install a text editor like gedit, and edit a file:

sudo apt install gedit -y;
sudo gedit /etc/systemd/logind.conf;

and paste these lines at the end of the file:

HandlePowerKey=suspend
PowerKeyIgnoreInhibited=yes

and use keys Ctrl+S to save it.

  • Restart your laptop.

The power button should suspend your laptop now.