guy*_*oni 5 suspend ubuntu-mate 20.04
我为这个问题苦苦挣扎了几天。
我安装了 Ubuntu 20.04,并安装了ubuntu-mate-desktop. 当我暂停系统时,恢复时它不会要求输入密码。
有什么方法可以设置它以便恢复系统时会弹出密码窗口吗?
我发现这个解决方案对我有用。
\n首先,以 root 身份创建文件/etc/systemd/system/lock.service:
[Unit]\nDescription="Make extra sure to lock the screen when suspending"\n\n[Service]\nType=oneshot\nUser=root\nExecStart=/bin/loginctl lock-sessions\n\n[Install]\nWantedBy=suspend.target\nRun Code Online (Sandbox Code Playgroud)\n然后,为了更新系统配置,在控制台中键入 \xe2\x80\x8b:
\nsudo systemctl daemon-reload\nsudo systemctl enable lock.service\nRun Code Online (Sandbox Code Playgroud)\n