linux怎样设置窗口自动隐藏,linux下隐藏鼠标的方法

最近工作需要,调查了一下如何在界面启动以后不显示鼠标光标,但是触摸屏可以正常工作,现将方法总结一下:

1:使用XCursor Transparent Theme 方法

下载xcursor-transparent-theme-0.1.1.gz,解压;

编译,安装;

./configure

cd cursors

make install-data-local DESTDIR=/home/user/.icons/default CURSOR_DIR=/cursors

chown -R user:user /home/user/.icons 同时需要创建一个配置文件,路径事 ~/.icons/default/index.theme内容为:

Code:

[Icon Theme]

Inherits=xcursor-transparent 我实验了,这个和下面要介绍的xsetroot效果一样,可以在桌面上隐藏鼠标,但是进入其他界面后鼠标依然出现。

2:就是使用unclutter,这个可以起作用,但是不是我想要的效果;

./unclutter: usage:

-display -idle time between polls to detect idleness.

-keystroke        wait for keystroke before idling.

-jitter pixels mouse can twitch without moving

-grab            use grabpointer method not createwindow

-reset            reset the timer whenever cursor becomes

visible even if it hasn't moved

-root                   apply to cursor on root window too

-onescreen        apply only to given screen of display

-visible               ignore visibility events

-noevents              don't send pseudo events

-regex            name or class below is a regular expression

-not names...        don't apply to windows whose wm-name begins.

(must be last argument)

-notname names...    same as -not names...

-notclass classes...    don't apply to windows whose wm-class begins.

(must be last argument, cannot be used with

-not or -notname)

原因事它总有一刹那是出现鼠标的;

3:xsetroot -cursor blank.bmp blank.bmp

其中blank.bmp是使用bitmap &制作的的一个空白鼠标;

效果是可以在桌面上起作用,但是在程序界面鼠标依然出现;

4:setterm -cursor off关闭终端界面的光标;

5:oneko一个类似于unclutter的程序;

6:在调用startx启动的桌面系统中给XSERVER传递参数serverargs=" -nocursor ",这个可以起作用;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值