Monday, October 26, 2009

Running Synergy with Linux, XP and Mac

In the past I have used Synergy 1.3.1 with Linux (CentOS 5) and Windows (XP), this is a great solution and worked well. Now I wanted to add my Mac to the mix and found a couple of hurdles, hopefully you can avoid with this tutorial.

For my Mac I'm running Snow Leopard 10.6.1, CentOS 5 and Windows XP sp2.

So after I downloaded synergy 1.3.1 from the main site ( and installed (unpacked it) onto my Mac I had to open the terminal and run it from the command line (No biggie), but still wasn't working.

Came across this site: which had a workaround but still no go for Snow Leopard.

After reading the comments for Steve's site someone posted this gem:ERROR: Server Refused Client Name “my-macbook”

It's just a GUI tool for your already installed synergy 1.3.1 (Which you still need from the main site).

After I installed it and configured it in the System Preferences I kept getting an error: ERROR: Server Refused Client Name “my-macbook”

After checking my config file on my server (CentOS) all looked ok. Then I tried to ping my Mac from my Linux box and could not. After some searching I found I needed to add my Mac's hostname and IP to the Linux /etc/hosts file which made my Mac pingable, Yeah!!!

I started up Synergy again and Bingo! my Mac is now connected.

Thursday, October 01, 2009

MySQL IN clause gem

Well today was a good day as I found a GEM for the MySQL IN clause. Normally I would use the IN clause to search for multiple values in a field like this:

FROM tbl_name
WHERE field_name
IN ('value_1', 'value_2', 'value_3', 'value_x')

But today discovered that you can reverse the fields and values. So instead of using the OR clause, you could use something like this:

FROM tbl_name
WHERE value_x
IN ('field_name_1', 'field_name_2', 'field_name_3', 'field_name_x')

This makes it super simple to search for one value across multiple fields.