I have a multiple monitor desktop where two monitors are controlled by Fedora on :0.0 and :0.1 and another monitor is attached to a Mac mini. I would like to provide a startup script solution to starting Synergy clients on each Fedora display. The Fedora 9 box is running XFCE fwiw.


xon allows you to specify a remote host to run on. Many (but not all) applications have an explicit command line switch such as -display. Finally, most X applications will read the DISPLAY environment variable. You could use this to wrap something in a start-up script that will open it on a specified display.


The first answer, to use the xon program, was difficult on Fedora because of its tight security (it would appear, since I finally gave up, being loathe to close down SELinux and deal with firewall issues) but it did get me thinking that I could use the same approach but use ssh. This worked like a champ. On the fedora (synergy client) box I set up a script to supply the synergy name and the display id, eg. lilly1 :0.1 Then invoke ssh to achieve the desired result:

$ ssh remote-host script-path-on-remote-host screen-x11-display screen-name-for-synergy

which will run in the foreground as long as you want Synergy to provide the keyboard and mouse for the specified X11 display on the given remote host.