x11-misc/synergy contains a server daemon and a client daemon. The procedure to autostart the daemons is described in the synergy faq on the homepage. It would be nice to have the ebuild provide tools for starting the daemons with the xsession on both the system and the user level. Caveat: synergy doesn't provide any sort of authentication. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 142030 [details] synergy server init script synergy server init script
Reassigning to herd since nakano has retired from Gentoo.
Doesn't this also need xdm? I thought it had to start after xdm/kdm/gdm did. Or is there a way to check to see if xdm started and if it fails, don't launch this? No point in running synergy if xdm doesn't start. (by xdm I mean the rc script). I will research this later. I will be nice to Flameeyes and incorporate all the fixes into one ebuild so then he doesn't have a lot of work to do. :) I will work on that in the next day or two as I reconfigure my system. I need synergy, so the perfect time to test out new features. Cheers all.
Created attachment 160148 [details] synergy.inid.d This is a new init script that I created that allows for starting and stopping of both server and client. You need to choose which one you want to use via the new conf.d file. You can set options for most of the features of synergy. I haven't tested this yet as my Linux machine is still compiling. -_- Long story that. Anyways, I would like people to go over this script line by line to see if I did A) everything correctly, and B) if I did things the Gentoo way. Please suggest changes here and I will make them. Also please see if this starts and stops a server, and then test the client. I hope I have everything correct. Sorry, I kinda changed almost everything in the script that was posted here. It's more dynamic now, I think. Thanks and let me know how it works. I will upload the conf.d script next.
Created attachment 160150 [details] synergy.conf.d Oh, btw, I couldn't obsolete the previous init script. This is the conf.d for the new synergy init script. I will be bundling this with the new ebuild that fixes some other issues if there is nothing wrong with both this and the init scripts. Please look at the descriptions I have and tell me if they are good. If you can think of a better way of saying what I have, please tell me. One description is really large and I wish to make it shorter, so please help me perfect what I have there. Thanks.
That looks nice, I will try in the next days. But I have an additional feature request. Would it be possible to start a ssh tunnel connection to the server and connect the client to localhost (which is then tunneled to the server)? Regards, Chris
That shouldn't be too difficult. The synergy client computer needs to run: ssh -f -N -L 24800:synergy-server:24800 synergy-server while the server just starts normally. The client also uses the normal syntax of: synergyc synergy-server. So, it's just a matter of adding that into to the script. However, the only real issue is authentication. Using this, the ssh needs to be thrown in background and if user isn't logged on, then will they see the message when they log on? The only viable solution would be to use authorized keys for automatic logon. That would be the only way to do that. The other solution would be to not have this start at boot, and just login, type the ssh command and then start the client. Something to think about. :)
So, has anyone tried these new init scripts yet? If so, how well do they work, if at all? Thanks
Why do you use the config file /etc/synergy/synergy.conf? The version vom portage uses /etc/synergy.conf. After editing the init script to match the config file path at least the server works. The client logs to syslog: ARNING: synergyc.cpp,337: cannot open secondary screen: unable to open screen If I have some time I will look at that.
Auto start instructions can be found at http://synergy2.sourceforge.net/autostart.html It does not involve init.d start scripts. It requires configuration of the relevant login xdm/kdm/gdm.
Very well, the "Gentoo Way" could also be with /etc/local.d/*.start
Created attachment 335782 [details] synergy init script hi, I'd love synergy to have a init script (/etc/init.d/synergy), this is my attempt here. I've tested with server mode, it works well. It might also very easy to adjust to client mode. Also user can configure /etc/conf.d/synergy to customize their needs.
Created attachment 335784 [details] synergy conf.d file also the conf.d file, which user can put their user name, choose server or client mode. cheers.
to make init stop works well, add "-f" into SYNERGY_OPTS. Make synergy run as foreground mode.
Quote: Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. It's best to have the display manager start synergy. So, the init script doesn't really useful, it won't work unless X start, Better put it into WM start script.
I'm at a loss as to what this provides. I don't see the advantage of this method over hooking it in the X session manager and having it start synergy for you.
(In reply to Doug Goldstein from comment #16) > I'm at a loss as to what this provides. I don't see the advantage of this > method over hooking it in the X session manager and having it start synergy > for you.