動機
某組込機器でマウスカーソルを消したかったので調査。
常に消したいとき
環境に合わせて、X11 起動時に以下のように -nocursor
を付与して実行。
$ Xorg -nocursor
$ X -nocursor
$ xinit -- -nocursor
$ startx -- -nocursor
動作を指定して消したいとき
Ubuntu にて。 unclutter 使用。
$ sudo apt-get install unclutter
$ unclutter --help
unclutter: usage:
-display <display>
-idle <seconds> time between polls to detect idleness.
-keystroke wait for keystroke before idling.
-jitter <pixels> 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)
$ unclutter -idle 0.1 -root
とすると、アイドル状態が 0.1 秒続いたら消す、の設定。何か操作すると再表示。
参考
http://www.noah.org/wiki/cursor_disable_in_X11
http://www.x.org/wiki/AdvancedTopicsFAQ/
マウスポインタもシャイで困る