在过去的几个小时里,我一直在尝试这样做,但没有任何进展。
我正在运行 Ubuntu 16.04,我想在登录屏幕(在使用任何用户登录之前)禁用睡眠/暂停,以便显示保持活动状态。暂停/睡眠在 5 分钟后开始——我似乎在任何地方都找不到这种设置。
我尝试过的事情:
图形用户界面
为两个(所有)用户完成:
终端
gsettings set org.gnome.desktop.session idle-delay 0
sudo /bin/systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
xset s noblank
xset s off
xset dpms force off
xset -dpms
Run Code Online (Sandbox Code Playgroud)
crontab -e:
添加
@reboot sudo /bin/systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
@reboot /usr/bin/xset s noblank
@reboot /usr/bin/xset s off
@reboot /usr/bin/xset dpms force off
@reboot /usr/bin/xset -dpms
Run Code Online (Sandbox Code Playgroud)
dconf org.gnome.settings-daemon.plugins.power
critical-battery-action nothing
idle-dim false
lid-close-ac-action nothing
lid-close-battery-action nothing
sleep-inactive-ac-timeout 0
sleep-inactive-ac-type nothing
sleep-inactive-battery-timeout 0
sleep-inactive-battery-type …
Run Code Online (Sandbox Code Playgroud)