- This topic has 5 replies, 4 voices, and was last updated 14 years, 8 months ago by
Allister Banks.
-
AuthorPosts
-
April 1, 2010 at 4:05 pm #378314
chrisb
ParticipantHello All,
As we are in the process of finishing up our first InstaDMG image, we are finalizing some settings in OS X. (you may have seen my menubar topic, that issue is still unsolved 🙁 )
Currently we are trying to alter the Finder Sidebar, we want it so that by default the “Shared” Section of Finder is not expanded, we don’t necessarily want it removed from the finder, we just don’t want it expanded.
Any help would be appreciated.
Thank You!
April 8, 2010 at 9:18 pm #378366Patrick Fergus
Participantfseventer is your friend here. Run it and twiddle the preference back and forth and look for the file that keeps getting (re)written.
But the answer is “defaults write ~/Library/Preferences/com.apple.finder SidebarSharedSectionDisclosedState -bool false”
– Patrick
April 12, 2010 at 4:53 pm #378381chrisb
ParticipantThank You,
We actually got the following script to work correctly. It just doesn’t take affect until after logout.
[quote]/usr/libexec/PlistBuddy -c “add networkbrowser:CustomListProperties:com.apple.NetworkBrowser.bonjourEnabled bool” /Users/$USER/Library/Preferences/com.apple.sidebarlists.plist[/quote]
April 25, 2010 at 8:20 pm #378440knowmad
Participantthe reason it does not take place until after logout-log-back-in is that your changing a setting that is only read at the start of the user session.
You could make it take effect immediately by bouncing the finder, but thats probably not worth it.
You COULD put this into your instaDMG build train by pointing it at the default user, but be careful with that, there are cleaner methods (read below) but what you would do is:
[code]defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.finder SidebarSharedSectionDisclosedState -bool false[/code]
That would have it set ‘properly’ with every new user created.ALSO, this can be doen (more permanently) with…. wait for it… may favorite answer…..
Local MCX!
I would very much suggest you spend an hour reading everythign here on local MCX OR read the three or four posts at [url]http://managingosx.wordpress.com/2010/03/12/yet-again-with-the-local-mcx/[/url] managing OSX… thats just the latest article, read from the first, they are great and simple and most of the posts in these forums are founded on/refer to/corrected by these posts.good luck, enjoy, mcx WILL simplify things.
July 26, 2010 at 2:04 am #379175Allister Banks
ParticipantAnd while PlistBuddy looks like our friend, (and I’m still not implementing LocalMCX, I know, it’s my own darn fault)
anybody could give some advice on how to get the MobileMe’s iDisk removed via PlistBuddy or otherwise? I can whack the “NeverVisible” key if I knew it was always going to be at the same place in the list of volumes in the sidebar, but that’s not reliable. I can’t see how to search at all in PlistBuddy, nor find in a usable way with defaults, so I’m at a loss. Thanks!_EDIT_
To answer my own question, because this particular customization wasn’t worth allowing other users to have enabled by default, I added a plist to the global /System/Library/User Template/English.lproj/Library/Preferences folder in my image with the proper ownership/perms.
I made the plist by copying the com.apple.sidebarlists.plist from my user and opened it in Property List Editor
I then deleted everything except the systemitems:VolumesList: Dict for iDisk(which gets auto-set to 0), leaving all the key-values in place, especially the NeverVisible string, and saved it someplace handy
To set the ownership right I ran ‘sudo chown root:wheel com.apple.sidebarlists.plist’
and for the correct permissions, ‘sudo chmod 600 com.apple.sidebarlists.plist’hope this helps future readers,
Allister
July 28, 2010 at 5:42 am #379192Allister Banks
ParticipantAnd to further discuss cp’ing a plist into the global user template area via a postflight script in a payload-free pkg, someone please explain why I can’t assign a path with a space in it to a variable? cp fails with the message “no such file or directory”.
I ended up just writing the variable name out. Again, for future generations that find this, that syntax would be:
[code]
cp “$1/Contents/Resources/com.apple.sidebarlists.plist” “$3/System/Library/User Template/English.lproj/Library/Preferences”[/code] -
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed