Forward keyboard and mouse over ssh

From Urandom
Revision as of 11:24, 2 January 2013 by Martivo (talk | contribs) (Created page with "== X2X == I have a PC that is connected to my TV. It does not have a mouse or keyboard, because I use SSH and my laptop. There is a program called x2x. * First enable X11 forwar…")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

X2X

I have a PC that is connected to my TV. It does not have a mouse or keyboard, because I use SSH and my laptop. There is a program called x2x.

  • First enable X11 forwarding on your server.(/etc/ssh/sshd_config)
X11Forwarding yes
  • I use this script to connect, put it for example in /usr/bin, then you can simply use Run.
  • This however does not ask for password, use .ssh/authorized_keys
#!/bin/sh
ssh -YC HOSTNAME "x2x -big -label LABELNAME -to :0" &

If you look at the manual then you can use it also like a second monitor so that the mouse switches from screen edge. But i prefer clicking on the label.


X2VNC

If you want to connect a linux mashine and a windows to the same keyboard and mouse like they were one screen, then i suggest using TightVNC server on the windows machine and x2vnc on the linux box. Create an invitation from the windows box and run the command in linux.

#!/bin/sh
x2vnc -west -listen