有一个名为的应用程序unclutter
将执行此操作。在终端窗口中键入以下内容进行安装:
sudo apt-get install unclutter
安装后,您可以在以下文件中将超时更改为2秒:
/etc/default/unclutter
并更改以下行:
EXTRA_OPTS="-idle 1 -root"
至
EXTRA_OPTS="-idle 2 -root"
这也将在系统启动时自动启动。
要立即启动它而不重启系统,请输入以下内容:
nohup unclutter -idle 2 &
编辑:
如果找不到要安装的/etc/apt/sources.list
文件,请编辑您的文件,并确保以下行未被注释掉#
:
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
如果已将其注释掉,请删除该#
行前面的,然后运行sudo apt-get update
以更新存储库,然后重新运行sudo apt-get install unclutter
。
如果我运行以下命令,我们可以看到该unclutter
应用程序来自trusty universe
存储库。
:~$ apt-cache showpkg unclutter
Package: unclutter
Versions:
8-19 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages
MD5: f0e9ff67c42a9d3dc35bb595d2f84a7b
Description Language: en
File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-en
MD5: f0e9ff67c42a9d3dc35bb595d2f84a7b
:~$ dpkg -s unclutter
Package: unclutter
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 76
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 8-19
Depends: debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.3.4), libx11-6
Conffiles:
/etc/X11/Xsession.d/90unclutter 9b47a483264cfc6a155fbd65cd8a3e6e
Description: hides the mouse cursor in X after a period of inactivity
unclutter hides your X mouse cursor when you don't need it, to prevent it
from getting in the way. You have only to move the mouse to restore the
mouse cursor.
Original-Maintainer: Axel Beckert <abe@debian.org>
Homepage: ftp://ftp.x.org/contrib/utilities/
希望这可以帮助!
init.d
文件夹中创建文件吗?