April 29, 2009

Connecting to a server with Mac OS X Leopard

I connect to servers a lot at work, in a Windows environment (using smb://, mostly). The Finder has an awkward interface for doing this. By contrast, a pretty good way to do it quickly is through QuickSilver. The trigger you want might be in ~/Library/Recent Servers, and it might come up easily -- but it also might not. In Spotlight, it definitely doesn't come up (at least, not for me).

So a good alternative is to manually create a trigger for Quicksilver and Spotlight to find. In a location familiar to both indexers, make a text file (a script) containing something like:

open smb://machine/folder

Make the file executable (e.g., from the Terminal: chmod +x your_script_file.command).

This works well. The command file can also be double-clicked in the Finder, which makes it an easy solution to share with others.

However, when it runs, this script has the unfortunate side effect of opening Terminal, opening a new Terminal window, and then leaving the window hanging around after it's finished. Have googled for solutions to this, and not found any.

So an even better way to fashion a trigger is to use Script Editor to make an Applescript that says something like this:

do shell script "open smb://machine/folder"

Give the script a descriptive name like machine_folder_connect.app, so it's easy to find through the first few letters of the machine name (Spotlight or Quicksilver), or the initial letter of the machine name + the initial letter of the folder or share of interest (Quicksilver). When saving the script, turn OFF the "Run Only" option. Otherwise it can't be edited later on.

No comments:

Post a Comment