备注:点击关闭选项两次将忽略计时器并关闭计时器。这可能是您的另一种选择。
看
/etc/acpi/powerbtn.sh
Run Code Online (Sandbox Code Playgroud)
重要部分:
# If the current X console user is running a power management daemon that
# handles suspend/resume requests, let them handle policy This is effectively
# the same as 'acpi-support's '/usr/share/acpi-support/policy-funcs' file.
[ -r /usr/share/acpi-support/power-funcs ] && getXconsole
PMS="gnome-settings-daemon kpowersave xfce4-power-manager"
PMS="$PMS guidance-power-manager.py dalston-power-applet"
PMS="$PMS mate-settings-daemon"
PMS="$PMS unity-settings-daemon"
Run Code Online (Sandbox Code Playgroud)
您可能有更多选项(我检查了 16.04.4 服务器)它有几个选项来测试不同的桌面。假设您使用的是 systemd:systemd-login使用 /etc/systemd/logind.conf进行设置。
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288
Run Code Online (Sandbox Code Playgroud)
所以我期待这个:
InhibitDelayMaxSec=
Specifies the maximum time a system shutdown or
sleep request is delayed due to an inhibitor lock of type "delay"
being active before the inhibitor is ignored and the operation
executes anyway. Defaults to 5.
Run Code Online (Sandbox Code Playgroud)
我向启动板报告了有关您的问题的错误 1782425 。
它会影响gnome-shell,超时是在某处硬编码的。在代码中没有找到正确的位置,但 GUI 是在以下位置定义的gnome-shell-3.28.2/js/ui/endSessionDialog.js:
cd ~/Downloads
apt-get source gnome-shell
cd gnome-shell-3.28.2
$ grep -ir "The system will power off automatically in .* seconds" -A3
js/ui/endSessionDialog.js: "The system will power off automatically in %d seconds.",
js/ui/endSessionDialog.js- seconds).format(seconds);
js/ui/endSessionDialog.js- },
js/ui/endSessionDialog.js- checkBoxText: C_("checkbox", "Install pending software updates"),
--
Run Code Online (Sandbox Code Playgroud)
小话。
很棒的是,带有 MATE DE 的 Ubuntu 16.04 LTS、18.04 LTS、19.04 和 19.10 允许用户使用 0 到 300 的值自定义此超时,例如 20 秒
gsettings set org.mate.session logout-timeout 20
Run Code Online (Sandbox Code Playgroud)
(或来自dconf-editor)。
| 归档时间: |
|
| 查看次数: |
4504 次 |
| 最近记录: |