You're viewing a single post. I have much more to say! The main blog page is a good starting point.
Friday, March 10, 2006 ★ 16:07 ★ Category Linux
If you ever use two machines at the same time and they’re both on the same desk, I’m sure you have at least once made the mistake I make every couple of minutes: you use the wrong keyboard and mouse.
This is where x2x comes into play. Quoting the man page: “x2x allows the keyboard and mouse on one X display to be used to control another X display.” In my case, the laptop screen is on the left side (west) of my desktop monitor, so I run the following command on my laptop to connect to my desktop machine:
ssh -X desktop-machine x2x -west -from :0
After logging in (without prompting for a password, thanks to ssh-agent) I can use my desktop keyboard and trackball (I don’t like mice) to control both machines. Of course you need to enable X forwarding over ssh (edit /etc/ssh/sshd_config to turn it on) first. When I move my mouse to the left side of my desktop monitor, it jumps over to the right side of my laptop screen. Rock!
Update: Running this x2x setup concurrently the other way around (from desktop to laptop) causes an infite input loop on both machines. I had to pull the plug (just the network cable) to regain control over my keyboard… so, only use this in one direction!
Random photo from Gouda (December, 2008)
Wouter Bolsterlee, also known as uws, a postmodern geek living in the Netherlands. Read more about me…
Unless stated otherwise, all material on this site is available under a Creative Commons Share-Alike license.