Starting synchrony automatically

You can configure synchrony to start automatically when the computer starts or when you log in. The steps to do that are different on each platform. Note that changing these configurations doesn't actually start or stop synchrony. The changes take effect the next time you start your computer or log in.

Windows

Start synchrony and click the Configure... button by the text Automatic Startup. The Auto Start dialog will pop up. If an error occurs then correct the problem and click Configure again.

On the Auto Start dialog you'll configure synchrony to start or not start automatically when the computer starts or when you log in. You need Administrator access rights to start synchrony automatically when the computer starts. The dialog will let you know if you have sufficient permission.

If synchrony is already configured to automatically start then there will be two Uninstall buttons, at most one of which is enabled. Click the enabled button, if any, to tell synchrony to not start automatically.

If synchrony is not configured to start automatically then there will be two Install buttons. If you have sufficient permission to have synchrony start automatically when the computer does then the Install button in the When Computer Starts box will be enabled. Click it to have synchrony start for all users when the computer starts. In this case, synchrony will be available during the login screen. Otherwise, click the Install button in the When You Log In box to have synchrony automatically start when you log in.

Unix

Synchrony requires an X server. That means a server must be running and synchrony must be authorized to connect to that server. It's best to have the display manager start synchrony. You'll need the necessary (probably root) permission to modify the display manager configuration files. If you don't have that permission you can start synchrony after logging in via the .xsession file.

Typically, you need to edit three script files. The first file will start synchrony before a user logs in, the second will kill that copy of synchrony, and the third will start it again after the user logs in.

The contents of the scripts varies greatly between systems so there's no one definite place where you should insert your edits. However, these scripts often exit before reaching the bottom so put the edits near the top of the script.

The location and names of these files depend on the operating system and display manager you're using. A good guess for the location is /etc/X11. If you use kdm then try looking in /etc/kde3 or /usr/kde/version/share/config. Typical file names are:

      xdm    kdm    gdm
1 xdm/Xsetup kdm/Xsetup gdm/Init/Default (*)
2 xdm/Xstartup kdm/Xstartup gdm/PostLogin/Default (*)
3 xdm/Xsession kdm/Xsession gdm/Sessions/Default (*, **)

*) The Default file is used if no other suitable file is found. gdm will try displayname (e.g. :0) and hostname (e.g. somehost), in that order, before and instead of Default.
**) gdm may use gdm/Xsession, xdm/Xsession or dm/Xsession if gdm/Sessions/Default doesn't exist.

For a synchrony client, add the following to the first file: /usr/bin/killall synchronyc sleep 1 /usr/bin/synchronyc [<options>] synchrony-server-hostname Of course, the path to synchronyc depends on where you installed it so adjust as necessary.

Add to the second file: /usr/bin/killall synchronyc sleep 1

And to the third file: /usr/bin/killall synchronyc sleep 1 /usr/bin/synchronyc [<options>] synchrony-server-hostname Note that <options> must not include -f or --no-daemon or the script will never exit and you won't be able to log in.

The changes are the same for the synchrony server except replace synchronyc with synchronys and use the appropriate synchronys command line options. Note that the first script is run as root so synchronys will look for the configuration file in root's home directory then in /etc. Make sure it exists in one of those places or use the --config config-pathname option to specify its location.

Note that some display managers (xdm and kdm, but not gdm) grab the keyboard and do not release it until the user logs in for security reasons. This prevents a synchrony server from sharing the mouse and keyboard until the user logs in. It doesn't prevent a synchrony client from synthesizing mouse and keyboard input, though.

If you're configuring synchrony to start only after you log in then edit your .xsession file. Add just what you would add to the third file above.

Remember to look in your system log on both your server and your client(s) for clues to any problems you may have (typically /var/log/syslog on Linux boxes).