News | People | Our Github

Controlling your program with x2x

 

Since the boba machines do not have keyboards directly attached to them, you must send keyboard commands to Chromium using 'x2x'.

Installation:

Please read the x2x man page for more information.
To download x2x source, click here.

To build x2x, unpack the archive and run the following commands inside the unpacked directory:

 xmkmf
make

Usage:

To route keyboard/mouse input to a single computer, such as boba142, type:
 x2x -from localhost:10.0 -to boba142:0 -geometry 400x400

Options:

'-from' tells x2x where the key commands will originate. For information on how ssh handles DISPLAY variables, look here.
'-to' tells x2x where to send key commands
'-geometry' gives the size of the window that will open
'-shadow' copy the output to an additional machine

A 400x400 window with "boba142:0" written in the center will now appear. To send keys to boba142, simply type key commands into the active x2x window. If you would like to use your mouse on boba142, click your left or right mouse button on the x2x window. Your cursor should change and all of your mouse movements will be routed to boba142.

To restore mouse control, press the left and right mouse buttons together.

If you would like to send input to more than one computer at a time, use the ‘-shadow <display>’ option. This can be used multiple times.

Here is an example that routes input to boba142 and all 9 powerwall machines:

bobakeys.sh:

 ~/bin/x2x -from $LOCALDISPLAY -to boba142:0 \
-shadow boba231:0 -shadow boba211:0 -shadow boba121:0 \
-shadow boba141:0 -shadow boba131:0 -shadow boba111:0 \
-shadow boba232:0 -shadow boba212:0 -shadow boba122:0 \
-geometry 400x400