macOS Monterey has changed the default location for screenshots to be saved to ~/Documents. I’ve got a fresh-mac-install script that configures and installs a bunch of stuff, so I thought I’d just add the usual defaults write com.apple.screencapture location ~/Downloads line to that, but it didn’t work.

I tried the killall SystemUIServer trick too and that didn’t work either, so I thought I’d take a look at what was actually going on.

You can check the contents of a binary .plist file like this:

plutil -p  ~/Library/Preferences/com.apple.screencapture.plist

And I can see that the defaults write call was changing it, so there must be some other process that’s preventing it from being re-read, right?

ps ax | grep -i ui

Of the many processes running, this one looked suspicious:

/System/Library/CoreServices/screencaptureui.app/Contents/MacOS/screencaptureui

And after

killall screencaptureui

And dismissing a nag from Dropbox about backing up all my screenshots (might have been related?), the old trick of defaults write com.apple.screencapture location ~/Downloads started working again. No need to killall either SystemUIServer or the screencaptureui processes.