How can I keep a samba share mounted?

Discussion in 'Mac Basics and Help' started by dm33186, Aug 20, 2005.

  1. dm33186 macrumors member

    Joined:
    Jun 3, 2003
    #1
    I have a file server that i want to connect to after sleep/reboot without doing the command K. How can i do this, i have an applescript that mounts it but when I added that to the startup items it opens the script in script editor and wont run it until i press the button
     
  2. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #2
    If you just drag and drop the mounted disk to the startup items, it will auto mount the disk on startup so you don't need to use the apple script.

    As for sleep, you might want to make your apple script an applicaton. So when you double click on it, it just runs, and doesn't open up the script editor. Reason why I say keep the script is because putting the computer to sleep is just like shutting it down, but its doesn't go through the boot process, just starts up where it was last, so all the shares might get disconnected.
     
  3. mklos macrumors 68000

    mklos

    Joined:
    Dec 4, 2002
    Location:
    My house!
    #3
    Got Tiger?

    If you have Mac OS X.4 (Tiger), then you're in luck!

    You can use Automator to make an application that will look for your SMB share and automatically mount it. AND, since its an application, when you drag it into your startup items, it will automatically run instead of launching Automator the application.

    So, here is how to do it:

    1. Mount the share you want mounted all the time.

    2. Launch Automator

    3. Drag "Get Specified Servers" into the drop box on the right hand side of the screen.

    4. In the Get Specified Servers window, you will see a + and - in the lower left. Click on the + to add a server.

    5. Under Path, type in the path to the share, or browse to it. It may be already preselected since its already mounted on the desktop.

    6. Click Connect and the add server box will go away.

    7. Drag Connect Servers into the drop box like you did in step 3. You should notice that the Get Specified Servers and the Connect Servers windows will have an arrow connecting them in between the windows. This signifies that after step one is done, it will automatically go to step 2, which in your case is get the server, then connect to it. See the attached pic...

    8. Dismount the share on the desktop and leave Automator open.

    9. Go back to Automator and click the Run button in the upper right and see if the share mounts on the desktop. If you did everything correctly, it should mount with no problems. I just did it with a Windows 2000 Pro PC connected to my airport. If it works, then go to step 10, if not then go back through the steps and make sure you've following them precisely.

    10. Click on File, then down to Save As...

    11. Give it a name, save it where ever.

    12. Make sure that the file type is Application.

    13. Click Save.

    There should now be an Automator icon on your desktop or where ever you saved it. You just made your own simple application in Mac OS X!!!!

    14. Drag the newly created Automator icon into your startup items.

    15. Dismount the share again.

    16. Quit Automator.

    17. Log out and then log back in and see if the share mounts. If not, then go back through the steps and see if you missed something.


    This worked for me, so it should for you with login. Not sure about the sleep problem, but this will solve the restart, startup problem. You might just want to leave the app you made in Automator on the desktop in case you need to remount it after a sleep and get rid of the AppleScript.

    Just one solution.

    I FINALLY made Automator useful! :D

    ANOTHER SOLUTION

    If you don't have Tiger, then shame on you, but here's another possibility.

    You can open up your script in script editor and then save it as an application. Just do Save As... then select Application as the file format.
     

    Attached Files:

Share This Page