Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111174 - x11-misc/synergy: init script request
Summary: x11-misc/synergy: init script request
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-01 11:01 UTC by Andrey Kislyuk (RETIRED)
Modified: 2014-05-06 02:34 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
synergy server init script (synergys,588 bytes, text/plain)
2008-01-28 17:03 UTC, Christian Lete
Details
synergy.inid.d (synergy.inid.d,1.52 KB, text/plain)
2008-07-11 22:12 UTC, Jon
Details
synergy.conf.d (synergy.conf.d,1.37 KB, text/plain)
2008-07-11 22:16 UTC, Jon
Details
synergy init script (synergy,661 bytes, text/plain)
2013-01-16 08:15 UTC, Yixun Lan
Details
synergy conf.d file (synergy,1.23 KB, text/plain)
2013-01-16 08:17 UTC, Yixun Lan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kislyuk (RETIRED) gentoo-dev 2005-11-01 11:01:47 UTC
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.
Comment 1 Christian Lete 2008-01-28 17:03:45 UTC
Created attachment 142030 [details]
synergy server init script

synergy server init script
Comment 2 Łukasz Damentko (RETIRED) gentoo-dev 2008-03-14 17:50:48 UTC
Reassigning to herd since nakano has retired from Gentoo.
Comment 3 Jon 2008-07-11 00:55:57 UTC
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.
Comment 4 Jon 2008-07-11 22:12:54 UTC
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.
Comment 5 Jon 2008-07-11 22:16:52 UTC
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.
Comment 6 Christian Hesse 2008-07-11 22:32:01 UTC
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
Comment 7 Jon 2008-07-12 00:22:28 UTC
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. :)
Comment 8 Jon 2008-07-16 19:22:40 UTC
So, has anyone tried these new init scripts yet? If so, how well do they work, if at all?

Thanks
Comment 9 Christian Hesse 2008-07-17 11:32:14 UTC
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.
Comment 10 Lyall Pearce 2011-12-07 03:09:45 UTC
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.
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-12-07 05:21:07 UTC
Very well, the "Gentoo Way" could also be with /etc/local.d/*.start
Comment 12 Yixun Lan archtester gentoo-dev 2013-01-16 08:15:43 UTC
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.
Comment 13 Yixun Lan archtester gentoo-dev 2013-01-16 08:17:02 UTC
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.
Comment 14 Yixun Lan archtester gentoo-dev 2013-01-16 08:18:25 UTC
to make init stop works well, add "-f" into SYNERGY_OPTS. Make synergy run as foreground mode.
Comment 15 Yixun Lan archtester gentoo-dev 2013-01-18 07:38:02 UTC
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.
Comment 16 Doug Goldstein (RETIRED) gentoo-dev 2013-05-29 19:42:21 UTC
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.
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-06 02:34:26 UTC
(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.