Link to home
Start Free TrialLog in
Avatar of brettr
brettr

asked on

Using Synergy with Mac and WinPC

I'd like to use Synergy for controlling a Vista PC from a Macbook.  I have Synergy installed on both and Synergy KM installed on the Macbook.  Vista is the server and the Macbook is the client (is that correct?).  The Vista server is started but when the Macbook tries to connect, I get this error:

2009-07-19 11:08:25.656 Synergyd[37742:20b] NOTE: started client
2009-07-19 11:08:25.695 Synergyd[37742:20b] ERROR: server refused client with name "MacBook"
2009-07-19 11:08:25.800 Synergyd[37742:20b] NOTE: stopped client

MacBook is the name in the server's configuration.  I never see anything in the server log about the connection attempt/rejection.  Any suggestions?
Avatar of ComputerTechie
ComputerTechie
Flag of United States of America image

make sure vista firewall is allowing Synergy through.

CT
Avatar of brettr
brettr

ASKER

Vista firewall is turned off.  The wireless network comes from an Apple Time Capsule, which doesn't have a firewall that I know of.  The TC gets its Internet access from a cable modem.
Avatar of brettr

ASKER

The Vista box can't ping "MacBook".  It can ping the IP of that machine but not the host name.  Could that be the problem?  What is need to get the Vista box to see the name MacBook on the network?
try checking you dns settings on the mac  . http://www.plus.net/support/domains_and_dns/dns/changing_dns_mac.shtml
Your dns should be your router
you could also try setting each fixed ip address.

CT

Avatar of brettr

ASKER

I have two IPs under DNS servers and one domain name for comcast under search domains.  I did add the route IP under DNS servers.  I don't think that does anything for resolving the name MacBook.  The mac can't even ping "MacBook".  It gets:

cannot resolve MacBook: Unknown host

The Vista box gets its DNS servers automatically.
Avatar of brettr

ASKER

Found out the MacBook needs to ping MacBook.local and same for Vista.  However, Synergy still gives the error.  Synergy is using "MacBook" for the screen name but that isn't seen across the network.  Synergy gets the hostname automatically.  So I changed the Mac hostname to MacBook.local.  Now Synergy shows "MacBook-local".  I then changed the Vista box Synergy config to say "MacBook-local".  But still the error.
Avatar of Eoin OSullivan
1. To control the Vista PC from the Mac .. you need to run Synergy Server on the Mac ... and the client on the PC.  You have the setup the wrong way around.

2. There are no nice GUI's that work well for the Synergy Server on the Mac .. you'll need to dabble a little in Terminal

Here's my setup
a. Put synergys in a folder in your applications folder along with the synergy.conf file (e.g. /Applications/Synergy)
b. Edit the synergy.conf file (see snippet below for a suggested format and rename the 2 computers as appropriate).  You can always begin by using IP addresses to be 100% sure.
c. Open Terminal and run synergys using something like ..
/Applications/Synergy/synergys --config /Applications/Synergy/synergy.conf
d. Start the client on the Windows Vista PC and see will it connect.

If all is OK ... then I recommend creating an Applescript or Automator Workflow to start synergys and you can put this in your startup folder or run on demand.  I use a workflow script with a single element "Run Shell Script" with the following code ..

screen -d -m /Applications/Synergy/synergys --config /Applications/Synergy/synergy.conf -f
section: screens
	MAC.local:
	VISTA:
	alt = super
  	super = alt
end
 
section: links
	MAC.local:
		right = VISTA
	VISTA:
		left = MAC.local
end

Open in new window

Avatar of brettr

ASKER

"There are no nice GUI's that work well for the Synergy Server on the Mac..."

Yes - there is.  It's called Synergy KM, http://sourceforge.net/projects/synergykm/, as mentioned in the OP.

I switched things around and now get this error:

cannot listen for clients: cannot bind address: Address already in use

Any suggestions?  Thanks.
I find the Synergy KM System Preference works OK for the CLIENT ... but not very well for the SERVER.

As you need to run the SERVER on your mac .. I'd recommend working with the original synergys files which you can get here.
http://synergy2.sourceforge.net

If you get it working ... then you might want to re-try the SynergyKM System Preference pane.




Avatar of brettr

ASKER

Probably Synergy on the Mac was still using the port as a client.  I restarted the Mac and now don't get the error:

cannot listen for clients: cannot bind address: Address already in use

However, the Vista client is giving this error:

failed to connect to server.  Timed out.
Can you try the setup with IP addresses .. rather than names?

And confirm you're using synergys and not SynergyKM
Avatar of brettr

ASKER

I tried IPs and no luck.  Using the command line as you suggested above, here is my output:

MacBook:synergy brettr$ synergys --config synergy.conf
-bash: synergys: command not found

...and...

MacBook:synergy brettr$ synergys config /synergy.conf
-bash: synergys: command not found

...and...

MacBook:synergy brettr$ synergys
-bash: synergys: command not found


synergys is in the folder.  Any suggestions?

READ my posting above ... carefully!!You must use the FULL folder path to the synergys and .conf files .. you CANNOT just enter the following line in Terminal .. EVEN if you are viewing the synergy folder.  This will not work.synergys --config synergy.confYOU MUST enter the full paths to both files e.g./Applications/Synergy/synergys --config /Applications/Synergy/synergy.confwhere /Applications/Synergy/ is the location of the synergys and .conf files.It is always worthwhile having the Activity Monitor application open so you can see when the synergys process starts.
Avatar of brettr

ASKER

Thanks.  I did have IP addresses in the conf file but was getting an error.  I then pasted exactly what you have for the conf file and still get the same error:

MacBook:synergy brettr$ /Applications/Synergy/synergys --config /Applications/Synergy/synergy.conf
ERROR: cannot read configuration "/Applications/Synergy/synergy.conf": read error: line 2: invalid character 0xffffffc2
synergys: no configuration available

Any ideas what causes it?
Brett .. what is the location of your synergys file ... give me the EXACT path to the folder where it resides.

It would appear that the folder you are using is synergy with a lowercase spelling ...
synergy

Unix is case-sensitive so the path must be correct

Avatar of brettr

ASKER

The path is

  Applications/Synergy

off of the root folder.

The "S" is upper case.  It is lower case in my path because I typed in "cd synergy".  I backed down a folder and typed in "cd Synergy" but still get the line 2 error.
try this ..

Take your terminal window .. at the command prompt ..
drag the synergys icon into the Terminakl window .. and it will put in the full path ...
 then type a space and '--config ' and another space and then drag and drop the conf file

You will have a Terminal command something like the one above but it will prevent any errors or typos
Then press Return

If synergys will not start up .. send us the full error message.

Can you post the synergy.conf file ... just copy and paste the contents into the code snippet section below.

What program did you use to edit the CONF file?  You must not use any text editor such as TextEdit that may intorduce non-compatible characters.

Try using BBEdit, TextWrangler or even vi in Terminal
Avatar of brettr

ASKER

I tried that but same error.  Where do I find an error report?

Seems as though maybe I'm missing some files in the Synergy folder.  I copied only two files into the Synergy folder - synergys and synergy.conf.  You mention dragging the Synergy icon.  I just have a gray square for synergys.  It's type is Unix Executable File.
Avatar of brettr

ASKER

I am using TextWrangler to edit the conf file.  Here is its contents:

section: screens
        MAC.local:
        VISTA:
        alt = super
        super = alt
end
 
section: links
        MAC.local:
                right = VISTA
        VISTA:
                left = MAC.local
end
I thought you'd changed to IP addresses?Is VISTA the name of the Window's PC? .. and MAC the name of your MacBook?

synergys is a Unix Executable File.  YES, you drag this into Terminal!!

You only need the 2 files . synergys and synergy.conf
If you are still getting the error you listed above ...
line 2: invalid character 0xffffffc2

Then I'de recommend DELETING the synergy.conf and re-downloading it from the website
http://synergy2.sourceforge.net

and then CAREFULLY re-edit using TextWrangler.  It sounds like you may have incorrect characters in the current .CONF file.
Avatar of brettr

ASKER

Ok, that worked.  I start the server through Synergy KM, unless there is another way I should start it.  I then start the Vista client.  After a few seconds, it gives the error:

  ERROR: failed to connect to server: Timed out

192.168.0.4 = MacBook
192.168.0.3 == VistaDesktop

VistaDesktop can ping 192.168.0.4 ok.   Here is my conf file:

# sample synergy configuration file
#
# comments begin with the # character and continue to the end of
# line.  comments may appear anywhere the syntax permits.

section: screens
      # three hosts named:  moe, larry, and curly
      192.168.0.4:
      192.168.0.3:
end

section: links
      # larry is to the right of moe and curly is above moe
      192.168.0.4:
            left = 192.168.0.3
            #up    = curly

      # moe is to the left of larry and curly is above larry.
      # note that curly is above both moe and larry and moe
      # and larry have a symmetric connection (they're in
      # opposite directions of each other).
      192.168.0.3:
            left  = 192.168.0.4
            #up    = curly
end

section: aliases
      # curly is also known as shemp
      #curly:
      #      shemp
end
If you ran the command in the terminal .. then you should have NO NEED for synergyKM .. SynergyKM includes a second copy of Synergy on your Mac .. and its own .conf file.All the work getting Synergy to run and editing the conf file will be pointless if you start SynergyKM also.Open the Application Monitor program and look through the processes .. you should see ONE instance of synergys running .. if you see more than 1 .. kill all the processes and then repeat the instructions on getting synergys working using Terminal.On the VISTA computer running synergy .. enter the IP address of the MAC in the client field.  If you also set the Logging Level (at the bottom of the screen) to Debug you may get a better idea of what is going on.
synergy.jpg
Avatar of brettr

ASKER

Using the command line you gave doesn't start Synergy.  By that, I mean it isn't listed in the running processes on the MacBook.  I'm now using this command line and see Synergy isn't starting:

MacBook:Synergy brettr$ /Applications/Synergy/synergys -f --config  /Applications/Synergy/synergy.conf
INFO: Synergy server 1.3.1 on Darwin 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
FATAL: unknown screen name `MacBook'

The conf file is the same one I posted above.  Where is it getting the name MacBook?  I'm using all IPs. I also dragged the two files into Terminal to make sure they are the ones I think they are.
OK brett

First ... can I say I have Synergy working as I described above perfectly between my iMac and 2 Windows PCs running XP and Vista respectively.

Unfortunately there is little "finesse" in the synergys server on OSX .. and the errors you get in the Console.app are often not very informative.

1. leave the -f switch off for the moment in the string
/Applications/Synergy/synergys --config  /Applications/Synergy/synergy.conf

2. If you still get the error ... FATAL: unknown screen name `MacBook'
then there is clearly another .conf file in the mix or another copy of Synergy running.

3. Uninstall SynergyKM to be 100% sure it is not the cause.  To uninstall just Control + click on the icon in the System Preference panel and remove it .. Reboot the mac afterwards.

4. In the System Preferences : Sharing Preference pane .. can you check the EXACT spelling of the shared name for your MacBook??   This should be written in small text underneath the text box at the top .. and always ends in .local
Avatar of brettr

ASKER

1.) I left the f switch off and get no error.  However, I see no synergy in the running processes.

2.) No error.

3.) Uninstalled as you instructed.

4.) "Computer Name:" is MacBook.  Then it says, "Computers on your local network can access your computer at: MacBook.local".

Thanks for sticking around so long.  Sorry it is so much trouble though.
ASKER CERTIFIED SOLUTION
Avatar of Eoin OSullivan
Eoin OSullivan
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brettr

ASKER

Thanks for the remote assistance offer but I've got it working now.  I tried changing the MacBook's IP to MacBook.local in the config but got the same error on the command line.  Then I changed it to just MacBook and the server started.  I have the client still as an IP but it connects without issue.  I am using the -f switch in the command line.  Without the -f switch, the client connects and gets disconnected.  Then the server stops.  Not sure why.   The -f switch works fine though.

How do I properly stop the server?

I may try the client host name but don't want to tempt my fate at this point.

Thanks again for all of your time and help.
To properly stop synergy you'll need to use Activity Monitor or in terminal type "synergys stop".
You could create an AppleScript to start and stop it.