Georg Posted March 15, 2018 Share Posted March 15, 2018 Hi, I use synergy 1.8.8 to share input devices between my desktop and my notebook, both running LINUX. The notebook is sitting in a docking station, and on demand, I can extend the notebook screen to the desktop monitor. When doing the switch from "notebook only display" to "extended display" via xrandr while synergy is active, the mouse will be trapped in a fraction of my desktop monitor which is as large as the notebook screen. I.e. there is a geometry issue here with synergy, which I can easily work around by first clicking "Stop" in the context menu of the synergy icon in the tray, then doing the screen extension command and finally resuming synergy clicking "start". To simplify this process, I want to do the "Stop/Start" synergy in the same script I use to do the screen expansion. So, long story short, the simple question is: what is the command-line command to talk to an existing synergy instance to make it Stop/start? best Georg Link to comment Share on other sites More sharing options...
UniTrader Posted March 15, 2018 Share Posted March 15, 2018 this should do the trick killall synergys # randr stuff synergys requires that the Synergy Server Executeable is somewhere in your PATH folders for executeables - if installed with your Package Manager it should be. If not you have to include the path to the Executeable, too. Link to comment Share on other sites More sharing options...
Georg Posted March 15, 2018 Author Share Posted March 15, 2018 first: thanks for the reply! And to the topic: yeah, there's always that "kill 'em all" thing, but I thought it might be possible to do it via a switch (IF synergy itself is doing it differently at all?): synergy running normally: ps -Al | grep syner 0 S 1050 971 941 0 80 0 - 179081 SyS_po ? 00:01:06 synergy 0 S 1050 4866 971 0 80 0 - 36322 - ? 00:00:00 synergyc "stop" in tray icon: ps -Al | grep syner 0 S 1050 971 941 0 80 0 - 179081 - ? 00:01:06 synergy "start" in tray icon: ps -Al | grep syner 0 S 1050 971 941 0 80 0 - 179081 - ? 00:01:06 synergy 0 S 1050 5449 971 0 80 0 - 19840 - ? 00:00:00 synergyc so, what the button is doing is indeed probably as simple as a killall synergyc I'm gonna try... Link to comment Share on other sites More sharing options...
Georg Posted March 16, 2018 Author Share Posted March 16, 2018 ok, it turns our to be a little more tricky: synergyc is the client, which by default has the restart feature enabled, so just killing synergyc via killall will just trigger an instant restart. My current solution is therefore a killall synergy followed by a killall synergyc which first kills the shepherd preventing the instant restart and then the client. This appears like a "rough" method to solve this, so just in case someone cares: I'm still interested in the solution that synergy itself is using when re-starting the client only on demand. Link to comment Share on other sites More sharing options...
Bonzo the clown Posted March 19, 2018 Share Posted March 19, 2018 ssh -Y synergy@mylinuxbox 'export DISPLAY=:0; service synergy restart' Link to comment Share on other sites More sharing options...
Georg Posted March 19, 2018 Author Share Posted March 19, 2018 Hi clown, thanks for the answer. You are suggesting to re-start the server? I don't start the server via systemd (I don't know the "service" command?), but of course I could as well kill the server using my above listed sequence. But even then, my question would still be: via the GUI I can "stop" the synergys/c component and re-start it by clicking "stop/start". When doing so, the synergy process keeps running - even when synergy is not started via systemd - how does it do that? Link to comment Share on other sites More sharing options...
Bonzo the clown Posted March 19, 2018 Share Posted March 19, 2018 I run synergy server on Mac, and client on Debian linux. The client (synergy-service) runs as a systemd service which will respawn if killed. See /lib/systemd/system/synergy.service The "synergy-core" process spawns a child process (synergy-core) which does the actual work. e.g. ps -ef|grep syn root 5425 1 /usr/bin/synergy-service bclown 5440 5425 /usr/bin/synergy-core --client -f --run-as-uid 1000 \ --debug DEBUG --name mylinuxbox \ --enable-drag-drop --profile-dir /var/lib/synergy \ --log /var/log/synergy/synergy-core.log 127.0.0.1:24801 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.