Mac OS Setup

OS installation

Installation disk

app_path="/Applications/Install OS X El Capitan.app"
bin_path="Contents/Resources/createinstallmedia"
sudo "$app_path/$bin_path" --volume /Volumes/MyVolume --applicationpath "$app_path"

Mac OS Mojave

app_path="/Applications/Install macOS Mojave.app"
bin_path="Contents/Resources/createinstallmedia"
sudo "$app_path/$bin_path" --volume /Volumes/Install\ macOS\ High\ Sierra --nointeraction --downloadassets

Firmware tricks

Press during startup:

Keystroke Description
Option Start up in Startup manager.
C Start up from external media.
Cmd-R Start from the OS X recovery system.
Option-Cmd-P-R Reset NVRAM (and hold them until you hear startup sound a second time).
D Start up in Apple hardware test.

Reset SMC - System Management Controller: Left Shift-Ctrl-Option-Power press and release at the same time.

Mac OS X instalation

Boot from USB

On Macs starting in 2018 there is T2 security chip and booting from external media has to be specifically enabled. Boot from recovery system and select Startup Security Utility from Utilities menu. Under External Boot, select the second option - Allow Booting from External Media.

After installation

I answered to not use iCloud after reboot but I had problems installing application from App store so I went to iTunes and signed to iCloud and authorized the computer. After that installations go smoothly.

System preferences

Lock screen

Lock screen settings

Message: Contact:

Note (TODO: Move elsewhere)

Some applications seems weird to OS X and need some extras:

When the installation is done revert setting back to the default value: Mac App Store and identeified developers.

Keyboard

Remapping keys

Desktop & Dock

Energy saver

Accessibility

Trackpad

Bluetooth

Spotlight

Well, the quality of these hints lately are not up to the standard it used to be! First of all. If you install Xcode you will have the Developer option in the normal Spotlight preference window and you can disable it the normal way.

Secondly. As someone else wrote here. TextWrangler and BBEdit are perfectly capable of taking care of binary plists so there is no need for converting.

And for those who prefer to use terminal you can add the missing dictionary and disable the Developer category with one command. This is a hint! :-)

defaults write com.apple.spotlight orderedItems -array-add “enablednameSOURCE

App Store

Safari

Preferences:

iTunes

Disable iPhone backup:

defaults write com.apple.iTunes DeviceBackupsDisable -bool YES

Install and configure applications

XCode

Install Command line tools.

xcode-select --install

This will pop up the GUI window

Command line utilities

Configure SSH when needed.

vim "${HOME}/.ssh/config"

Checkout dot files from repository.

mkdir -m 0750 .local
git clone 'ssh://server.git:/repo/name' ".local/etc"

Make necessary symbolic links.

ln -s .local/etc .config
ln -s .local/etc/zsh/.zshenv .zshenv
ln -s .local/etc/tmux/tmux.conf .tmux.conf

Close and reopen terminal. Then remove fallout.

rm -r .zsh_history .zsh_sessions

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Ensure we have something like this in profile

[ -x /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"

Close and reopen terminal again.

Application list

Terminal

Import Solarized theme and mark it as default.

Apple ID

Login with your existing Apple ID. System settings - Apple account

Then turn off synchronization of all data to iCloud. System settings - iCloud - Saved to iCloud - See all

Touch ID

System settings - Touch ID & Password - Add fingerprint

Tune it

Applications

Mail

Composing - Automatically Bcc myself

System settings

Internet accounts - Add account - Add other account

Mail account

Then

Select the apps you want to use with this account

Done.

Mail client

When started window pops up - Mail privacy protection

Protect mail activity - Yes

Calendar

Internet accounts - Add account - Add other account

CalDAV account

Click Sign in and then enable

Contacts

Internet accounts - Add account - Add other account

Click Sign in and then enable

CardDAV account

Other applications

Notes

USB to Serial adapter

ToDo

Dot files on USB drive

There is dot_clean buildin utility.

Enable terminal full access to file system

sudo dot_clean -n /Volumes/Corsair\ 16G
Failed trying to change dir to .Spotlight-V100
Bad Pathname: Operation not permitted
sudo ls -A .Spotlight-V100
ls: .Spotlight-V100: Operation not permitted

Go to System preferences - Security & Privacy - Privacy, select Full disk access and add Terminal.app to exception list there.

Obsoleted

Time Machine backups

Applications

iTerm configuration

Vundle

Project homepage on GitHub. Once it is configured in vimrc it is easy to install it from command line:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall

Brew

brew cask install osxfuse
brew install sshfs