Lubuntu 18.10 LXQt power button actions

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.