Articles,OS X July 30, 2013 at 10:08 am

Enabling Location Services Programmatically

Location Services is an important part of OS X, but it is not obvious on how to enable it without going through the System Preferences GUI.  The preference that controls it is not in /Library/Preferences, and due to cfprefsd it is hard to find. Thanks to Tim Sutton for help in finding where this preference lives. It is a ByHost preference that exists in locationd’s container, at /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid. To enable it, use this script: https://gist.github.com/d17b0f8d61806083abaf To disable it, simply remove the plist and reload locationd.

About Samuel Keeley

Samuel Keeley can frequently be found in ##osx-server on Freenode, or on Twitter @keeleysam.

3 Comments

Leave a reply

You must be logged in to post a comment.