0

I have had some trouble with logging on in the lock screen (apparently something to do with keyboard language). On the process of debugging, I was following @0x4B1D answer here. The fourth step does nothing for me.

Now, neither super+l locks nor gnome-screensaver-command -l.

gnome-screensaver-command -a does raise a blank screen, though no password is needed.

I have tried rebooting and reinstalling gnome and I do not want to go to any other screensaver methods such as xscreensaver.

I am far from being an expert on Ubuntu. How do I even begin to cope with this?

pomsky
  • 68,507
havakok
  • 123

2 Answers2

0

You may use the native way of sending a message to a D-Bus message bus. Run the following command to invoke the screen-lock:

dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
pomsky
  • 68,507
0

(I'm running gdm3 on ubuntu 20.04).

Check the value of the disable-lock-screen setting, as it seems to interact with (cause to fail) everything else that would ever like to lock the screen. From the command line:

gsettings get org.gnome.desktop.lockdown disable-lock-screen

When the setting is true, nothing will make the screen lock for me. (Including, not even the dbus-send command suggested above). I find that I also have no lock icon in my desktop taskbar far-right drop-down menu (where power-off is found).

If you change the setting to false, the lock-icon comes back when that menu is dropped-down. Again, from the command line:

gsettings set org.gnome.desktop.lockdown disable-lock-screen  false

And then I can lock in any of the usual ways, including by clicking that newly reappeared lock-icon, or using keyboard shortcut (super-L), or setting up the ubuntu-lock-on-suspend timeout mechanism, or the dbus-send command suggested by pomsky (above), or this from the command line:

DISPLAY=:0  gnome-screensaver-command -l