PDA

View Full Version : Add Links in Finder Sidebar


plexter
09-17-2008, 10:10 AM
Hello,

Using the latest release of 10.5.x

I am wondering if anyone can assist with manually adding shortcuts under the Apple Finder Sidebar window?

Currently I am mapping a network drive via a shell script which creates a symbolic link on the desktop.

Normally I would just drag-drop anything I wanted on the sidebar but for some reason these cannot be put there.

I would also perferably like to be able to add this information to my script (which runs at login) so that everything is automated from the mapping to the link creation, to the sidebar shortcut)

Does anyone know of a file that would contain the information of the sidebar that I could manually edit? Or is there a better way of going about this?

Please advise. Thanks!

robinwmills
09-18-2008, 01:05 AM
Hi Plexter

I use the magic shell script code:osascript -e 'mount volume "smb://domain;username:password@machine/sharepoint"'
to mount drives (in this case a windows samba share). So you're executing a little AppleScript to do the mount (instead of using /sbin/mount).

Variants will mount NFS, FTP or whatever protocol you require. This has the effect of mounting the drive in /Volumes/sharepoint, displaying the drive icon on the desktop, and adding it to the finder's Sidebar.

You should also enable a preference in Finder to get the sidebar. Finder/Preferences/General/Connected Servers.

I wrote an article about this which is on my web site: http://www.clanmills.com/articles/Mounting/ in which I also discuss how to mount the Macs share points as drive letter in Windows.

plexter
09-18-2008, 12:05 PM
Thanks for your reply.

I am using a shell script as it is run via a Windows group policy. Also I am using a script without username/password embedded and authenticating through Active Directory.

I just need a way to add the mapped drive to the Finder Sidebar. Surely there must be a way to manually add items to it via command line. ??

Thanks for your help. :)

cwtnospam
09-18-2008, 12:25 PM
You should also enable a preference in Finder to get the sidebar. Finder/Preferences/General/Connected Servers.

As noted above, you can make this automatic.

It beats me why you'd want to use a drive letter though. I've always thought of that as one of Windows' most archaic 'features.'

robinwmills
09-18-2008, 01:08 PM
Hi P

Have you checked the Finder's preferences? I seem to recall that there are a couple of places (General and SideBar) where you should enable the display of network drives. I think the default in 10.5 is NOT to show these. So maybe that's all you need to do. If not, I'm rather stuck to suggest anything.

Robin

plexter
09-18-2008, 01:44 PM
cwtnospam -- I do not recall saying anything about displaying a drive letter. In any case I do not require this.

robinwmills -- I have verified that the show network stuff is all checked. I believe this only effects items created through the GUI/Finder/Applescript/ or other variations. However my task is done through the terminal/shell scripting which I do not believe is included in this automation for whatever reason.

Thank you both for your input. Any thoughts would be appreciated.

robinwmills
09-18-2008, 03:51 PM
Hi P

Can you share your script with us, please? My model (which I made up, so could be quite incorrect) is that Apple has 2 'houses' when it comes to the file system - the 'unix' house, and the UI 'house'

The unix file systems is lower and you can mount file systems without the UI knowing anything about it! So /usr/sbin/mount can mount file systems which are not reflected in the UI. I believe there's something with a name like 'disk arbitration' which synchronizes the UI with the underlying unix.

I use osascript -e 'mount....' because it's AppleScript and in communication with the UI. So the shares appear.

I'm not sure why we've drifted into discussing drive letters - that's windows stuff. So forgive the confusion I've caused by mentioning it.

plexter
09-19-2008, 12:39 PM
Yes, my script is using unix in short.

Reason being is because the GUI would always prompt for a login and password and expect to save it to the keychain. Something I do not want at all. The mapping process should be totally automated while being authenticated by the domain user logging in. --my script does this fine. I just do not get any icon other than the one I map on the desktop.

jonesy16
09-24-2008, 12:03 PM
I have a similar problem since I'm using OpenDirectory to supply automatic mount points to OS X clients on boot. These NFS mounts do NOT appear on the sidebar even when "Connected Servers" is selected. Anyone have a fix?