Skip to main content

Hi all

Has anyone had any luck configuring the com.apple.sidebarlists plist in El Capitan? In previous versions of OS X I would drop a pre-configured plist in the User Template folder. That appears to be working for other plists (such as the dock) even with the SIP changes in 10.11, but the com.apple.sidebarlists file doesn't want a bar of my changes.

Apologies fro reviving an old topic but: How are people adding Macintosh HD and removing "recent tags"?


Updated for 10.13 since sfltool has been stripped of its usefulness. Removes "recent tags", hides tags in sidebar, hides shared in sidebar, hides external servers and drives from desktop.

#!/bin/bash
# Script uses mysides ( https://github.com/mosen/mysides ) to clear the sidebar and add our prefs.
# Our script is run by the local user in conjunction with other applescripts wrapped in an app
# before deployment to the end-user

# Get the Username of the currently logged user
loggedInUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }')

# Removes all sides and adds /Applications, User Desktop, Documents, Downloads, Home Folder
if [ -e /usr/local/bin/mysides ]
MYSIDES="/usr/local/bin/mysides"
then
    $MYSIDES remove all
    $MYSIDES add Applications file:///Applications 
    $MYSIDES add Desktop file:///Users/$loggedInUser/Desktop 
    $MYSIDES add Documents file:///Users/$loggedInUser/Documents 
    $MYSIDES add Downloads file:///Users/$loggedInUser/Downloads 
    $MYSIDES add $loggedInUser file:///Users/$loggedInUser 
    touch /Users/$loggedInUser/.sidebarshortcuts
fi

# Hides Tags
defaults write /Users/$loggedInUser/Library/Preferences/com.apple.finder ShowRecentTags -bool FALSE     
# Hides External Drives on Desktop      
defaults write /Users/$loggedInUser/Library/Preferences/com.apple.finder ShowExternalHardDrivesOnDesktop -bool FALSE
# Hides Server on Desktop
defaults write /Users/$loggedInUser/Library/Preferences/com.apple.finder ShowMountedServersOnDesktop -bool FALSE
# Hides Shared section on SideBar
defaults write /Users/$loggedInUser/Library/Preferences/com.apple.finder SidebarSharedSectionDisclosedState -int 0
# Sets Default Finder window to open at Computer showing root HD, connected external drives, and connected servers instead of Recents
defaults write /Users/$loggedInUser/Library/Preferences/com.apple.finder NewWindowTarget PfCm
defaults write /Users/$loggedInUser/Library/Preferences/com.apple.finder NewWindowTargetPath PfCm

killall Finder

@joshuaaclark So mysides is working reliably for you with 10.13? The last time I worked with it was macOS 10.12 where it didn't reliably work and seemingly crashed. I might take another look at it if this is the case but it might be tough to trust.


@jhuls I didn't try the pkg for the version of mysides 1.0.1 that was being distributed but compiling with Xcode from latest master branch code (which also seems to add a new "Insert" option for placing an item at the start of the favorites list) is working great for me in 10.14.5.

I already had a mounting script for a user's SMB home drive so I've simply added the following code at the end of that to add their SMB home drive to their favorites list upon login (the shell script is activated via a LaunchAgent item):

#remove any existing home drive icon from side bar favorites to avoid duplicates
/Library/Payloads/mysides remove $USER

#add home drive icon to side bar favorites
/Library/Payloads/mysides add $USER file:///Volumes/$USER

Easy Peasy


mysides 1.0.1 package still works for us on 10.14.5