Take a look at Xdmx.
Say you are running Xdmx on a machine called x0 and you have two other machines available,
x1 and x2, both of which have X servers running on them (i.e., you have logged into the
console on x1 and x2 and are running an X session). To start Xdmx, use the following command:
Xdmx :1 +xinerama -display x1:0 -display x2:0
There should now be an X server running on x0 with the DISPLAY name ":1" (or, "x0:1"). The
displays on x1 and x2 provide a unified input display, and the mouse on x1 should be able
to move the cursor from x1 to x2 and back again. You can now set up applications to run
on ":1", with the output being displayed on the x1 and x2 displays.
To include the local display, prepend another -display option naming the local display device (that is, :0).