Hey guys,
we recently started to upgrade our deployed devices to macOS Tahoe. Since then many of our users have reported, that they can no longer take screenshots. The sound comes on but no screenshot was saved.
After some research I found the culprit. For some reason the screen capture app thinks it has to save the screenshots as pdf files. But it can’t display them in the mini-preview-window. So either setting needs to be changed. I didn’t want to do that manually, so here is my attempt at a script.
Note, that this has to be run as the logged in user because the plist for screen capture is user bound.
#!/bin/bash
consoleuser=`ls -l /dev/console | cut -d " " -f4`
echo "${consoleuser}"
currenttype="$(su - "${consoleuser}" -c 'defaults read com.apple.screencapture type')"
if [ "$currenttype" != 'png' ]; then
echo "Current type is not png! Changing to png now!"
su - "${consoleuser}" -c 'defaults write com.apple.screencapture type png'
else
echo "Current type is $currenttype. Nothing to do."
fi
exit 0
