On the origins of .DS_Store

If you are a Mac user, or if you have transfered files from Mac to Windows, you’re probably familiar with .DS_Store files. But where does this name come from?

Back in 1999 I was the technical lead for the Mac OS X Finder at Apple. At that time the Finder code base was some 8 years old and had reached the end of its useful life. Making any changes to it require huge engineering effort, and any changes usually broke two or three seemingly unrelated features. For Mac OS X we decided to rewrite the Finder from scratch.

Part of the work involved separating its user interface and its core functionality, the back-end. The back-end of the Finder enumerates files, watch for changes in the file system, deals with metadata, including icon locations and folder settings. Internally, those two components were known as Finder_FE and Finder_BE (Frontend and Backend).

However, we soon started realizing that the Finder backend would be useful outside of the Finder. Therefore, a plan was hatched to someday make it available as a public API. Since I had previously been responsible for naming Icon Services and Navigation Services, we decided to go with Desktop Services (at the time, we were also considering renaming the Finder to “Desktop”). Hence the name of the .DS_Store, for “Desktop Services Store”. We added a “.” in front of it so that it would be considered as an invisible file by Unix OS, including Mac OS.

Personally, I don’t think it’s a great name and I wish we had gone with something a bit more descriptive, but it’s too late for that

There is also an unfortunate bug that is not fixed to this day that result in an excessive creation of .DS_Store file. Those files should only be created if the user actually makes adjustments to the view settings or set a manual location for icons in a folder. That’s unfortunately not what happens and visiting a folder pretty much guarantees that a .DS_Store file will get created

Incidentally, Finder_BE aka Desktop Services did end up being used by more than just the Finder: Navigation Services (the Open/Save dialog) now also make use of it, although it didn’t in the initial release of Mac OS. However, the Desktop Services API has still not been fully released.

30 thoughts on “On the origins of .DS_Store

  1. Thanks for posting this.

    I can’t speak for anyone else, but if you wanted to write any more posts about the development of the Finder or other parts of Mac OS/Mac OS X that you’ve worked on, I’d love to read them.

  2. There is also an unfortunate bug that is not fixed to this day that result in an excessive creation of .DS_Store file.

    Not surprising, the Finder is in a sorry state and Apple is dropping the ball big time. I won’t comment on this, or I will have a sudden access of rage. 😀

  3. Thank you for this. It is unfortunate that these files pop up all over the place — I always do a search for them before burning CDs or making archives. I wish there were a better way to store this information.

  4. Well… ironically there is now a better way to do this. Mac OS X now supports extended metadata. That’s what Spotlight uses. So, really, that’s what the Finder should be using today and I’m not sure why it isn’t.

    At the time, there were two camps at Apple: those who believed that pervasive metadata could lead to a better user experience and those who thought that constraining yourself to the capabilities of the Unix file system would make interoperability with other OSs easier.

    Thankfully, the value of metadata is now finally recognized and Mac OS has some of the best metadata support, but we still seem to be stuck with decisions from seven years ago.

  5. “Those files should only be created if the user actually makes adjustments to the view settings or set a manual location for icons in a folder.”

    And thats the REAL problem with DS_Stores – it is based on a set of poor assumptions. For example, in a network environment your assuming that everybody wants the same view settings.

  6. Hmmm, I had always wondered what the deal with those was.

    “And thats the REAL problem with DS_Stores – it is based on a set of poor assumptions. For example, in a network environment your assuming that everybody wants the same view settings.”

    A very good point. Eclipse does something similar — it thinks that your project-specific settings should be checked into the repository. I’ve never understood that one myself.

  7. Arno, there are more lessons to be learned about .DS_Store files, I’m afraid.

    1. .DS_Store files should be plists, not a random chunked binary format. Even six years later, it’s nearly impossible to automate disk image setup for software distribution.

    2. The whole concept of storing view settings with the file system node is a bad idea on a multiuser system, or a system that logs onto multiuser systems. What you really want is to capture the user’s view settings somewhere in ~/Library. That keeps them stable for network users, keeps them from polluting network server directories, and Grandma never notices the difference on her single-user, dial-up-connected iMac.

  8. I’ve been biting my tongue for a few years now, and while John Siracusa had been a thoughtful critic of the Mac OS X Finder, I must say I agree with almost everything he has to say about the Finder. In fact, he was one of the few people who was right on the money (I think) regarding what the Finder should have been/should be some day. We actually used printouts of John’s columns to try to influence the decision makers at the time, as sometimes a voice from the outside is given more weight than a chorus on the inside. Unfortunately, there were powerful forces at work. My only consolation is that I know that it could have been worse. One day, I shall tell the tale.

  9. Great blog. I have a question regarding the Finder. If it is written from scratch, why didn’t you write it in Cocoa?

  10. arno, it’s good to hear that at least one of the Finder’s developers was not ignorant to the idiocy that is the OSX Finder. I hardly use the it anymore, Quicksilver is my interface to my mac now.

    However, if Steveness and his NeXT cronies still haven’t updated the Finder in any significant manner by Leopard, it will be great if you can tell us more about how the Finder degenerated into such a state. /j

  11. I wish Apple had renamed the Finder to be “Desktop”. One of the main issues I have when dealing with new Mac OS X users is getting them to understand the nomenclature/terminology used. When I tell them “Go to the Finder”, all of the newbies will stare back with a blank look. Everybody understands what the Desktop is. Naming the Finder “Desktop” would have been a very smart move.
    On a separate note: It’s really depressing that the .DS_Store feature/bug is still present to this day. I get cursed daily for dropping .DS_Store files on the company’s Windows share.

  12. I’m really interested in hearing your tale about the Finder. I always loved the classic Finder, but the OS X Finder is just not that great. Not awful, but not great. I’m intrigued by the small amount of information you’ve given, so I can’t wait to hear the rest!

  13. “I’ve been biting my tongue for a few years now, and while John Siracusa had been a thoughtful critic of the Mac OS X Finder, I must say I agree with almost everything he has to say about the Finder. In fact, he was one of the few people who was right on the money (I think) regarding what the Finder should have been/should be some day. We actually used printouts of John’s columns to try to influence the decision makers at the time, as sometimes a voice from the outside is given more weight than a chorus on the inside. Unfortunately, there were powerful forces at work. My only consolation is that I know that it could have been worse. One day, I shall tell the tale.”

    We wrote an article over at Deep Thought that, among other things, advocates exactly that: find the experts on the Internet, read what they have to say, and then do something about it. It’s encouraging to learn that this actually does happen, but discouraging to know (but, not entirely surprising) that it’s often shot down anyway.

    PS What, no blockquotes? :^)

  14. I hope the story day comes sooner than later. A good date could be after Leopard and it’s improved Finder are out of the bag.

    I hope the improved Finder will make it’s way to Leopard. A sure thing is that Apple is working on Finder, but it’s as clear that you can’t make too big changes once and Apple has lots of other priorities than Finder, which seems not to bother most of the plain users. We power users aren’t that plenty.

  15. Thanks for the great post. I personally love the classic finder and hope that it gets updated in Leopard. The ds files are bad, as is the overall quirkiness of the Finder. There just seems to be an unevenness through the Finder, if you know what I mean. But I prefer it to any other non Mac OS any day!

  16. There are a few reasons why the Finder wasn’t written in Cocoa. As Arno could comment on, Cocoa wasn’t considered viable option at the time the OSX Finder was architected. The Finder was also considered an essential part of the Carbon story and served to act as internal validation to several 3rd party developers who used, and still use, Carbon. Anyone who thinks that rewriting the Finder in Cocoa will somehow magically improve the application is totally underestimating the magnitude of the task.

    As to the anonymous poster who is upset about the idiocy of the Finder, I am glad he has found someway to workaround the problem created by Steve and his NeXT cronies. These guys are also responsible for the iPod, the MacBook Pro, Apple’s amazing industrial design and a multitude of ground breaking software applications.

    It would be interesting to hear Arno’s stories, but they are certainly dated. Mine would be a whole lot better as I have just left Apple after working on Finder for six years.

  17. Arno / Gene
    Please do write something about it !
    The Finder seems to be one of the last places where the rough edges are still apparent in this relatively new OS.
    Knowing what led to it would be great. It would be invaluable for the Mac community that has been waiting for answers for a long time.
    Unfortunately Apple is so silent about their working process that we can only know something about it from those who left the company.
    Most software houses allow and even encourage their developers to blog. It’s much better than cold press releases and marketing nonsense

  18. You know… considering some of the venomous feedback I’ve received so far (I haven’t published them), I don’t think I’m going to share more.

    I don’t really feel like being a punching bag for people to let out their frustration on. Sorry.

  19. Arno, you’d be doing the community a service that would far outweigh the pissings of a few trolls. Please consider it. Maybe you and that Gene guy could get together on it. Perhaps your chronicles could be the tipping point that gets them to start dealing with the glaring issues that they refuse to acknowledge.

  20. “You know… considering some of the venomous feedback I’ve received so far (I haven’t published them), I don’t think I’m going to share more.

    “I don’t really feel like being a punching bag for people to let out their frustration on. Sorry.”

    I think this is the wrong approach. You should try to revel in the praise you get from the majority of readers, and simply ignore the crap that people fling when no rocks are around and they’ve had too much chili. There are always going to be people who think they’re better than you or that you’re stupid, and part of this whole “blogging” thing is getting used to that and simply ignoring it. And you’ve done a good thing by not publishing it. But think of people like that as “human spam:” they may not be pleasant, you might not be able to stop them, but there are things you can do to control them.

    And if you’re really worried about it, you can always disable comments. But I think you’d be doing a far greater disservice to your readership by not writing more stories like this than anything these pricks are doing to you. Or, if it really bothers you that much, you could let someone else handle the feedback. 😉

  21. Definitely comment further. The trolls aren’t worth listening to. I’ve been tracked down and punished for leaving .DS_Store turds on network volumes I visited with my notebook when entering others’ facilities, and this behavior gives the whole platform a bad name in the support infrastructure.

    Does Apple know how much Mac-hating support folks don’t want to be backing up a bunch of .DS_Store turds every night just because some user had the gall to bring in a machine on which actual work could be accomplished?

    Thanks and take care.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>