dotfiles
dotfiles copied to clipboard
Setting to disable .DS_Store creation on network drives is broken
The setting in .osx to disable .DS_Store file creation on network drives doesn't work correctly. The line reads:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
Unfortunately, as per the Apple knowledge base, the correct command is:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
I tested it out on my machine and this actually does prevent it from working correctly. Which is frustrating!
This article has been archived and is no longer updated by Apple.
Apple hates us
-bool true
and just true
are equivalent.
Unfortunately, that is not the case:
scapeless:~ elyscape$ defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
scapeless:~ elyscape$ defaults read com.apple.desktopservices DSDontWriteNetworkStores
1
scapeless:~ elyscape$ defaults read-type com.apple.desktopservices DSDontWriteNetworkStores
Type is boolean
scapeless:~ elyscape$ defaults write com.apple.desktopservices DSDontWriteNetworkStores true
scapeless:~ elyscape$ defaults read com.apple.desktopservices DSDontWriteNetworkStores
true
scapeless:~ elyscape$ defaults read-type com.apple.desktopservices DSDontWriteNetworkStores
Type is string
That is to say, true
gets written as a string. That seems less useful than the actual boolean value that -bool true
writes. Unfortunately, -bool true
straight up does not work on OS X 10.11, whereas string true
does. While I don't have any earlier systems to test on, it seems unlikely that Apple would have changed the check from a boolean to a string, and the documentation stating to set it as a string value has existed since OS X 10.4, so it seems to me that they initially did a string comparison and then just never bothered to change it.
On my 10.12.6 neither of "true" or "-bool true" have any effect. So frustrating!..
The official documentation claims that -bool TRUE
should work with 10.13. That being said, @VladAtOple: did you make sure to log out and log back in after changing the value?
This page suggests to try with -string true
:
defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores -string true
I have the same problem and I have tested everithing:
- bool, string, nothing, etc
- local user, system level, etc This didn't happen on the Intel MackbookPro, just on the M1 MackbookPro