Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lock screen with Gnome 3 login greeter

240 views
Skip to first unread message

Richard Forst

unread,
Sep 5, 2021, 5:40:05 AM9/5/21
to
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. However I don't find any related solutions that work. The closest one is [1] (sorry it's Ubuntu env not Debian). But executing that command (in [1]),

    dbus-send --type=method_call \
            --dest=org.gnome.ScreenSaver \
            /org/gnome/ScreenSaver \
            org.gnome.ScreenSaver.Lock

login screen doesn't come back. So what command should I use so that when the system becomes idle, the login screen will be active?

I tried configuring gnome-control-center's Privacy > Screen Lock > Automatic Screen Lock set to on (round icon moved to right). And Automatic Screen Lock Delay is set to 30 seconds. However, it's still active (when becoming idle, screen won't be lock with login display).

What steps should I perform in order to lock the screen with login being displayed? I know there is xscreensaver. But this time I want to use login instead of xscreensaver, which is nice of course.

Thanks

[1]. https://askubuntu.com/a/983451

Richard Forst

unread,
Sep 5, 2021, 7:00:04 AM9/5/21
to
Ok. The link I found previously is [1]. But executing the command provided in that link doesn't work either.
dbus-send --type=method_call \ --dest=org.gnome.ScreenSaver \ /org/gnome/ScreenSaver \ org.gnome.ScreenSaver.Lock

I appreciate any suggestions or comments. Many thanks.

[1]. https://unix.stackexchange.com/questions/86221/how-can-i-lock-my-screen-in-gnome-3-without-gdm/86275#86275


Sep 5, 2021, 17:32 by ster...@tutanota.com:

Greg Wooledge

unread,
Sep 5, 2021, 9:20:04 AM9/5/21
to
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...?

Richard Forst

unread,
Sep 6, 2021, 10:10:05 AM9/6/21
to
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 gr...@wooledge.org:
0 new messages