1. 程式人生 > >Lock screen button missing in Ubuntu 17.10 and 18.04

Lock screen button missing in Ubuntu 17.10 and 18.04

Ubuntu 17.10/18.04 鎖屏按鈕消失,無法鎖屏的問題。

The "Lock Screen" button was missing at top right corner of Ubuntu desktop. It was in the middle between "Setting" and "Power" button when running 17.04. After I upgraded to 17.10 through commands in terminal, the "Lock Screen" button disappears. Upgrading to 18.04 does not fix this.

Neither SUPER+L nor CTRL+ALT+L works. Lock screen related settings under "Settings - Privacy" is grey and can't be modified.

By default Ubuntu 18.04 is using lightDM as display manager. Switching to GDM3 does not help on this issue.

Finally after some digging, it turns out that one command could fix this:

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

Before changing this config, read it out to make sure "disable-lock-screen" is "true":

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