« Backing up Putty Settings in Windows | Home | Fixing a REALLY slow Windows Picture and Fax Viewer »
How to run a script at login
By cbarrett | March 1, 2008
I use synergy to control multiple computers with a single keyboard and mouse. I recently built a hackintosh and wanted to run the synergy server on it and connect my linux box to it. I had already set Vista up to be a server, so the linux configuration didn’t need to change much. The problem is that synergy on OSX didn’t have a gui like in windows and I didn’t know how to autorun it like I did in linux. So I began digging in. I’ll use synergy as the example, but this should work with just about any script.
First, I created file called synergy.command with my command to start the synergy server. The contents of the file are:
nohup /Applications/synergy-1.3.1/synergys -f –config /Applications/synergy-1.3.1/synergy.conf &
Now I have a way to start synergy up, but how would I get it to start when I logged in. A quick google found exactly what I was looking for.
- Open System Preferences
- Then open Accounts
- Select your account, then click on Login Items
- Click the + at the bottom of the window.
- Browse to your synergy.command and click on Add.
That is really all there is to it. Next time you login, Synergy will be started. If the terminal window comes up, you can close it, since the nohup command is there.
Topics: OSX | No Comments »