Results 1 to 3 of 3

Thread: Unlock GNOME Lock Screen with Command

  1. #1
    Join Date
    May 2015
    Beans
    138

    Unlock GNOME Lock Screen with Command

    I want to unlock the gnome lock screen with a command:

    loginctl unlock-sessions --no-ask-password

    , but it says:

    Could not lock sessions: Interactive authentication required.

    Is there any way I could unlock it non interactively?

    I know I can script this, but I'd rather not.

    Is there some other way?


    I mean, I should be able to unlock my own lock screen without password, if I'm already logged in as the same user.

  2. #2
    Join Date
    May 2007
    Location
    San Francisco, California
    Beans
    5,857
    Distro
    Ubuntu Development Release

    Re: Unlock GNOME Lock Screen with Command

    Are you running this from an SSH session? Some commands come to mind you can try

    Code:
    DISPLAY=:0 gnome-screensaver-command -d
    You can toggle DBus as well if need be, for example

    Code:
              export DISPLAY=:0
              dbus-send --session \
              --dest=org.gnome.ScreenSaver \
              --type=method_call \
              --print-reply \
              --reply-timeout=20000 \
              /org/gnome/ScreenSaver \
              org.gnome.ScreenSaver.SetActive \
              boolean:false

  3. #3
    Join Date
    May 2015
    Beans
    138

    Re: Unlock GNOME Lock Screen with Command

    actually, sudo loginctl unlock-sessions does work

    would your dbus command work?

    Don't you need some kind of authentication?

    Also, is the lock screen of gnome handled by a screensaver?


Bookmarks

Posting Permissions

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