I received a few questions on how I used outset, dockutil and desktoppr to set some basic user settings on new deployments after my JNUC session. I’ve added 2 new scripts to my GitHub under MacAdminScripts as examples. Outset is a utility that allows scripts to be run at various times, and with differing permissions. You can run scripts as root or the logged in user, choose to run at login or boot, and have a script run every login or just once per user. There is also the ability to run on demand.
defaultdock.sh shows an example of using dockutil to clear the existing dock, and then set a basic one with browser, Microsoft Office and Self Service applications, and including an applications and downloads stack.
# set to the path of dockutil
dockutil="/usr/local/bin/dockutil"
# Delete everything from the dock and replace it with a specific selection of apps.
${dockutil} --remove all --no-restart
sleep 2 # we add a delay so that the dock has time to inialize the removal
${dockutil} --add /Applications/Firefox.app --no-restart
${dockutil} --add /Applications/Google\ Chrome.app --no-restart
${dockutil} --add /Applications/Microsoft\ Word.app --no-restart
${dockutil} --add /Applications/Microsoft\ Excel.app --no-restart
${dockutil} --add /Applications/Microsoft\ PowerPoint.app --no-restart
${dockutil} --add /Applications/Self\ Service.app --no-restart
${dockutil} --add '/Applications' --view list --sort name --no-restart
${dockutil} --add '~/Downloads' --view fan
defaultusersettings.sh has a few basic settings for security, like ensuring the user’s home folder is secured from other users, secure keyboard entry in terminal, and sets some basic user settings requested, like a basic blank desktop background and settings in Finder to show file extensions, folders first in list view, and display drives on the desktop.
# Secure home folder
chmod -R og-rwx ~/
# Secure Keyboard Entry in Terminal
defaults write com.apple.Terminal.plist SecureKeyboardEntry -int 1
# Set Desktop Background
sleep 5 # add sleep to make sure desktoppr works
/usr/local/bin/desktoppr "/Library/Desktop Pictures/Solid Colors/Space Gray.png"
# Set scroll direction for mouse
defaults write com.apple.swipescrolldirection -bool false
# Display filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Set folders to be sorted first in Finder view
defaults write com.apple.finder.plist _FXSortFoldersFirst -bool true
#show Hard Drives, Network Drives, removable media on desktop
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
# Reset Finder
killall Finder
These are packaged and deployed into the outset/login-once
folder (located in usr/local/
) and with all 3 tools deployed during initial setup, it only takes a few moments to get the user’s account configured with some basic user settings.
edit 2021-03-17: updated links to scripts