'How can I control mouse by sending unix domain packets to x.org server using echo and netcat

I know that tools like xdotool can do the job, but it's not pre-installed.

I want to use the low-level API (i.e. the X Window client and server protocol directly).

I connect the server using nc -U /tmp/.X11-unix/X0 successfully in Ubuntu 20.04, but I don't know which command to send.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source