sarlej

arch linux

12 posts in this topic

Hello,

how to install and use synergy 2.0 on arch linux, when it is no longer open source?

 

Share this post


Link to post
Share on other sites

If you want the binary of Synergy, purchase a license on the Symless website.

Share this post


Link to post
Share on other sites

Actually i have licence for Synergy 2 Pro, but there isn't binary for arch linux. And no source, so i can't compile it myself. I think, there will be other distributions with same problem.

Edited by sarlej

Share this post


Link to post
Share on other sites

Just use the Arch User Repository (AUR)...

https://aur.archlinux.org/packages/synergy2/

Here's a quick rundown.

$ pacman -S git   # ensure you have git
$ git clone 'https://aur.archlinux.org/synergy2.git'  # clone the repository from aur
$ cd synergy2  # cd into the directory
$ cat PKGBUILD  # ensure the PKGBUILD isn't sketchy
$ makepkg -sri  # build the package with makepkg
# -s for sync dependencies,
# -r for remove build dependencies after (which are only required for compilation / packaging)
# -i for install successfully built package

 

Edited by siphon
clarify build steps.

Share this post


Link to post
Share on other sites
20 hours ago, siphon said:

Just use the Arch User Repository (AUR)...

https://aur.archlinux.org/packages/synergy2/

Here's a quick rundown.

$ pacman -S git   # ensure you have git
$ git clone 'https://aur.archlinux.org/synergy2.git'  # clone the repository from aur
$ cd synergy2  # cd into the directory
$ cat PKGBUILD  # ensure the PKGBUILD isn't sketchy
$ makepkg -sri  # build the package with makepkg
# -s for sync dependencies,
# -r for remove build dependencies after (which are only required for compilation / packaging)
# -i for install successfully built package

 

Thank you for the instructions Siphon. 

I have it installed and my Windows and Arch computers can see each other, but nothing happens when I drag the cursor any edges from any computer. 

Logs dont show any errors.... 

Does anyone manage to make it work between windows and linux yet?

Share this post


Link to post
Share on other sites

I can't get it working between my Arch Linux (master) and my OSX Sierra Macbook Pro (slave). I get errors regarding my .Xauthority cookie ("can't open DISPLAY :0"). I saw someone had a workaround that involved removing ~/.Xauthority, but it does not work for me.

You should tail all your synergy logs ( tail -F /var/log/synergy/synergy-*.log ). Look for "Warning"s (Really, they are errors) like these: 

[2017-11-20T14:31:50] DEBUG: XOpenDisplay(":0.0")
[2017-11-20T14:31:50] WARNING: secondary screen unavailable: unable to open screen

I simply went back to Synergy 1.8.x. It works nearly flawlessly from Linux (host) => OSX (slave), and works with quirks from Windows (host) => Linux (guest) with modifier keys like Super (windows key) getting stuck in sometimes.

Edited by siphon
clarifications

Share this post


Link to post
Share on other sites

Got some additional logs using with `journalctl -f`

I think we might be needing to open display :1 instead of :0 (when I start my x11vnc, i need to start it on :1 instead of :0.)

Any way to pass that to synergy-core?

Nov 21 10:41:38 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:41:38] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: [2017-11-21T10:41:47] DEBUG: XOpenDisplay(":0.0")
Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: No protocol specified
Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: [2017-11-21T10:41:47] WARNING: primary screen unavailable: unable to open screen
Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: [2017-11-21T10:41:47] DEBUG: retry in 60 seconds

Nov 21 10:41:49 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:41:49] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:41:59 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:41:59] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:42:09 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:42:09] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:42:19 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:42:19] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:42:30 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:42:30] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:42:40 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:42:40] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
Nov 21 10:42:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:42:47] debug: [2017-11-21T10:42:47] DEBUG: XOpenDisplay(":0.0")
Nov 21 10:42:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:42:47] debug: No protocol specified
Nov 21 10:42:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:42:47] debug: [2017-11-21T10:42:47] WARNING: primary screen unavailable: unable to open screen
Nov 21 10:42:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:42:47] debug: [2017-11-21T10:42:47] DEBUG: retry in 60 seconds

Nov 21 10:42:50 archlinux synergy-service[7456]: [ Router  ] [2017-11-21T10:42:50] debug: ClientProxy: Received client connection for 95GPQ72 from screen 33263
 

Edited by The_Vulpecula

Share this post


Link to post
Share on other sites

Your issue is different than mine. I run BSPWM on :0.

$ echo $DISPLAY
:0


From what I've read, Synergy2 currently only likes DISPLAY :0 by default.

You can change it by setting DISPLAY=:1 in the /usr/lib/systemd/system/synergy.service as mentioned in this thread.

Also these specific lines:

11 minutes ago, The_Vulpecula said:

Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: [2017-11-21T10:41:47] DEBUG: XOpenDisplay(":0.0")
Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: No protocol specified
Nov 21 10:41:47 archlinux synergy-service[7456]: [ Core    ] [2017-11-21T10:41:47] debug: [2017-11-21T10:41:47] WARNING: primary screen unavailable: unable to open screen

These lines are due to the $HOME/.Xauthority as I mentioned.

You can read more at this link.

Edited by siphon

Share this post


Link to post
Share on other sites

Hi Siphon, 

I just made it work by running the core like this (as the user, not root.): /usr/bin/synergy-core --server -f --run-as-uid 1000 --debug DEBUG --name archlinux --enable-drag-drop --profile-dir /var/lib/synergy --log /var/log/synergy/synergy-core.log -c /var/lib/synergy/synergy.conf --address :24800

  1. I stopped the service.
  2. I ran the synergy-core --server
  3. I started the service.
  4. I use "share from" on the windows computer. 

I will try to update the synergy.service file. 

  • Thanks 1

Share this post


Link to post
Share on other sites
On 11/21/2017 at 4:19 PM, siphon said:

I can't get it working between my Arch Linux (master) and my OSX Sierra Macbook Pro (slave). I get errors regarding my .Xauthority cookie ("can't open DISPLAY :0"). I saw someone had a workaround that involved removing ~/.Xauthority, but it does not work for me.

You should tail all your synergy logs ( tail -F /var/log/synergy/synergy-*.log ). Look for "Warning"s (Really, they are errors) like these: 

[2017-11-20T14:31:50] DEBUG: XOpenDisplay(":0.0")
[2017-11-20T14:31:50] WARNING: secondary screen unavailable: unable to open screen

I simply went back to Synergy 1.8.x. It works nearly flawlessly from Linux (host) => OSX (slave), and works with quirks from Windows (host) => Linux (guest) with modifier keys like Super (windows key) getting stuck in sometimes.

Did you ever get around to resolving your 2.0 problems?
From what I've seen it might also be somewhat related to user-based permissions, the default service by sinergy 2.0 is probably creating a global service, instead of a user based one, which conflicts with X.

All in all, I have the same issue and I am tempted to just grab 1.8 instead.
It doesn't help that there is barely any documentation on 2.0 to be found.

Edited by Archeous

Share this post


Link to post
Share on other sites
On 2017-11-21 at 11:08 AM, The_Vulpecula said:

Hi Siphon, 

I just made it work by running the core like this (as the user, not root.): /usr/bin/synergy-core --server -f --run-as-uid 1000 --debug DEBUG --name archlinux --enable-drag-drop --profile-dir /var/lib/synergy --log /var/log/synergy/synergy-core.log -c /var/lib/synergy/synergy.conf --address :24800

  1. I stopped the service.
  2. I ran the synergy-core --server
  3. I started the service.
  4. I use "share from" on the windows computer. 

I will try to update the synergy.service file. 

Thank you, I made mine work I just copy and paste your command line (Change the --name to my actual computer name) and it work Great. However I don't have the GUI where I can position the screen. However I can stop and restart with synergy-config and position my screen then stop it and restart with your cmd line. Or I can use windows my 2nd computer to setup the layout.

Now I have a functional Synergy2. 

First time I tried the synergy-config only gave me the XopenDisplay ... no protocol error like the post above.

 

Edited by DangPTran

Share this post


Link to post
Share on other sites

Update, 

The last post was late at night on my first day after installing synergy 2 from AUR with Yaourt. It didn't come with any instruction so I didn't know what I was doing. I still don't know what I'm doing but that an other thing :D

I edit my 

/usr/lib/systemd/system/synergy.service

add the

Environment=DISPLAY=:0

as explain in 

My correct display is :0 the thread is to set the display as :1 but set with your actual display

The environnement variable need be add to the synergy.service otherwise it does not work

restart the service with systemctl (after reload with 'systemctl daemon-reload')

Now everything work great.

synergy-config work to set up the screen 

Perfect

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now