After the server was up and running I decided that I wanted my computer to auto-mount my Samba drive whenever I was at home. Using a combination of an AppleScript saved as an application and a free software for OS X, Home Zone, I was able to have my computer identify when I'm at home and only launch my Samba drive when I'm here.
Let's get started:
The first thing I did was searched Google and found an AppleScript to mount my Samba drive. It can be downloaded as a .txt here (I can't paste it into blogger b/c of errors).
After I replaced the server information with my own I saved the script as an application and dropped it into my applications folder. If I had a desktop I could just launch the script every time I booted my computer (system preferences -> accounts -> login items), but since I have a laptop I only wanted the drive to mount when I was at home where the drive is.
There are several free location automators for OS X and after trying a few I decided to use Home Zone because it was the easiest to configure:
- Install and launch Home Zone
- Click on the Home Zone icon in your menu bar and select "Configure"
- In the "Zones" section click the plus arrow and name your new zone (Home in my case).
- In the "Triggers" section click the plus arrow and select the following options:
- When "all" of the following are available
- Kind: "Airport Network"
- Network: "Your wireless Network Name"
- Check the "Only when connected" box
- Action: Open File
- Drag the Samba mounting AppleScript into the space right below the action pull down menu (it should say "Drag any file here")