在Ubuntu 20.04上,锁定屏幕不能工作

分享于 

5分钟阅读

ubuntu

  繁體

问题:

升级到20.04后,在Ubuntu上锁定屏幕不能工作,如何修复这个问题?

ls -al ~/.local/share/gnome-shell/extensions:


total 80


drwxrwxr-x 20 me me 4096 May 10 09:32 .


drwx------ 3 me me 4096 May 25 15:58 ..


drwxrwxr-x 4 me me 4096 Jun 6 2019 appfolders-manager@maestroschan.fr


drwxr-xr-x 3 me me 4096 Mar 14 07:08 appindicatorsupport@rgcjonas.gmail.com


drwxrwxr-x 3 me me 4096 May 10 09:30 apps-menu@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 4 me me 4096 Dec 12 14:55 auto-move-windows@gnome-shell-extensions.gcampax.github.com


drwxrwxr-x 4 me me 4096 Jun 7 2019 clock-override@gnomeshell.kryogenix.org


drwxrwxr-x 3 me me 4096 May 9 22:17 customcorner@eccheng.gitlab.com


drwxrwxr-x 4 me me 4096 May 9 22:13 custom-hot-corners@janrunx.gmail.com


drwxr-xr-x 5 me me 4096 Apr 29 16:20 dash-to-panel@jderose9.github.com


drwxrwxr-x 3 me me 4096 May 10 09:31 drive-menu@gnome-shell-extensions.gcampax.github.com


drwxrwxr-x 3 me me 4096 Apr 21 2019 fq@megh


drwxrwxr-x 3 me me 4096 May 10 09:30 launch-new-instance@gnome-shell-extensions.gcampax.github.com


drwxrwxr-x 3 me me 4096 May 9 22:14 night-light-slider.timur@linux.com


drwxrwxr-x 3 me me 4096 May 10 09:31 places-menu@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 me me 4096 Nov 28 12:00 removeaccesibility@lomegor


drwxrwxr-x 4 me me 4096 May 9 22:14 screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com


drwxrwxr-x 4 me me 4096 May 9 22:15 user-theme@gnome-shell-extensions.gcampax.github.com


drwxrwxr-x 3 me me 4096 May 9 22:15 windowsNavigator@gnome-shell-extensions.gcampax.github.com


drwxrwxr-x 3 me me 4096 May 10 09:32 workspace-indicator@gnome-shell-extensions.gcampax.github.com



ls -al /usr/share/gnome-shell/extensions:


total 68


drwxr-xr-x 17 root root 4096 Oct 29 2019 .


drwxr-xr-x 7 root root 4096 May 23 10:13 ..


drwxr-xr-x 2 root root 4096 May 9 18:04 apps-menu@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 auto-move-windows@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 desktop-icons@csoriano


drwxr-xr-x 2 root root 4096 May 9 18:04 drive-menu@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 horizontal-workspaces@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 launch-new-instance@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 native-window-placement@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 places-menu@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 3 root root 4096 May 9 18:04 ubuntu-appindicators@ubuntu.com


drwxr-xr-x 3 root root 4096 May 9 18:04 ubuntu-dock@ubuntu.com


drwxr-xr-x 2 root root 4096 May 9 18:04 user-theme@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 window-list@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 windowsNavigator@gnome-shell-extensions.gcampax.github.com


drwxr-xr-x 2 root root 4096 May 9 18:04 workspace-indicator@gnome-shell-extensions.gcampax.github.c




答案1:

您有太多的GNOME Shell扩展,其中许多功能重叠。

第一步。

转到https://extensions.gnome.org/local/并禁用所有扩展,然后用ALT+F2重启GNOME shell,然后r,然后输入,然后重新测试锁屏,看看它是否正常工作。

第二步。

从清理你的/usr/share/gnome-shell/extensions开始。


sudo rm -r /usr/share/gnome-shell/extensions/*gcampax.github.com



使用前面的说明重新启动GNOME shell。

这会让你在/usr/share/gnome-shell/extensions,中留下这些扩展,


drwxr-xr-x 2 root root 4096 May 9 18:04 desktop-icons@csoriano


drwxr-xr-x 3 root root 4096 May 9 18:04 ubuntu-appindicators@ubuntu.com


drwxr-xr-x 3 root root 4096 May 9 18:04 ubuntu-dock@ubuntu.com



每次更改后,重新启动GNOME。



LOC  屏幕  Ubuntu  lock