Mac OS X Tips

Installation Details

grep OSInstaller /private/var/log/install.log will give details of installation actions, including Time Machine restore operations.

less /System/Library/CoreServices/SystemVersion.plist will show the version of the installed operating system.


To have apps re-open their windows next time they're run (or more accurately, stop them being automatically closed on quitting)...

In macOS 10.12 Siera: System Preferences > General > Close windows when quitting an app and clear the checkbox.

Time Machine

When Time Machine backups are being performed to a Synology Diskstation NAS, the backups are accessible as files under /Volumes/Time Machine Backups/Backups.backupdb/. Use sudo -i in a terminal to become root to view the files.

Disable Startup Sound/Chime

  1. Mute the sound before shutdown, and un-mute after startup or;

  2. Press and hold the mute key immediately after pressing the power button to start your iMac.

-- Frank Dean - 29 Jun 2017

View Hidden Files in Finder

$ defaults write AppleShowAllFiles Yes

Relaunch Finder by holding the options key and right-clicking the Finder icon in the launch bar and selecting the Relaunch option.

Hide them again:

$ defaults write AppleShowAllFiles No

Disable Help Window Always On Top

$ defaults write DevMode -bool true

Close and re-open any help windows

Enable always-on-top again:

$ defaults write DevMode -bool false


Manually Clearing Safari Private Data

Under Safari > Preferences > Privacy > Manage Website Data... deleting individual websites that have a database fails in that they reappear almost immediately after the delete.

To remove them, delete their contents under ~/Library/Safari/Databases.


View Saved iMessage Chats

This note applies to macOS 10.12.5 (Sierra)

  1. Open ~/Library folder by clicking on the Go menu item in the Folder application. Hold down the options key to reveal the Library option and then select it.

  2. Navigate to ~/Library/Containers/

  3. Locate the recipient in one of the sub-folders named by date.

  4. Open the file with the ichat file extension by choosing the Open option from the context menu or by double-clicking it.

  5. The conversation will be loaded in a separate window in the Messages application and also in the Messages window.

  6. Optionally, close the separate conversation window.



Install by running the git command from a terminal. When given the option, install Xcode.


A non-GUI version of Emacs is installed in recent versions of Mac OS X.

The most recent GUI version can be installed from MacPorts.

$ sudo port install emacs-app

Emacs add-ons

The following add-ons can be installed from MacPorts:

  • magit
  • markdown-mode.el


Pandoc can be installed form MacPorts:

$ sudo port install pandoc

If you also want to use Pandoc to create PDF documents, install TeX Live:

$ sudo port install texlive


Where multiple versions of Python have been installed, a specific version can be specified with:

$ sudo port select --set python python27

QLandkarte GT

  • Install XQuartz
  • Install MacPorts
  • sudo port install gdal +poppler
  • sudo port install qlandkartegt


Installing coreutils from MacPorts (see InstallingMacPorts) installs the coreutils binaries prefixed with a 'g'. E.g. use gshred for shred.


A developer tool to create native Mac OS X applications for interpreted scripts, e.g. Perl, Ruby and Python.

Installing OpenJDK

See MacOSXOpenJDK.

Installing Oracle JRE

The JRE (8u111) does not create symlinks or binaries for java on the path. Oracle recommend installing the full JDK to use the Java command line tools.

See When I try to use java from the command line, why doesn't it work?

Uninstalling Java Runtimes


  1. Remove the Java Applet Plugin folder:

    $ sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/
  2. Remove the symbolic link for the system preferences Java control panel

    $ sudo rm -f /Library/PreferencePanes/JavaControlPanel.prefPane
  3. For each user:

    $ rm -rf ~/Library/Application\ Support/Java/


    $ rm -rf ~/Library/Application\ Support/Oracle/Java/

To uninstall JDKs, remove them from under /Library/Java/JavaVirtualMachines.

-- Frank Dean - 11 Jan 2017


See the man page for java_home which includes examples under the USAGE section at the end.

-- Frank Dean - 11 Jan 2017

Remote Debugging Javascript on iPad

See iOSTips.

Application Defaults

See man defaults

As an example, to see all the defaults for GnuCash (version 2.6.13):

$ defaults read org.gnucash.Gnucash

to remove entries, e.g. a most recently used (MRU) file from the history:

$ defaults delete org.gnucash.Gnucash "/org/gnucash/history/file4"

to see the updated interval (in seconds) for Google Update Agent:

$ defaults read checkInterval

to change the update interval (in seconds) to every 24 hours (60 * 60 * 24):

$ defaults write checkInterval 86400



Add the following to .profile using one of the character encodings shown when running locale -a:

export LC_ALL=en_GB.UTF-8
export LANG=en_GB.UTF-8

Make sure .profile (and .bashrc) are read for a bash shell. Add the following to .bash_profile:

if [ -r ~/.bashrc ]; then . ~/.bashrc; fi
if [ -r ~/.profile ]; then . ~/.profile; fi

-- Frank Dean - 30 Mar 2017


  • macOS-Fortress - Kernel-level, OS-level, and client-level security for macOS


Converting ogg encoded files to aac.

Install ffmpeg and libfdk-aac using Macports nonfree variant:

$ sudo port install ffmpeg +nonfree

Then convert with:

$ ffmpeg -i $file -acodec libfdk_aac $file.m4a

or, include tags:

$ ffmpeg -i $file -acodec libfdk_aac -map_metadata 0:s:0 $file.m4a

or convert a set of files:

$ for file in *.ogg; do ffmpeg -i $file -acodec libfdk_aac -map_metadata 0:s:0 $file.m4a; done;

-- Frank Dean - 30 Jun 2016

Related Topics: AppleMaciBook, InstallingKitlistMacOSX, InstallingMacPorts, iOSTips, MacKeyboardTips, MacOSXOpenJDK, PostgreSQLMacOsX, VncTips