When logged in to a desktop environment, in power manager there is an option “When power button is pressed” and choices “ask”, “do nothing”, “shutdown”, etc. I was just wondering how one would go about ensuring when the power button is pressed at the login screen (lightdm) “ask” or “do nothing” was the setting, rather than the machine shutting down.
Sorry if i have put this in the wrong place, i figured to program you have to know stuff and so i had a better chance of a solution here.
The setting you mention is per user. So logically, at the login screen, you are not logged in your user yet, and thus that setting doesn’t apply.
Maybe it would apply if you configure that setting for the root user.
Or maybe a setting in lightdm.
Or something else, if even possible.
Thanks for the reply
Yes this is the bit i am after…
“Or maybe a setting in lightdm.
Or something else, if even possible.”
I have already logged in as root and set “do nothing”, but this has no effect on the lightdm screen etc unfortunately.
Not a straight answer, but it may help you look in the right places.
Ah thanks, that all looks very interesting. I will work through the info, try suggestions etc and report back. Thanks again.
Still in shock as things normally take ages to solve, this worked with the first thing i tried from your link.
This setting in this file … /etc/systemd/logind.conf
Now i won’t accidentally shutdown my laptop when the screen has gone blank and i assume it’s hibernated when it hasn’t
Thank you once again for your help
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.