Using x2x on Linux for KVM like goodness

Recently I purchased one of those little “nettop” computers to plug into my HDTV and act as my multimedia center (more on that when it arrives). I also purchased a IR remote, but I wanted a way to be able to use a keyboard and mouse on it as well, as it is more than just a movie player. However, I didn’t want a physical keyboard/mouse, as that would look out of place.

After reading up on the subject, I decided to give Synergy a try. Synergy lets you use use your keyboard and mouse on another computer over a network, just as if it was a second screen attached. Synergy looked promising, but several things about it did not work out for me.

Being a network application, Synergy consists of both a client app and a server app. It turns out that with Synergy the “server” is the computer with the keyboard and mouse you want to use on multiple machines. I’m sure this works fine for most people, but it does not make sense for my multimedia system. This computer will be on most of the time, being controlled by several different machines For my setup, the logical place for the “server” would be the multimedia system. I probably could have hacked it to make the client (running on my server) act more like a server, except each time the client app fails to connect to the server (running on my laptops), the time it waits for another connection increments.

When looking for Synergy alternatives, I found x2x. x2x is only designed for Linux, so it would not be usable for someone who needs to use a keyboard and mouse on multiple operating systems. I only use Ubuntu Linux at home, so this was not a problem for me. An advantage of x2x is that setup is very simple. First, install the x2x package (“x2x” in Ubuntu) on both machines, and openssh-server on the computer you want to control remotely. Then, from the computer with the keyboard and mouse you want to use on another system, run:

ssh -X user@server x2x -south -to :0

With this, you can now move your cursor beyond the bottom of your screen, onto the remote system. If you want to use a different edge of your screen, replace -south with -north, -east or -west. If you have key based authentication set up for ssh, you could stick this into the applications menu.

Updated 08 January 2010

It seems there is a bit of an issue with x2x in Ubuntu 9.10. Some people are seeing the following error when they try to run x2x:

No protocol specified
x2x - error: can not open display :0

To work around this issue until it is fixed, SSH into the box you want to remotely control, then run the following command:

xauth merge /var/run/gdm/auth-for-$USER-*/database

Tags: ,

One comment


AWSOM Powered