Posted on 12-07-2022 07:47 AM
Hi,
I believe I used to set the "Show item info" preference with a Configuration Profile in the Finder payload. Or the old Global Plist payload.
Can't recall. It doesn't appear there anymore.
Is anybody using a script to check this off?
Solved! Go to Solution.
Posted on 12-08-2022 09:37 AM
try this
#!/bin/bash
currentuser=`stat -f "%Su" /dev/console`
## Show Item Info On Desktop
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" /Users/$currentuser/Library/Preferences/com.apple.finder.plist
#Restarts cfprefsd and Finder
killAll cfprefsd
killAll Finder
12-08-2022 12:56 PM - edited 12-08-2022 12:58 PM
Mine is the same except no "" on $currentUser. I also added sleep 2 before killall Finder. Can't remember why I did that but works every time.
#!/bin/sh
currentUser=$(ls -l /dev/console | awk '{print $3}')
sudo -u $currentUser /usr/bin/defaults write /Users/$currentUser/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true
sleep 2
killall Finder
sleep 2
# Jamf Protect Insights check
protectctl checkin --insights
Posted on 12-08-2022 09:37 AM
try this
#!/bin/bash
currentuser=`stat -f "%Su" /dev/console`
## Show Item Info On Desktop
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" /Users/$currentuser/Library/Preferences/com.apple.finder.plist
#Restarts cfprefsd and Finder
killAll cfprefsd
killAll Finder
Posted on 12-08-2022 12:10 PM
Thanks again, @YanW. Really appreciate it.
Worked nicely.
Posted on 12-08-2022 12:23 PM
Curious, would you happen to know why this script is failing? Trying to "Show All filename extensions." Swore this was a Config Profile before.
1)
2)
$ sudo -u "$currentUser" /usr/bin/defaults write
/Users/"$currentUser"/Library/Preferences/.GlobalPreferences.plist
AppleShowAllExtensions -bool true
$ sudo killall Finder
12-08-2022 12:56 PM - edited 12-08-2022 12:58 PM
Mine is the same except no "" on $currentUser. I also added sleep 2 before killall Finder. Can't remember why I did that but works every time.
#!/bin/sh
currentUser=$(ls -l /dev/console | awk '{print $3}')
sudo -u $currentUser /usr/bin/defaults write /Users/$currentUser/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true
sleep 2
killall Finder
sleep 2
# Jamf Protect Insights check
protectctl checkin --insights
Posted on 12-12-2022 04:25 AM
That worked! Thanks again. Curious how you got better at scripting, but I guess that's a JNUC question or something I'd have to ask ya.