I have a lot of digital music and movies. In fact, it’s at the point where I decided that I needed a home a media server because my external hard drive was just not cutting it anymore. I decided to build a Linux box running Xubuntu because of the versatility and stability Linux provides, and I found a how to article a few weeks back on Digg which outlined the entire process.
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:
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:<ol>
- 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")
</ol>That’s it…you’re done! Now anytime you are on your home network your samba drive will automount.