Filed under: Tips and tricks, Apple
.DS_Store files begone
Judging by the reaction to my MS Remote Desktop Client post, it is safe to assume I am not the only Mac user working in a Windows dominated office (nor am I the only one who takes care of lots of Windows machines). Therefore, extrapolating a little bit, I think I can safely say that folks who read this blog connect to Windows machines over the network for file-sharing.If you connect to a Windows file server (or any other file server) with OS X something is happening that you might not be aware of. OS X creates a .DS_Store file for each folder that you look at. This file contains preferences for the way those files and folders should be viewed. They are hidden away on OS X, so you never see them, however, if you connect to that Windows share with a Windows machine (after the Mac has connected) those darn files show up everywhere.
Apple details how to stop OS X 10.4 from creating this files on remote servers, but warns that unforeseen consequences might be encountered.
[via Paul Stamatiou]

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Geoff said 9:04PM on 10-13-2006
Or, an easier solution is to tell Samba to not show these files on remote servers. I don't have time to test and explain this right now but basically you need to edit /etc/smb.conf. You can either add "hide dot files = yes" which will hide.. uh.. all files that begin with a dot.. OR you can specify which files to hide specifically by adding "hide files = .DS_Store". I am *not* saying this will work, you need to read the documentation: http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html
Reply
Pete said 9:40PM on 10-13-2006
Great, now how do I make windows-friendly zip archives? The usual right-click method is a pain, as it stores extra tiny files (presumably resource-related) -- my windows-centric colleagues frequently comment/complain about the extra junk.
Reply
Ed said 10:07PM on 10-13-2006
Geoff thats not useful here for a SMB share on a Windows box is it? That has nothing to do with Samba.
Reply
Zac said 11:58PM on 10-13-2006
Ed, SMB is shorthand for Samba. Samba's the cross-platform networking system.
Reply
Carsten Rose Lundberg said 1:47AM on 10-14-2006
To clarify things and give credit where credit is due.
SMB is the protocol (common language in which two clients transfer files). SMB is shorthand for Server Message Block.
Samba is an OpenSource SMB server that enables *nix systems to provide SMB services to SMB clients. OSX has a bulit SMB client that enables us to connect to SMB shares on other computers.
In other words SMB and Samba are not the same - Samba "speaks" SMB.
Reply
Ed said 10:27AM on 10-14-2006
I'm entirely aware what SMB and Samba are Zac, you aren't. SMB was invented by Microsoft for use on Windows. Samba is a hack of that created by packet sniffing and analyzing packets. Windows does not use Samba, nor do Microsoft endorse or support it. SMB stands for 'Server Message Block', not Samba.
As such Geoff's suggestion is entirely useless on Windows where its actually needed.
Reply
NotAwesome said 12:22PM on 10-14-2006
I've been using BlueHarvest for a while to take care of this. Works great:
http://www.zeroonetwenty.com/blueharvest/
Reply
peter honeyman said 5:48PM on 10-15-2006
i want to know how to prevent .DS_Store on the local file system, as well.
Reply
Nick B said 12:13PM on 10-17-2006
Or you could simply use the 'Disable .DS_Store file creation on network drives.' option in OnyX (which every Mac user should install if they haven't already).
And Peter, why? The .DS_Store files serve a legit purpose.
Reply
Nick Klockenga said 12:30AM on 10-17-2006
My Solution
In smb.conf I have under each of my shares "veto files = /.*/"
This doesn't just "hide" the files but actually removes them from even being able to be copied. Unlike "hide dot files = yes" which if windows options is set to view hidden files, users can still see.
Reply
Nick B said 12:18PM on 10-17-2006
Oh, and Pete, check out the free utility CleanArchiver (http://www.sopht.jp/cleanarchiver/) to create .DS_Store-less ZIP (and GZIP, and TAR, and bz2 and...) archives. =)
Reply