Synergy - one keyboard-mouse for all computers
There is a wonderful synergy program . Allows you to use one set of keyboard-mouse multiple computers. It is cross-platform, works on MS systems - both Windows and NT, on Mac OS X. Well, and of course - on X11.
We have already talked about synergy here , I’ll add a little.
I will not touch Windows and OS X, I will pay attention only to X11.
The computer to which the keyboard is connected and the mouse acts as a server starts up on it
Installing Debian-like systems:
Example config /etc/synergy.conf. In the center is the main computer, laptop1 to the left of it, laptop2 to the right. They all form a ring - when the pointer crosses the left edge of the left screen, it appears on the right edge of the right.
Starting the server is a command
Connection -
The server works only in Xs, and only in the active X server - in that it accepts input from HIDs. If you switch to another console, including another X server, then synergys ceases to serve clients. Until the X server again receives the keyboard and mouse.
When several users alternately work on the same computer, you can run synergys on each X server, including the one where GDM is running. Each synergys uses its own TCP port, and as for the config, one is enough for everyone. The default port is 24800. A key is used to specify the port
Synergy is not very safe. All keystrokes are transmitted in clear text, there are no built-in encryption mechanisms. SSH with port forwarding will come to the rescue. Local forwarding. About forwarding, you can read the
Ssh starts first:
The local port 24800 is forwarded to port 24800 of the server. ssh went into the background (key
Now about usability. If the server can be started at the start of the X automatically - by typing in .xsession, or, in accordance with today's fashion - by clicking the mouse in the GNOME / KDE / XFCE / LXDE control center, then dealing with the client is more complicated. It is better to run it interactively.
There is a quicksynergy utility. X, more precisely - under the GTK. So here. I do not like her. In order to start the client, you need to go to the tab, enter the server name, click "start", then click "close" so that it hides in the tray. Only the last entered server remembers. The tray icon is too healthy - it catches the eye. ssh is not able to start. Vobschem - a terrible thing. I do not use it.
I wrote my scriptto start and stop the client. Normal shell script. On my computer this script is called ~ / bin / syn
When launched without parameters, it
Configuration in the script text itself. The block
Configuration example. The name of the first host, home, for example - main.example.com, there are two X servers on it - 2 users work. Accordingly - two synergy servers. The name of the second host, for example, at work is second.example.com. There is one X server. Local ports must be different so that multiple clients can be started simultaneously.
Also, it’s nice to fix
Client launch:
Viewing the status of a running client:
Kill a client:
Viewing the status of a non-running client:
PS For bystoro launch anything from the command line, I use Tilda tied to the keys.
We have already talked about synergy here , I’ll add a little.
I will not touch Windows and OS X, I will pay attention only to X11.
The computer to which the keyboard is connected and the mouse acts as a server starts up on it
synergys. Other computers - clients - runs on them synergyc, which connects to synergys. By TCP, of course. All settings are done on the server side. The config describes the location of the server and client screens relative to each other - right, left, top, bottom.Installing Debian-like systems:
apt-get install synergy
Example config /etc/synergy.conf. In the center is the main computer, laptop1 to the left of it, laptop2 to the right. They all form a ring - when the pointer crosses the left edge of the left screen, it appears on the right edge of the right.
# /etc/synergy.conf
#
# Screens of all computers, including server
# Are called hostnames by computer names
section screens
main:
laptop1:
laptop2:
end
#
# Mutual arrangement of screens
section links
main:
left: laptop1
right: laptop2
laptop1:
left: laptop2
right: main
laptop2:
left: main
right: laptop1
endStarting the server is a command
synergys. Connection -
synergyc имя_или_адрес_сервера. If the host client name is different from what is specified in the server config, then you can specify the parameter -n имя_клиентаwhere client_name is the name from the config. The server works only in Xs, and only in the active X server - in that it accepts input from HIDs. If you switch to another console, including another X server, then synergys ceases to serve clients. Until the X server again receives the keyboard and mouse.
When several users alternately work on the same computer, you can run synergys on each X server, including the one where GDM is running. Each synergys uses its own TCP port, and as for the config, one is enough for everyone. The default port is 24800. A key is used to specify the port
-a [адрес][:порт]. Example:synergys -a :24801. Address not specified - listens on all interfaces. Synergy is not very safe. All keystrokes are transmitted in clear text, there are no built-in encryption mechanisms. SSH with port forwarding will come to the rescue. Local forwarding. About forwarding, you can read the
man ssharticle SSH Port Forwarding . Ssh starts first:
ssh -f -L24800: server_name or address: 24800 server_name or address sleep 10
The local port 24800 is forwarded to port 24800 of the server. ssh went into the background (key
-f) and runs on the remote side sleep 10. In these 10 seconds, you need to have time to start synergyc, otherwise ssh will shut down.synergyc localhost
Now about usability. If the server can be started at the start of the X automatically - by typing in .xsession, or, in accordance with today's fashion - by clicking the mouse in the GNOME / KDE / XFCE / LXDE control center, then dealing with the client is more complicated. It is better to run it interactively.
There is a quicksynergy utility. X, more precisely - under the GTK. So here. I do not like her. In order to start the client, you need to go to the tab, enter the server name, click "start", then click "close" so that it hides in the tray. Only the last entered server remembers. The tray icon is too healthy - it catches the eye. ssh is not able to start. Vobschem - a terrible thing. I do not use it.
I wrote my scriptto start and stop the client. Normal shell script. On my computer this script is called ~ / bin / syn
When launched without parameters, it
~/syngives a short help on how to use it. Configuration in the script text itself. The block
case $TARGET inimmediately following the comment # Start user configurable settings. Configuration example. The name of the first host, home, for example - main.example.com, there are two X servers on it - 2 users work. Accordingly - two synergy servers. The name of the second host, for example, at work is second.example.com. There is one X server. Local ports must be different so that multiple clients can be started simultaneously.
# ...
# Start user configurable settings
case $ TARGET in
d1)
# First host, first X server
SYN_LOCAL_PORT = 24800
REMOTE_HOST = 'main.example.com'
SYN_REMOTE_PORT = 24800
d2)
# First host, second X server
SYN_LOCAL_PORT = 24801
REMOTE_HOST = 'main.example.com'
SYN_REMOTE_PORT = 24801
w)
# Second host
SYN_LOCAL_PORT = 24802
REMOTE_HOST = 'second.example.com'
SYN_REMOTE_PORT = 24800
# ...Also, it’s nice to fix
Defined tragetsthe usage function line that the script starts with. Client launch:
$ ./bin/syn d1 start Starting: 'ssh -f -L24800: main.example.com: 24800 main.example.com sleep 10' .. done. Starting: 'synergyc 127.0.0.1:24800' .. done.
Viewing the status of a running client:
$ ./bin/syn d1 status Checking ssh process: 'ssh -f -L24800: main.example.com: 24800 main.example.com sleep 10' .. running, PID 18503. Checking synergyc process: 'synergyc 127.0.0.1:24800' .. running, PID 18505.
Kill a client:
./bin/syn d1 stop Killing: 'synergyc 127.0.0.1:24800' .. done Killing: 'ssh -f -L24800: main.example.com: 24800 main.example.com sleep 10' .. done.
Viewing the status of a non-running client:
./bin/syn d1 status Checking ssh process: 'ssh -f -L24800: main.example.com: 24800 main.example.com sleep 10' .. stopped Checking synergyc process: 'synergyc 127.0.0.1:24800' .. stopped.
PS For bystoro launch anything from the command line, I use Tilda tied to the keys