使用命令行在 Ubuntu 上设置屏幕超时

使用命令行在 Ubuntu 上设置屏幕超时

我在笔记本电脑上运行 Ubuntu Server。我想将超时设置为 0 或接近该值,这样屏幕就会关闭,除非我唤醒它。

答案1

如果您想自动注销空闲用户以保护本地控制台,请尝试“自动登录”。

$ apt-cache show autolog
Package: autolog
Priority: extra
Section: universe/admin
Installed-Size: 148
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Luis Uribe <[email protected]>
Architecture: amd64
Version: 0.40-13.1
Depends: libc6 (>= 2.7), cron (>= 3.0pl1-42)
Recommends: exim4 | mail-transport-agent
Filename: pool/universe/a/autolog/autolog_0.40-13.1_amd64.deb
Size: 28022
MD5sum: 043c4d4087b377e1934a5496a36fd03a
SHA1: 6b1255ea2fcb9d9115309134073308964c124e7f
SHA256: 42f5609fd698f1bb4d5c472494c5a1a34cddc5566fb2708ccfc9b3c5ef4f11f4
Description-en: Terminates connections for idle users
 Autolog terminates connections considered to be idle based on a large
 variety of parameters.
Description-md5: 709929c5c8e5f8913099fd425517dfb3
Homepage: http://gitorious.org/debian-packages/autolog
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

答案2

我能够使用setterm -blank

更新

由于该值在重启时被重置,因此它对我来说已经停止工作了。

我反而核参数 consoleblank0

相关内容