Linux – Use Synergy with a dual monitor server

linuxmultiple-monitorsraspberry pisynergywindows 7

I am currently using synergy on my Windows machine and my raspberry pi. The Windows machine is the server and the raspberry pi is the client. The program works great except it doesn't realize that my server has 2 screens not one. Here is my current monitor set up.

|----------||----------|
|          ||          |
| SERVER 2 || CLIENT 1 |
|          ||          |
|----------||----------|
   |---------------|
   |               |
   |   SERVER 1    |
   |               |
   |---------------|

and here is how it appears to be when I move the mouse around with synergy running:

|----------|
|          |
| SERVER 2 |
|          |
|----------|
   |---------------||----------|
   |               ||          |
   |   SERVER 1    || CLIENT 1 |
   |               ||          |
   |---------------||----------|

How would I make it so that when I drag my cursor to the right on the Server 2 screen it goes to the Client 1 and when I drag my mouse up on the top right of Server 1 it goes to client 1?

I have tried to play around with the config file although every time I do that it give me an error message.

If there is a way to make it so that synergy recognizes Server 2 as the main server screen and makes it so that the only way to get to client is to go on the server 2 screen and drag the mouse to the right, that would be fine too. I do not necessarily have to be able to get to the client from server 1 it would just be an added benefit.

Best Answer

Adapted from ArchWiki, here’s an example that should provide enough of a reference:

section: screens
    Pi:
        switchCorners = none +top-right +top-left 
        switchCornerSize = 40
    Desktop:
        switchCorners = none +bottom-left +bottom-right
        switchCornerSize = 40
end
section: links
    Pi:
        up(0,100) = Desktop(25,75)
    Desktop:
        down(25,75) = Pi(0,100)
end
section: options
    keystroke(Control+Alt+KP_Multiply) = lockCursorToScreen(toggle)
end

This incorporates the following features:

  • The upper side of Pi’s screen is mapped to the center 50% of the bottom of Desktop’s screen and vice versa.
  • By pressing CtrlAltNumblock * you can toggle the “lock cursor to current screen” feature.
  • A 40-pixel area around the corner of the marked edges is protected and keeps the mouse inside the current screen. Pointless for the “Desktop” screen of course, just kept it as an example.

You might need to adjust the percentages to match your actual set-up.

Related Question