Screenshots don’t write file

high sierrascreen capture

The screen shot shortcuts ⌘ Command ⇧ Shift4 or ⌘ Command ⇧ Shift4 do not write a file.

The latter shows the cross hair and let me define an area but that's it.

Copy to clipboard works for both screen and selection area. Grab can write a file too.

The issue occurs only with my user account but not with another (I created an new user to narrow down the failure area). My humble conclusion is that it must deal with my specific environment/configuration, but I have no clue how to narrow it down further or pin-point to the error prone configuration:

System preferences → Keyboard → Shortcut does not give any hint: No error no warning.

Both shortcuts are assigned to the two system functions "save picture of screen as a file respectively save picture of selected area as a file.

I did disable/enable the checkbox, too; no effect. I changed the target directory forth and back and restarted the UI Server; no obvious effect.

Any idea how to figure out the root cause or better, how to fix the problem?

Best Answer

tl;dr

Open the terminal and write

defaults write com.apple.screencapture location ~/Desktop
defaults write com.apple.screencapture target file
killall SystemUIServer

Explanation

Being on Mac OS 10.14 (Mojave), I ran into the same issue. At one point the screenshot shortcuts 'would not work' anymore. (I was able to save a screenshot to clipboard using Cmd+Shift+Ctrl+3, but it wouldn't work to save a screenshot to the desktop anymore.)

Looking at the output of defaults read com.apple.screencapture in the terminal, I noticed a target = clipboard; being set:

{
    "last-messagetrace-stamp" = "568547998.720744";
    location = "/Users/kim/Desktop/";
    target = clipboard;
}

Changing the target back to file (defaults write com.apple.screencapture target file) and restarting the SystemUIServer (killall SystemUIServer) would restore the expected behaviour.

It looks like the new screenshot controls which were introduced in Mojave overwrite the target setting (Cmd+Shift+5, see the official apple support page for more information). When selecting "Clipboard" in the "Save to" menu, the target in com.apple.screencapture will also be set to clipboard. For some reason, this setting will then also affect the "take screenshot to file" shortcuts.

Note: Of course, you could also reset the target setting in the new screenshot controls. Just choose any folder location in the "Save to" option (e.g. Desktop, Documents or any other location) and the target should be set to file again.

Related Question