A trick: how to move a pointer remotely

From: Michele Andreoli (m.andreoli@tin.it)
Date: Tue Jan 08 2002 - 21:10:50 CET

I did today this interesting experiment; maybe, someone may get inspired
like me. In summing up, when I move the mouse on the machine A, I can see
the pointer flying on the screen of the machine B, also under X.

I used a network link made with netcat (nc) in the standard way. I will
describe the procedure because it show how simple is to use the shell
in order to do complex things under linux (only two lines of coding)

machine A: (here, I move the mouse)
        # dd if=/dev/mouse bs=1c | nc -l -p 5555

This read continously the /dev/mouse device, a char at the time, and
pipe it to netcat. netcat is started in server mode (-l), and it wait
at the tcp port 5555 for a client request.

(I always use 5555 as port number, because unregistered, but 6666
is the same )

machine B: (here, I see the pointer on the screen)

        # nc machine_A_address 5555 | dd of=/dev/mouse bs=1c

This reverse the mechanism, previously described.
Note: the mouse server gpm is required (at least, on the machine A)
or the X server, or mouse is unactive.

This work ok because the flux is monodiretional; but with a modem?



I keep trying to locate a meeting of Quantum Physicists. But everytime
they set a meeting time, the location changes. And vice versa -- Anonymous
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk

This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:21 CET