[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Lock screen with Gnome 3 login greeter



I have gdm3 running. 

    $ ps -ef | grep gdm
    root         465       1  0 16:57 ?        00:00:00 /usr/sbin/gdm3

I have i3lock installed, but I don't use it. Previously I used xscreensaver, and it worked without a problem. This time I just want to give a test to use gdm style screen lock (so when the screen is locked, the UI is consistent - i.e. UI is presented with the login screen after locked), and it should automatically lock after configuring with e.g. 5 mins goes blank and after 30 seconds delay of going blank the screen should lock automatically. 

The screen doesn't automatically lock. The screen just goes black after 5 mins (when inactive). Manually locking the screen works without a problem by issuing e.g. i3lock - that would cause the screen goes white with a circle printing `verifying ...` keyword while unlocking. 

The configuration is in gnome-control-center set the screen to go black after 5 mins. And 30 seconds delay after the screen goes black, as below:

    # in gnome-control-center
    Privacy > Screen Lock > Automatic Screen Lock (is configured to turn on with a blue round icon moved to the right hand side of the bar)
    Privacy > Screen Lock > Automatic Screen Lock Delay (is configured to 30 seconds in drop down menu)

My current dm should be gdm3. I check /etc/X11/default-display-manager, it shows gdm3. 

    $ cat /etc/X11/default-display-manager
    /usr/sbin/gdm3

I understand I can switch to use i3lock, or xscreensaver to lock screen. This time I just want to test whether the screen can be locked (or present me with login screen again after N mins inactive) using gdm3 mechanism, i.e. with login to lock the screen.

Sorry I know my intention may look weird. But I found some people seems to get it working

    https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1896416

And I use the same command, but it doesn't work. So I am merely curious how can I achieve the same effect. 

Thank you again for your kindly help. Appreciate it!

Sep 5, 2021, 21:18 by greg@wooledge.org:

> On Sun, Sep 05, 2021 at 12:50:43PM +0200, Richard Forst wrote:
>
>> > I switched to use i3. So now after the screen goes blank, it won't display
>> > greeter asking to login again. I read somewhere else on the internet that
>> > gdm3 (I use Debian 11 with kernel 5.10.0-8-amd64) no longer uses
>> > screensaver to lock the session. Instead it uses dbus to activate login
>> > asking user to enter id, password for login.
>>
>
> I'm not sure if this is helpful, because our setups are clearly
> different, but:
>
> What I use is startx + fvwm, and I have installed the i3lock package
> as a replacement for xlockmore, which was removed a very long time
> ago.
>
> When I want to lock my screen, I run "i3lock" as a command (either in
> a terminal, or activated from a WM menu).  This gives a plain white
> screen.  To unlock it, I simply type my password.  There's a green
> circle in the middle of the screen that appears while typing, to let
> me know that my keystrokes are actually being received.
>
> In my setup, there is no automatic locking at all.  It's always done
> manually, by running i3lock.
>
> I don't know what your setup is (you mention gdm3, but you didn't actually
> make it clear that you're *running* gdm3 -- it might simply have been
> something that you found during your Internet searches).  You mentioned
> i3, so I thought it might be possible that you're also using i3lock,
> perhaps in some sort of automatic mode.  I don't know how the rest of i3
> works, outside of the i3lock program.
>
> When your screen locks, what do you see?  Is it a plain white screen?
> A plain black screen?  A still image?  An animation?
>
> Which display manager are you using, if any?  If you use "startx", then
> the answer is "none", and your setup is similar to mine.  Otherwise,
> you might be using lightdm, or gdm3, or xdm, or any of several other
> display mangers, most of which have the substring "dm" somewhere in
> their name.
>
> I wonder if switching from gdm3 to lightdm would be enough to solve
> your problem, if you are in fact using gdm3.  I don't know a lot about
> display managers, since I don't use them myself.  Maybe worth looking
> into...?
>


Reply to: