Size: 2899
Comment:
|
Size: 2902
Comment: cleaning
|
Deletions are marked like this. | Additions are marked like this. |
Line 47: | Line 47: |
There's another way of using x2x which uses ssh tunneling, which is more secure than enabling TCP connections under the login manager. This method was taken from here: http://wiki.gulalug.org/index.php?title=HOWTO_x2x | There's another way of using x2x which uses ssh tunneling, which is more secure than enabling TCP connections under the login manager. This method was taken from [http://wiki.gulalug.org/index.php?title=HOWTO_x2x here]. |
This howto explains how to configure ubuntu to be remote controlled using x2x
Remote controlling ubuntu with x2x
Prequisites
Ubuntu can be controlled remotely very easily, but some setup is being necessary. First install x2x on the computer you want to use the mouse/keyboard on. If you want to be able to use your mice/keyboards both ways you need to repeat all the steps here for both computers.
Gnome (GDM) Instructions
Then go to Computer -> System Configuration -> Login Screen Setup. A password prompt will show up, enter your password (this requires sudo access). Go to the Security tab and make sure "Always disallow TCP connections to X server" is unchecked. The default security policy in ubuntu is to always deny remote X connections, however x2x requires this, since it's actually run from another host.
WDM Instructions
Just open /etc/X11/wdb/Xservers on your beloved editor (mine is emacs 0:^) and remove the -nolisten TCP option.
NOTE
After making those changes restarting your X server may be required.
Please be aware that this opens a system service which could be exploited remotely if not configured/used properly! The method described here allows all connections from the remote host to connect to the X server on the client. This could be a security hole e.g. the "server" being a multi user machine: All users on the Server have access to the client X-Server!
Using x2x
So in this example we will use the names workstation for the computer you want to use your mouse/keyboard on and laptop the one you want to allow access to. We will also assume that the workstation is stationed to the left of the laptop.
On "laptop", type the following:
xhost +workstation
From the "workstation" host, type the following in the terminal:
x2x -to laptop:0.0 -east
You can change -east to -west, -north or -south, depending on your setup.
Using x2x with SSH
There's another way of using x2x which uses ssh tunneling, which is more secure than enabling TCP connections under the login manager. This method was taken from [http://wiki.gulalug.org/index.php?title=HOWTO_x2x here].
First, on the machine you want to control install ssh and x2x:
sudo aptitude install ssh x2x
Next, you need to enable X Forwarding, this is enabled in ubuntu by default, but if for some reason it's not, you need to edit /etc/ssh/sshd_config and uncomment the line that says:
X11Forwarding yes
Finally, in the remote machine that will control the keyboard & mouse login through ssh:
ssh -X user@machine
and execute the following:
x2x -east -to :0. &
And that's all.
For more x2x options, consult the man page of x2x(1):
man x2x