The user global preferences file (High Sierra, Mojave) ~/Library/Preferences/.GlobalPreferences.plist contains a user's GUI preferences.

The preferences are read at login, but, how do I force the system to reread these preferences and refresh the GUI after I place a new value in this prefs plist without requiring a logout/login?

I am looking for a less intrusive way of updating the GUI. I realize it is possible to force this, using osascript utility through System Events command. However, this approach requires a change to "Security & Privacy" preferences (or you will have to respond to a dialog box alerting you of the attempt.) I just want to do this in the "background". For example:

defaults write  "$prefs" AppleInterfaceStyle "$value" 

This bit of code can run quietly and will only take effect when the user next logs in.

I was hoping, perhaps, there was a running process that could receive a signal to refresh the GUI (other Unix systems allow a SIGUSR1 signal sent to the window manager to reset GUI.)

  • I would upvote twice if I could! – JBis Oct 6 '18 at 14:14

You must log in to answer this question.

Browse other questions tagged .