Disabling Icon Preview

RLA_Group
New Contributor

Hi,

Does anyone have a script to disable icon previews in Mac OS Sierra?
I found an old script I used on previous OS X but this doesn't work fully, it disables it in finder/desktop but if I browse to a network share icon previews are turned back on again

Cheers
Matt

2 REPLIES 2

kerouak
Valued Contributor

This one?

Run at user login:

Define variables for plistbuddy path, current user, and destination file path

loggedInUser=/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'
plistbuddy=/usr/libexec/PlistBuddy
plistfile=/Users/$loggedInUser/Library/Preferences/com.apple.finder.plist

Delete the existing cover-flow preview setting

$plistbuddy -c 'Delete StandardViewSettings:ExtendedListViewSettings:showIconPreview' $plistfile;

Delete the existing icon preview setting

$plistbuddy -c 'Delete StandardViewSettings:IconViewSettings:showIconPreview' $plistfile;

Delete the existing list icon preview setting

$plistbuddy -c 'Delete StandardViewSettings:ListViewSettings:showIconPreview' $plistfile;

Delete the existing column icon preview setting

$plistbuddy -c 'Delete StandardViewOptions:ColumnViewOptions:ShowIconThumbnails' $plistfile;

Delete the existing column preview column setting

$plistbuddy -c 'Delete StandardViewOptions:ColumnViewOptions:ColumnShowIcons' $plistfile;

Reset the cover-flow preview setting to off

$plistbuddy -c 'Add StandardViewSettings:ExtendedListViewSettings:showIconPreview bool false' $plistfile;

Reset the icon preview setting to off

$plistbuddy -c 'Add StandardViewSettings:IconViewSettings:showIconPreview bool false' $plistfile;

Reset the list icon preview setting to off

$plistbuddy -c 'Add StandardViewSettings:ListViewSettings:showIconPreview bool false' $plistfile;

Reset the column icon preview setting to off

$plistbuddy -c 'Add StandardViewOptions:ColumnViewOptions:ShowIconThumbnails bool false' $plistfile;

Reset the column preview column setting to off

$plistbuddy -c 'Add StandardViewOptions:ColumnViewOptions:ColumnShowIcons bool false' $plistfile;

Repair ownership on plist file

chown -R "$loggedInUser:staff" $plistfile

Note that existing .DS_Store files on an SMB share may override these defaults.

A cleanup of existing .DS_Store files in conjunction with the following lines may

yield better results. Comment the following three lines if undesired.

dsstore=/Users/$loggedInUser/Library/Preferences/com.apple.desktopservices.plist
defaults write $dsstore DSDontWriteNetworkStores true
chown -R "$loggedInUser:staff" /Users/$loggedInUser/Library/Preferences/com.apple.desktopservices.plist

Delete prefs/plist cache

killall cfprefsd

Restart the Finder

killall Finder

kerouak
Valued Contributor

Also "Note that existing .DS_Store files on an SMB share may override these defaults"