Talk:X Windows to X Windows

Return to "X Windows to X Windows" page.

From Tech Article

There are two ways to run x2x on Linux, the easiest is to use ssh with X forwarding enabled and ssh from the primary system to the secondary system and run x2x on the secondary system:

 primary $ ssh -X secondary x2x -east -to :0

The -X option tells ssh to enable X forwarding. The "x2x ..." tells ssh to run x2x on the remote system (secondary) rather than running the shell. The "-east" option tells x2x where one system is relative to the other: to the east or west (-west).

The primary system is the system whose keyboard and mouse you are actually using. The secondary system is the one that is going to share the primary system's keyboard and mouse.

Now, if you move the mouse on the primary system over to the edge where the secondary system is the mouse pointer should move from the primary screen to the secondary screen and from now on any mouse movement should be passed to the secondary system and anything you type on the keyboard should be sent to the secondary system. If this doesn't work try moving the mouse to the other side of the screen, if that works then restart the command using "-west" rather than "-east".

The other method of running x2x on a Linux system is to run it directly on the primary system and tell it to connect to the X server on the secondary system:

 primary $ x2x -to secondary:0.0 -east

The reason this is not the easy method is that you also need to enable remote X access on the secondary system using xhost:

 secondary $ xhost primary

and you also need to open TCP port 6000 on both systems. The easiest way of doing this is going to depend on your distro.

The main advantage of the second method is that copy/paste will now work between systems.

Cursor constrained: Dead Zone: Dual Monitors

https://github.com/dottedmag/x2x/issues/5

ssh -X 192.168.1.15 'x2x -east -noscale -to :0'
  • the -noscale option is not available in all versions.
Last modified on 22 October 2020, at 16:26