Results 1 to 9 of 9

Thread: How to enable shutdown from the lock screen?

  1. #1

    Default How to enable shutdown from the lock screen?

    Hello everyone!

    I have OpenSUSE Leap 15.2 with Xfce desktop running on a laptop. Is there any way to enable/allow it to be shut down by the power button of the laptop while a session is locked?
    I've activated 'Shutdown when button is pressed' in Power manager, but it works only when I'm logged in.

    Thanks!

  2. #2
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    5,545

    Default AW: How to enable shutdown from the lock screen?

    You can always shutdown:

    Goto a terminal with STRG+ALT+F2, login as root, now:
    Code:
    shutdown -h -P now

    But maybe this is blocked when an session is locked, because this will be used when someone is absent and do not want to shut down.
    Last edited by Sauerland; 15-Feb-2021 at 11:56.

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    30,894
    Blog Entries
    15

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by Nick_L View Post
    Hello everyone!

    I have OpenSUSE Leap 15.2 with Xfce desktop running on a laptop. Is there any way to enable/allow it to be shut down by the power button of the laptop while a session is locked?
    I've activated 'Shutdown when button is pressed' in Power manager, but it works only when I'm logged in.

    Thanks!
    Hi
    Likely controlled by logind, check the options set in /etc/systemd/logind.conf how long do you hold the power button, > 5 seconds?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by Sauerland View Post
    You can always shutdown:

    Goto a terminal with STRG+ALT+F2, login as root, now:
    Code:
    shutdown -h -P now

    But maybe this is blocked when an session is locked, because this will be used when someone is absent and do not want to shut down.
    The power button shuts down the system correctly when I'm logged in (and 'menu > log out' is available too). I'm trying to find an option to send shutdown command from the locked screen.

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Likely controlled by logind, check the options set in /etc/systemd/logind.conf how long do you hold the power button, > 5 seconds?
    Nope, I just make a short press - that was enough to shut down the system when I'm logged in. I didn't know there any differences when trying to do that from the lock screen.
    In the logind.conf I've already tried to uncomment
    Code:
    HandlePowerKey=poweroff
    , but without any noticeable effect.

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    30,894
    Blog Entries
    15

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by Nick_L View Post
    The power button shuts down the system correctly when I'm logged in (and 'menu > log out' is available too). I'm trying to find an option to send shutdown command from the locked screen.


    Nope, I just make a short press - that was enough to shut down the system when I'm logged in. I didn't know there any differences when trying to do that from the lock screen.
    In the logind.conf I've already tried to uncomment
    Code:
    HandlePowerKey=poweroff
    , but without any noticeable effect.
    Hi
    Try holding for 5 seconds or more at the lock screen, does that work?

    The commented lines are the defaults, so uncommenting would make no change... I do use the handlelidswitch and set to ignore, that would be an option to set this to powerdown if you don't want to suspend/hibernate?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Try holding for 5 seconds or more at the lock screen, does that work?

    The commented lines are the defaults, so uncommenting would make no change... I do use the handlelidswitch and set to ignore, that would be an option to set this to powerdown if you don't want to suspend/hibernate?
    Thanks, I'll know these are defaults!

    Tried holding for 5 second - with no reaction at all.
    Speaking of the lid switch, that would be the last option to consider, because in my usage scenario the pc is sometimes left working on background tasks with closed lid, so I used to use this trigger to shut down the display and lock the session.
    But I still need an option that allows anyone living in the house to shut the laptop down correctly, not just by the 10-seconds-press-power cutoff.

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    30,894
    Blog Entries
    15

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by Nick_L View Post
    Thanks, I'll know these are defaults!

    Tried holding for 5 second - with no reaction at all.
    Speaking of the lid switch, that would be the last option to consider, because in my usage scenario the pc is sometimes left working on background tasks with closed lid, so I used to use this trigger to shut down the display and lock the session.
    But I still need an option that allows anyone living in the house to shut the laptop down correctly, not just by the 10-seconds-press-power cutoff.
    Hi
    Not sure if this may be of interest? https://forum.xfce.org/viewtopic.php?id=11735
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Not sure if this may be of interest? https://forum.xfce.org/viewtopic.php?id=11735
    Thanks!
    Do I get it right that this thread explains how to create a software button to shutdown the pc, but doesn't speak about the hardware one?
    (Sorry, I'm a rather inexperienced user, so I may be omitting something)
    May be very useful, I guess I'll try this way in case there's no possibility to use hardware button specifically

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    30,894
    Blog Entries
    15

    Default Re: How to enable shutdown from the lock screen?

    Quote Originally Posted by Nick_L View Post
    Thanks!
    Do I get it right that this thread explains how to create a software button to shutdown the pc, but doesn't speak about the hardware one?
    (Sorry, I'm a rather inexperienced user, so I may be omitting something)
    May be very useful, I guess I'll try this way in case there's no possibility to use hardware button specifically
    Hi
    As far as I understand it yes a software button.. worth a shot...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •