Enter x2x. There are a number of limitations, not the least of which is an inability to share clipboard and you are limited to 2 computers. The clipboard is a slight limitation, but I've never had a need for more than 3 or 4 displays and two computers can easily keep up with that requirement.
The most important things to me are speed and stability and I get both of those with x2x. I also don't need start software on both machines to make it work, ssh does all of that for me. However, I do need to have x2x installed on both machines. On Ubuntu that's s simple command:
sudo apt-get install x2x
Next, on the computer that is sharing the keyboard and mouse(the from machine), execute this command:
ssh -XC user@host x2x -east -to :0.0
If you have set up key authentication, this will automatically log you in and start the session. If you specify -east like I did and you move your mouse off the right side of the screen, it will now show up on the host that you specified. I have not had the opportunity to do so yet, but at some point I will try it the opposite direction, specifying -from instead of -to in order to see if I can make this work every time I turn my laptop on and my desktop is available on the network. You can do this with a simple startup script that does a single ping to a machine on the network and returns the result. Theoretically(as I said I haven't tested yet) this should work.
ping -c 1 host
result=$?
if [ 0 -eq $result ]; then
ssh -XC user@host x2x -west -from :0.0
fi
No comments:
Post a Comment