Ubuntu – Command to Move Mouse Pointer to Other Screen


I have a dual monitor configuration in Ubuntu.

What is a bash command which will send my mouse pointer into the other screen (without having to manually move the mouse pointer myself)?

Best Answer

You can install the xdotool utility and then move the mouse to a given screen and x and y position, eg:

xdotool mousemove --screen 1 10 10

If your 2 screens are actually one large virtual screen (xinerama mode) you dont use --screen but give a very large x value.

Related Question