Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Automate mounting shares from Finder's Sidebar Network
Mac OS X is great in how it allows you to skin a cat in a multiple of ways. Something that frustrated me, though, is the Finder's Sidebar window. You can drag almost anything into it, and those items act like aliases. But what about mounted server shares? Nope. It will not let you drag a share into the Sidebar. So we are forced to use the 'Connect to Server' window. With Automator we can get around these annoyances.

Here's how to use Automator to work around this issue. Note that for a truly automated solution, you should first mount the share and store the credentials in Keychain. Once that's done (the share must be mounted, in any event), follow these steps:
  1. Launch Automator, which will create a new workflow.
  2. From the Finder Library, drag the Get Specified Servers Action into the workflow. Click the [+] and enter the address of your server. Something like cifs://server/share, then click Connect.
  3. From the Finder Library, drag the Connect to Servers Action into the workflow. Be sure 'Use Results from Previous Action' is enabled in the URLs pulldown. (The following three steps are optional. They will open a Finder window focused on the mounted share and set the View for it.)
  4. Add the Finder Action Get Specified Finder Items to the workflow. Click the [+] and select the share you want to automate mounting of. Click Open.
  5. Drag Finder's Open Finder Items Action into the workflow. 'Open with' should be 'Default Application.'
  6. To make sure the Finder honors your preferred view, drag Finder's Set Folder Views action into the workflow. Use the options to your liking.
  7. Select Save As, and set the File Format to Application. I suggest saving it to your user's Applications (~/your_user/Applications) folder, and naming it with the share's name.
  8. In the Finder, navigate to where you saved this Automator app. Drag the new app into the Finder's Sidebar window.
To test your new solution, unmount the share and then click the new application icon in the Sidebar. If the server was not mounted, it will mount. If it was already mounted, you wil not see any errors, and if you did the optional steps, you will be brought to the folder with the view set.

Notes:
  • This is most useful on a network with a shared web server. You can share the directory that all of the website accounts are in. So instead of each website being an item in your sidebar, we can now have that share be the single item. When you mount the share, you see all of the websites.
  • This method may also work with FTP shares, etc., but I have not tested any others than CIFS.
[robg adds: I tested this with a connection to my PowerBook via Personal File Sharing, and it worked as described. Based on the list of server types presented in the Connect to Server Automator action, it should work on basically any server you can connect to.]
    •    
  • Currently 2.67 / 5
  You rated: 5 / 5 (6 votes cast)
 
[64,183 views]  

10.4: Automate mounting shares from Finder's Sidebar | 32 comments | Create New Account
Click here to return to the '10.4: Automate mounting shares from Finder's Sidebar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Automate mounting shares from Finder's Sidebar
Authored by: alex_kac on Aug 04, '06 07:56:24AM

Another way is to simply drag the mounted server to the TOP of the Finder Toolbar. When its not mounted it'll be a question mark, but you can then click on it and it'll mount!



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: pricer on Aug 04, '06 08:16:45AM

When I use the top tool bar method, the volume name accompanies the alias and may even remain after ejecting it. At some point the name gets lost and only the question mark remains leaving you to guess what it refers to--a problem that's componded when you have more than one of these aliases in the top toolbar since you don't know which "?" is which. Anyone else get this behavior? (it's been happening to me since 10.2)



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: david-bo on Aug 07, '06 03:19:58AM

Try dragging not the actual mounted share but the Favorites-document from ~/Library/Recent Servers to the toolbar instead.

---
http://www.google.com/search?as_q=%22Authored+by%3A+david-bo%22&num=10&hl=en&ie=ISO-8859-1&btnG=



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: dustin5 on Aug 04, '06 08:05:25AM

Or you can drag a subfolder from a mounted server share to the sidebar. Clicking it will mount the share.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: Coumerelli on Aug 04, '06 08:27:14AM

That's what I do. Of course, that doesn't answer the need if you want to view the root of a share on one click, but this way at least, you can click > authenticate > then click on the now mounted share to view the root.

---
"The best way to accelerate a PC is 9.8 m/s2"



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: hamarkus on Aug 06, '06 12:52:33PM

I do so as well. I even have multiple subfolders form server share in my sidebar. However, both with AFP and SMB servers, I am able to store the password in Keychain. No need to authenticate every time.
So, it is only: Click on the subfolder in the sidebar and then click on the root of the share (if that is what you want to see).



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: turkchgo on Aug 05, '06 02:24:42PM

This will lockup the Finder on reboots.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: hamarkus on Aug 06, '06 12:56:08PM

Not for me. No problems with this method for so far.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: geordie on Aug 07, '06 06:58:06AM

It will only lock up the Finder on reboot if it has a custom icon. The Finder will try to get the icon before the volume is mounted and it deadlocks. I can't remember whether my QA team file an Apple Radar bug on this or not.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: pexner on Aug 04, '06 08:22:32AM
I used to do it much easier. Take TextEdit, type an URL in the format protocol://[name:password@]adress/share.
Select the line, klick and hold on selected text until the carrot changes to a pointer and drag the line to the Finder.
It'll create a *.*loc file specific to your protocol.
It even works with things like mailto:me@home.dom. This creates a mail-shortcut. When you open this file your preferred Mail App will start, create a new mail and enters the receipent.
Have fun playing around using standard URL-formats.
You can also make guest-authentification using afp://;AUTH=NO%20USER%20AUTHENT@adress/share
You can rename these *.*loc files to anything you want, store them anywhere, make them a startup file, and you can drag them also into the Sidebar.

One inconvenient thing: If you store your password in this file, it can be extracted because these *.*loc files are saved in cleartext XML format.

[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: Azathoth on Aug 04, '06 12:07:10PM
I tried your tip with SSH connections. It's perfect ;)
I've made a detailed howto in my blog.

[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: dan55304 on Aug 06, '06 07:17:46AM

Why not give back to MacOSX Hints and post your enhancement to the tip here? Especially since it was derived from hints here. Why drive traffic to your site?



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: NB on Aug 04, '06 08:28:31AM

Or you can drag the mounted server icon in the dock. I've been doing it for months, and it doesn't lose the icon andd name when disconnected.



[ Reply to This | # ]
Put in "Login Items"
Authored by: mholve on Aug 04, '06 09:09:33AM

Just open System Preferences, click Accounts and go to the Login Items tab. Drag your server shares into the list. Next time you login, they're automatically mounted and appear in the sidebar (and optionally, the Desktop as well).

---
Everything Solaris - http://everythingsolaris.org



[ Reply to This | # ]
Put in "Login Items"
Authored by: RussellK on Aug 04, '06 09:23:27AM

Personally, I've found dragging subfolders from within the given server volumes into the bottom pane of Finder's sidebar to be most reliable.

In the past, having sharepoints/server volumes in my Login Items (or Startup Items) has been a problem because sometimes I want to start up while my file server is down or disconnected, and this caused major hangups during startup. Maybe this is fixed in 10.4.7, but I haven't tried.



[ Reply to This | # ]
10.4: Simple Method to Automate mounting shares from Finder's Sidebar
Authored by: preclaro_tipo on Aug 04, '06 09:09:46AM

If you go to the System Prefs. -> Accounts -> Login Items (tab) and click the plus at the bottom and add a subfolder inside a shared volume, or the shared volume itself, then it will mount with you log in. Simple and automated.



[ Reply to This | # ]
Add a folder of links to the sidebar
Authored by: sr105 on Aug 04, '06 09:51:53AM

1. Create a normal folder somewhere
2. Change it's name and icon to suit you.
3. Drag it to the sidebar
4. Use the Connect To Server option to mount your share.
5. From the root most finder window ("Computer" from the Go menu), drag the share into the new folder and OS X will create a short cut.

You can also do this for sub-folders in a share as well. I like to make my link folders with the names of the companies whose networks I use them on. I then change the icon of the folder to be the company's logo to make it easier to spot.



[ Reply to This | # ]
Or, use Favorites
Authored by: eagle on Aug 04, '06 10:15:20AM

The Favorites folder works for this too. When you drag a mounted disk icon onto the Favorites folder, you can then easily remount the share by clicking on the share's alias in the Favorites folder. I have my Favorites folder on my Dock, so all I do is select the correct share from that folder.... then - voila - it appears on my desktop.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: KingRocky on Aug 04, '06 10:23:09AM

This is absolutely PERFECT!! I've been looking for a way to automount shares from my Windows file server for MONTHS, and no one has had a solution that didn't involve finder windows popping up all over my desktop (via dragging into Login Items), or messing around with NetInfo Manager.

Using the original tip, you simply add ALL the shares you want to automount in the "Get Specified Servers" action, save as an Application, and then drag it into your login items.

Next time you log in, all your shares get mounted automagically, JUST LIKE OS9 AND WINDOWS. WOOHOO!!



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: mike3k on Aug 04, '06 10:40:36AM
I like Home And Away for mounting server volumes. It will mount the server ONLY if you're connected to a particular network, so I can have it as a login item on my MBP and it won't try to mount my home servers if I'm traveling with it.

[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: giulio on Aug 04, '06 11:22:53AM

Some solutions posted in your comments will not work, if you have shares on multiple machines of the same name. For instance, two windows web servers both with a share named "wwwroot". Finder will get confused and mount the last one called "wwwroot", or simply error out.
You will not have this issue if you use Automator as desribed above.

---
Web Development: http://www.webveteran.com



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: critcol on Aug 04, '06 04:12:41PM

If you need the root, modify your Finder toolbar with the Path button. Even if you the sub-folder you use is at the very, very bottom of a deep, deep folder hierarchy, the Path button will still lead you all the way to the root level.

PS, sub-folder in Finder's sidebar is my favorite method too.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: julian1008 on Aug 05, '06 11:03:05AM
Mount Watcher is a good way to automate the process if you travel and want to load up different sets of servers automatically. If your at home it loads the servers there and if at work then the work server. Also if a server goes offline then when it returns it mounts it automatically.

[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: dan55304 on Aug 06, '06 07:21:52AM

All of the alias solutions are problematic IMO. Accidentally touch one or worse, using the arrow keys try to scroll down a list, and it tries to mount. You have a very long wait if something isn't perfect with your network.

I've also stopped auto mounting shares because of hangs during reboot when I'm trying to correct network issues.

A manual approach like this hint is the best in my experience.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: el doctor on Aug 07, '06 02:57:35AM

More easy !!!!!!
Mount your share. Simply drag one folder from it to the sidebar. That all.
When you cliks on this folder, the share will mount automaticly



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: tezbo on Aug 07, '06 02:58:47AM

Funny - I came across this this very morning. If you want another way, simply drag a folder fromt he shared drive into your side bar - when you click it will mount.



[ Reply to This | # ]
Applescript alternative.
Authored by: jalfredprufrock on Aug 09, '06 06:53:40AM
I have a lengthy (and new os x user friendly) description of a writing an Applescript to do this on my blog:

http://thegreatmigration.blogspot.com/

[ Reply to This | # ]
Applescript alternative.
Authored by: jalfredprufrock on Aug 09, '06 06:55:26AM

Just this:

tell application "Finder"
mount volume "smb://[Windows Workgroup];[Windows Login]:[Windows Password]@[Computer Name]/[Shared Folder]"
end tell
tell application "Finder"
activate
make new Finder window
end tell

if you don't need to be told how to write an Applescript.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: cargoplex on Aug 11, '06 01:25:07PM

Just wanted to say thanks for pointing out the use of Automator for this topic. I always seem to forget about our good friend Automator when I find myself in a pickle. Prior to this hint, I was simply putting alias' of the two network server folders that I always have mounted in my login items. This worked, but only on login, and it opened up a new Finder window for each folder once mounted - which was kind of obnoxious. Now I have a lovely little Automator app that I stuck in my login items AND in my Finder toolbar (in case I need to manually mount the two folders after being disconnected for some reason). Anyways, I just felt like sharing my experience, so thanks again.

---
The world sounds better through headphones.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: dragon_x on Aug 31, '06 11:12:37AM

There are several issues with the 'standard' way and with AppleScript.

#1) The standard way - as in going to Startup Items or Login Items and adding any mounted drives individualy does not always seem to work... it was kind of iffy in 10.3.x and seems to be much worse in 10.4.x - IME.

#2) AppleScript solution might be the best solution, however ScriptEditor is no longer available from the Apple site, at least I could not find the download, but I did find the 10 page HTML doc that has screens shots and everything else. I have found some 3rd party software but this seems to require purchasing and stuff, which is a huge PITA ... even for a $10 or $20 app. Apple needs to provide their ScriptEditor .. or maybe show me where it is (default install, Dev tools??? I dont see it!).

#3) The NetInfo option sucks. The main technical issue is that it appears to log users on as guests. This is beyond retarded - unless I'm missing something, which is highly likely as I am no NetInfo guru (but there is very little documentation out there that indicates exactly what/how these NetInfo mount points a working - IE auto mounting via the NetInfo feature).

#4) Speaking of poor ducementation, its not clear how Automator works either ... It should pull any login info from Keychain (I hope this is how it works). It should also give the creator of the mini "app" the option to specify the userid that will be used for said share (and/ro multiple shares). I would think multiple shares could be put into one Apple (rather not have one app per share - it can work, but its kind of cumbersome). ... so maybe this automater stuff could be explained to the less educated? Are there hooks or options for Keychain (it there a way to confirm if/how it uses keychain)???

#5) The Appelscript option appears to be the best so far - however putting the password the script is not an option. Again this should pull from Keychain. Having to figure out the passwords for all my users is not a good way to administer a system... and if/when they change - we got "issues" all over again. In other words the best (simple/effective) solution appears to be bass ackwards.

#6) Finally - this should not be a that difficult to setup some auto mounts. Dont get me wrong, I love the way the Mac works (9 times out of 10) but that 10th time is buttttt hurting.... so yes, this is 1/2 tirade and 1/2 technical feel free to correct my technical assumptions, ommission and so on... and feel free to ad any constructive opinions you may have.

Thx :)

---
Live long and prosper!



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: mm2270 on Aug 18, '07 09:42:36AM

Uhm, Script Editor is a standard part of an OS X install. Look in Applications/Applescript for it. And yes, Applescript is often a more reliable way to achieve auto-mounting of shares, at least for a small network/home scenario.

Automator, being a more visual type of (simpler) Applescript can also do the job as described here.



[ Reply to This | # ]
10.4: Automate mounting shares from Finder's Sidebar
Authored by: jenninju on May 08, '07 07:15:06AM

Can this be made to work with a box.net share on the web? box.net is a free storage substitute for idisk, but I cannot seem to get to it via the Finder Connect to Server, although it can be easily accessed via a web browser.

I have used your method successfully on an ftp share.

Thanks.

Jud



[ Reply to This | # ]