LoginSignup
8
13

More than 3 years have passed since last update.

Linux でマウスカーソル/ポインタを消す方法まとめ

Last updated at Posted at 2015-02-03

動機

某組込機器でマウスカーソルを消したかったので調査。

常に消したいとき

環境に合わせて、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/
マウスポインタもシャイで困る

8
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
13