|
|
Map Shares on Login
|
|
|
|
Dedicated MacNNer
Join Date: May 2005
Status:
Offline
|
|
First, I hope this is in the correct forum. My apologies if not. One thing I had some trouble with, coming from the Windows world, was mapping network drives. In Windows, for my Home network, I created batch files and launched them on startup if needed. Some versions of Windows would remember my network connections. Anyways, I wanted the same thing for my Macs, so this is what I came up with.
Now there might be a better faster way, but here is how I did it:
1. Created two Alias' for my two desired Samba Shares:
a. LINUX_DATA
b. USERS
2. Add those two items to your Login Items under System Preferences.
System Preferences: Accounts: {select_desired_login-account}: Login Items
Click on the + button
Select your Alias for your first share (ie. LINUX_DATA)
Repeat for each share (ie. USERS in my case)
Now looking back, I think I could have just mounted the two shares through the finder and added them that way instead of making the alias'.
Logout and back in and it should mount your shares. Problem I had was now I also had two finder windows up. I like starting with a clean desktop.
3. Ok, now to clean up those windows. Launch Applescript (Applications:AppleScript:Script Editor)
Copy and Paste the syntax below, replacing the Share Names that I have with the ones you want to use:
tell application "Finder"
close window "LINUX_DATA"
close window "USERS"
end tell
Again, remember to swap out my LINUX_DATA and USERS share names with yours.
Choose File:Save As. Give it a neat name, and choose Application as the type. I saved mine in the Applications:Utilities area. This way anyone who uses the computer can add this to their Login Items.
4. Go back to System Preferences:Accounts:{select_desired_login-account}: Login Items and add your new application to the list.
5. Logout and back in. If we did it right, your two shares should mount and the windows for those shares should close.
Hope this helps. Been meaning to find/make a solution like this for myself for a while. Finally got around to it.
If there is a better way to do this, I would love to know. This is a work around/solution that I tinkered with and it does what I want.
Thanks for reading,
J.
|
Converted 4/29/05
G5 20" iMac 2.0Ghz, 1 Gig Ram
G5 Dual 2.5Ghz Power Mac, X800 XT, 2.5 Gig Ram, 23" ACD
G4 Mac Mini 1.5GHz, 512MB Ram, 64MB VRam, Int. Modem
MacBook Pro 2.00GHz, X1600-256MB, 2.0 Gig Ram, 100GB 7200RPM HD, USB Modem
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jul 2005
Location: Cooperstown '09
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2005
Status:
Offline
|
|
Interesting. Thanks for posting. I'll take a good look at it.
J.
|
Converted 4/29/05
G5 20" iMac 2.0Ghz, 1 Gig Ram
G5 Dual 2.5Ghz Power Mac, X800 XT, 2.5 Gig Ram, 23" ACD
G4 Mac Mini 1.5GHz, 512MB Ram, 64MB VRam, Int. Modem
MacBook Pro 2.00GHz, X1600-256MB, 2.0 Gig Ram, 100GB 7200RPM HD, USB Modem
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2005
Status:
Offline
|
|
Well I need to go back to the drawing board. While my solution works great on login, I loose the mounted shares when I wake from Sleep. If anyone has some ideas, please let me know.
Thanks,
J.
|
Converted 4/29/05
G5 20" iMac 2.0Ghz, 1 Gig Ram
G5 Dual 2.5Ghz Power Mac, X800 XT, 2.5 Gig Ram, 23" ACD
G4 Mac Mini 1.5GHz, 512MB Ram, 64MB VRam, Int. Modem
MacBook Pro 2.00GHz, X1600-256MB, 2.0 Gig Ram, 100GB 7200RPM HD, USB Modem
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jul 2005
Location: Cooperstown '09
Status:
Offline
|
|
Originally Posted by jhogarty
Well I need to go back to the drawing board. While my solution works great on login, I loose the mounted shares when I wake from Sleep. If anyone has some ideas, please let me know.
Thanks,
J.
How did the above mentioned software solution work for you? Give it a try?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Fremont, CA, USA
Status:
Offline
|
|
I'm confused - a mac to mac share is not lost when the client goes to sleep. Are you saying that a windows to mac share does?
If the server goes to sleep, then yes you probably will lose the share. Servers don't usually go to sleep. Sometimes they can be woken up using the network card, but I don't know if that is built into to Tiger.
|
If I had a signature, it would look something like this
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2005
Status:
Offline
|
|
Rickey - yes I tried the application you suggested. It is a neat tool. I had two issues with it.
1. For some reason it is associated with Photoshop so after the shares (drives) mount, Photoshop opens and gives an error it can't open the files. But the drives do mount.
2. When I wake my Mac from sleep, the drives are gone.
Neil - I should have been a bit more clear. I have a SuSe box as my server. I mount/map to those two shares from my Windows machines and my two Macs. There is a share called Users for user Home Directories and a share for Data. I found a work around as presented in my original post. However if I sleep my G5 or iMac then wake it a bit later, those drives (share mounts) are gone.
Hopefully I cleared that up.
J.
|
Converted 4/29/05
G5 20" iMac 2.0Ghz, 1 Gig Ram
G5 Dual 2.5Ghz Power Mac, X800 XT, 2.5 Gig Ram, 23" ACD
G4 Mac Mini 1.5GHz, 512MB Ram, 64MB VRam, Int. Modem
MacBook Pro 2.00GHz, X1600-256MB, 2.0 Gig Ram, 100GB 7200RPM HD, USB Modem
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Fremont, CA, USA
Status:
Offline
|
|
J,
A couple of things that amy or may not be useful:
1. You could always set the macs not to go to deep sleep. i.e. just have the display sleep. Not an ideal solution but could prevent the share loss.
2. Having the shares mount on login is a good idea. Also you could add aliases to your desktop or documents folder. When you need to access the share, when for example wanting to save a file to the server, click on the alias to mount the share and you'll be where you want to be in a short time.
Hope that helps.
Neil
|
If I had a signature, it would look something like this
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2005
Status:
Offline
|
|
Neil,
Thanks for the pointers. I like to have the machine go into a deep sleep when I'm not using it. I've noticed that if it is a brief sleep, I don't loose the drives.
I have the shares mount at login now using my first post method. I used to have two alias on my desktop and was using that method for months. But I'm kinda a neat freak and like my desktop free of clutter. That is why I was trying to find a work around. No biggy I guess. At least now my shares mount on login.
Guess I'll see if there is a way to check in Apple Script for "On Wake".
Thanks again!
J.
|
Converted 4/29/05
G5 20" iMac 2.0Ghz, 1 Gig Ram
G5 Dual 2.5Ghz Power Mac, X800 XT, 2.5 Gig Ram, 23" ACD
G4 Mac Mini 1.5GHz, 512MB Ram, 64MB VRam, Int. Modem
MacBook Pro 2.00GHz, X1600-256MB, 2.0 Gig Ram, 100GB 7200RPM HD, USB Modem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|