Lately I’ve been using my macbook and imac side by side with one shared keyboard and mouse using Synergy. It works an absolute treat. However, I am bored of typing in commands in Terminal to get Synergy going so I’ve made my first shell scripts to allow my usual double clicking behaviour.
I’ve used Textmate to make two files, synergys.sh and synergyc.sh.
To start the server on the imac:
#!/bin/bash
echo "Starting synergy server"
/Applications/synergy-1.3.1/synergys -f --config /Applications/synergy-1.3.1/synergy.conf
To start the client on the macbook:
#!/bin/bash
echo "Starting synergy client"
/Applications/synergy-1.3.1/synergyc -f computername
and don’t forget to make it executable:
chmod +x filename.sh
and/or if you want it to be double clickable just rename the script to filename.command
Thanks d3vo for the pointers!
0 Responses to “Unix shell scripts”