Difference between revisions of "KVM Alternatives for Linux"
m (→x2x aka X Windows to X Windows Connection Utility) |
m (→x2x aka X Windows to X Windows Connection Utility) |
||
Line 62: | Line 62: | ||
What if you want to be able to COPY and PASTE between the two systems? Well use a different method to connect. On the SLAVE computer you need to execute this command: | What if you want to be able to COPY and PASTE between the two systems? Well use a different method to connect. On the SLAVE computer you need to execute this command: | ||
xhost 192.168.x.x | xhost 192.168.x.x | ||
− | Where the IP address of the MASTER system is after xhost. | + | Where the IP address of the MASTER system is after xhost. You will get an exit status confirmation: |
+ | 192.168.x.x being added to access control list | ||
On the MASTER computer type: | On the MASTER computer type: |
Revision as of 19:56, 12 January 2020
If you have multiple computers on your desktop there are a number of scenarios for using them:
- Many keyboards and mice all around your work space, a pair for each system.
- Remote desktop for VNC where you lose all the screen real estate on your secondary computers and end up with their desktops showing in a window on your primary computer.
- Physical KVM switch with all of the cords running in and out of that to the computers
- x2x software utility
x2x aka X Windows to X Windows Connection Utility
x2x allows the keyboard and mouse on one ("from") X display to be used to control another ("to") X display. Since x2x uses the XTEST extension, the "to" X display must support XTEST.
If x2x is built under Cygwin (on Windows XP or Windows 2000) then the -fromwin option may be specified to allow the "from" display to be the Windows desktop. (The Cygwin build also supports use of an X display for the "from" screen). Use of -fromwin sets the default behaviour as if the -big -west -capslockhack options had also been given.
In the default interface, x2x puts a window on the "from" display. This window is labeled with the name of the "to" display. Keystrokes typed into this window go to the window on the "to" display that has the input focus. Clicking on the x2x window causes the mouse on the "from" display to control the cursor on the "to" display. Performing a subsequent multiple button click on the "to" display returns control to the "from" display.
If the -fromwin, -north, -south, -east or -west options are specified on the command line, x2x starts up with a different interface. When the mouse moves to the top, bottom, east side or west side of the default screen on the "from" display, the cursor slides over to the "to" display. When the mouse returns to to side of the "to" display that it entered, it slides back onto the "from" display.
Unless the -nosel option is specified, x2x relays X selections from one display to the other. (If -fromwin is specified then the X selection is relayed to and from the Windows clipboard as text strings).
Here are a few hints for eXcursion users (based on Intel version 2.1.309). First, use the -big option. Second, in the control panel, under mouse, check the box that enables "Automatically Capture Text on Button Up." X selections will then automatically move into the Windows clipboard. As is the case with all X applications running on 2.1.309 (including x2x), you will need to do an extra mouse click after performing the X selection for this operation to work. x2x is known to work poorly with eXcursion running on Windows 95, probably due to the Windows 95 task scheduler. x2x does work well with eXcursion running on Windows NT.
The hints for eXcursion are also valid for Exceed, with the exception that X selections work better, as long as you are using x2x version 1.25 or later.
Command 'x2x' can be installed with:
sudo apt install x2x
On the SLAVE computer you will want to enable X11Forwarding
sudo vi /etc/ssh/sshd_config
# ForwardX11 no
This is remarked out so X11 forwarding is already enabled
X11Forwarding yes
SSH to the SLAVE computer from your MASTER computer and run x2x:
ssh -X 192.168.x.x 'x2x -east -to :0'
Where -X option tells ssh to enable X forwarding. The EAST indicates which side of your screen will pass the mouse to the second display. Now you should be able to move your mouse between the two X sessions by moving your mouse off the screen to the right (east).
What if you want to be able to COPY and PASTE between the two systems? Well use a different method to connect. On the SLAVE computer you need to execute this command:
xhost 192.168.x.x
Where the IP address of the MASTER system is after xhost. You will get an exit status confirmation:
192.168.x.x being added to access control list
On the MASTER computer type:
x2x -to 192.168.x.x:0.0 -east
Where the IP address of the SLAVE system is specified