Script Help to Silent Mounting Shares

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,612
Reaction score
1,079
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
I currently have my music library on a Time Capsule along with several other folders/files. Specs for the rest of the system are right below the badge. This works fine since iTunes 11 even tells me when the drive isn't available. Here's what I would like to do. It should be simple but I can't seem to find a solution that works.

I would like to silently mount the iTunes folder (no Finder window open on the desktop) automatically when logging into my account or ideally as part of a larger Automator workflow that launches iTunes. I think I have everything working except the silent mounting bit. Can't seem to find a good description that my brain cells can comprehend.

Long term I'd like to assure that guests using iTunes can't bork with my library (or other things on the drive for that matter).

Be aware of two limitations:

1. When suggesting Terminal scripts remember my phobia. Simple directions please.
2. Adding an alias to the share dies't silent mount the share when added to login items.

Any help greatly appreciated
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
My kind of problem!

Alright, I don't have a TC so I don't know how the files are seen/shared over the network. This being an Apple device, I presume they are shared over AFP. Here's an article about mounting AFP shares over the network to a folder on your local machine (sorry, but this one is going to require some love for the command line). Try that and see if it works. If it does, you can add it to Automator using the "Run Shell Script" action.

2. Adding an alias to the share dies't silent mount the share when added to login items.
This makes sense since aliases are little more than pointers. Think of it this way: aliases are like a traffic cop - they can point you in the right direction but have no say in how you drive down that route. Aliases are similar in pointing you at something but have no say in how (of if) something works.
 
OP
S

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,612
Reaction score
1,079
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
My kind of problem!

Alright, I don't have a TC so I don't know how the files are seen/shared over the network. This being an Apple device, I presume they are shared over AFP. Here's an article about mounting AFP shares over the network to a folder on your local machine (sorry, but this one is going to require some love for the command line). Try that and see if it works. If it does, you can add it to Automator using the "Run Shell Script" action.

This makes sense since aliases are little more than pointers. Think of it this way: aliases are like a traffic cop - they can point you in the right direction but have no say in how you drive down that route. Aliases are similar in pointing you at something but have no say in how (of if) something works.

Thanks. I read tons of stuff in the last week or so. Most of it from people suggesting either use of aliases on the desktop or adding the TC to login items. apparently they do not understand what's meant by "silent" mounting.

Looks like that will do the trick. I was all over that site but missed this somehow. I don't remember which command I tried but it was either the wrong one or I got one of the parameters wrong. I'll give this a tryThis is an afp share so it should work. I've been getting a few more drops than usual lately so I probably need to account for that as well.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
That should do the job "silently" mounting it in the background. You can even add parameters to it to regulate the mounting (make it read only, change location, etc). But, since you have an aversion to the command line (I'll get you there one day Sly!), I'll leave it where it is. ;)
 
OP
S

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,612
Reaction score
1,079
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
That should do the job "silently" mounting it in the background. You can even add parameters to it to regulate the mounting (make it read only, change location, etc). But, since you have an aversion to the command line (I'll get you there one day Sly!), I'll leave it where it is. ;)

I guess I will have to force myself to learn a thing or two.I'm still working on the Apple TV problem I posted about so it may be a day or two before I really experiment with it. Right now it's just my wife and I here so I'm not too worried about folks deleting stuff. Especially with the ATV as front end but eventually I may look at some things such as mounting read only erc.

Thanks for the help. If you hear a scream you will know that something has gone horribly wrong.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I guess I will have to force myself to learn a thing or two.I'm still working on the Apple TV problem I posted about so it may be a day or two before I really experiment with it. Right now it's just my wife and I here so I'm not too worried about folks deleting stuff. Especially with the ATV as front end but eventually I may look at some things such as mounting read only erc.

Thanks for the help. If you hear a scream you will know that something has gone horribly wrong.
Good luck! I'll keep an eye on this thread for the screams. ;)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top