Skip to content

Instantly share code, notes, and snippets.

@baku89
Forked from asus4/setup_mac_signage.sh
Last active July 29, 2018 07:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baku89/1eee9ee2864324d56b5d6a4c9eb82e54 to your computer and use it in GitHub Desktop.
Save baku89/1eee9ee2864324d56b5d6a4c9eb82e54 to your computer and use it in GitHub Desktop.
Setup mac preferences for Digital signage.
#!/bin/sh
# 自動更新OFF
echo "Disable : SystemPreferences -> AppStore -> Automatically check for updates"
defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false
# 未承認のアプリでも右クリックなく開ける
echo "Disable Warning on opening new App."
spctl --master-disable
# ノーティフィケーションセンターはいらん
echo "Disable Notification center."
launchctl unload /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
# 自動ログインに。
echo "Setup auto login."
defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser $(whoami)
# リモートマネジメントを許可。sshログインとか
# echo "Enable Remote Management."
# /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all -allUsers
# デスクトップピクチャは黒いものに。ほんとは自分で真っ黒なpng用意するほうがいい。
echo "Change Desctop Pictures"
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Pro Ultra Dark.png"'
# 起動時のクラッシュワーニングはいらん
echo "Disable crash working on application start."
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
# ウィンドウ復元無効化
echo "Disable resume on start"
defaults write -g ApplePersistenceIgnoreState YES
# クラッシュレポーターは出さないよ
echo "Disable crash reporter"
defaults write com.apple.CrashReporter DialogType none
# Show all filename extensionsin Finder
echo "Show all filename extensions in Finder"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment