Engineer Streams USB Mouse Over WiFi Using Netevent and Systemd

A developer without a USB-C adapter devised a way to use a USB mouse connected to one machine on a separate laptop over the network. The solution uses netevent, a small Linux tool that captures raw input events from a device and streams them via a pipe to recreate a virtual mouse on the receiving machine. An initial SSH-based one-liner worked but introduced security and reliability concerns, prompting a more robust setup. The author replaced it with a systemd socket-activated service bound exclusively to a Tailscale network interface, ensuring encrypted, authenticated access with no LAN exposure. Additional hardening measures included limiting simultaneous connections to one and using a short-lived dynamic user with only the input group privilege, eliminating the need for root access.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in