Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Map Shares on Login

Map Shares on Login
Thread Tools
jhogarty
Dedicated MacNNer
Join Date: May 2005
Status: Offline
Reply With Quote
Sep 15, 2005, 07:57 PM
 
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
     
rickey939
Addicted to MacNN
Join Date: Jul 2005
Location: Cooperstown '09
Status: Offline
Reply With Quote
Sep 15, 2005, 08:41 PM
 
AutomountMaker 0.9.7 does this sort of thing as far as I know. Have you tried that?
     
jhogarty  (op)
Dedicated MacNNer
Join Date: May 2005
Status: Offline
Reply With Quote
Sep 15, 2005, 08:47 PM
 
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
     
jhogarty  (op)
Dedicated MacNNer
Join Date: May 2005
Status: Offline
Reply With Quote
Sep 16, 2005, 11:02 AM
 
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
     
rickey939
Addicted to MacNN
Join Date: Jul 2005
Location: Cooperstown '09
Status: Offline
Reply With Quote
Sep 16, 2005, 04:15 PM
 
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?
     
NeilCharter
Senior User
Join Date: Nov 2000
Location: Fremont, CA, USA
Status: Offline
Reply With Quote
Sep 17, 2005, 01:26 AM
 
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
     
jhogarty  (op)
Dedicated MacNNer
Join Date: May 2005
Status: Offline
Reply With Quote
Sep 17, 2005, 11:51 AM
 
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
     
NeilCharter
Senior User
Join Date: Nov 2000
Location: Fremont, CA, USA
Status: Offline
Reply With Quote
Sep 18, 2005, 12:09 AM
 
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
     
jhogarty  (op)
Dedicated MacNNer
Join Date: May 2005
Status: Offline
Reply With Quote
Sep 18, 2005, 11:20 AM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:35 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,