FWIW you can easily delete all the .DS_Store files on your hard drive, or just those in any selected directory path using the free utility OnyX
not to rain on your parade, but I have done this before, but can confirm in my case it does NOT fix this problem.
Actually, just for kicks, I just deleted them all again, rebooted, and now a few minutes later my icons are messed up again.
as I've noted earlier in this thread, or perhaps other similar threads about this problem, simply doing some file Save-As from Mail or Safari eventually messes up my home folder icon placement. It's very repeatable. and extremely annoying.
Somewhere, OS X Lion is probably corrupting the .DS_Store files, and clearing them all out does nothing to solve the root problem
so far, so good, though whether i've spoken too soon remains to be seen.
for clarity, the actual process i followed was this;
close all instances of finder.
type in the command as above in my previous post, take heed of the warning about the sudo command.
type in the admin password.
now, here is the bit that raises a question or two.
when i did this, i had time machine turned on, but no backup drive connected.
in the terminal window, meanwhile, a prompt repeatedly appears on occasion asking whether to override the permissions on certain .ds_store files, all of which reside in directories found in the mobile backups folder. i said no to each prompt each time.
then, after waiting an age, while the process in terminal was still running, i turned time machine off completely, risky. the terminal process promptly finished, while it responded to no time machine with a repeated message along the lines of directory not found.
expected, as i'd effectively deleted the mobile backups folder.
opened a few finder windows, changed the view options, did NOT click set as default anywhere.
turned time machine back on.
that was about 5 hours ago, and no finder view has changed yet.
this is making me think that perhaps the local backups, in particular the local preference backups, have something to do with the view preferences being messed up. or the fact that i left remember windows checked when i restarted.
i'll wait and see some more.
My "solution" of turning off iDisk syncing lasted a few days, but alas my icons are rearranging again. Something in iDisk syncing must trigger the change but must not be exclusive in doing it. Waiting for Apple to fix this hideous bug, I guess. Worst experience with an OS upgrade for me, by far. Lots of things broken, Apple too busy trying to sell iPhones to get OS updates out, it seems. Very frustrating for a long time Apple user.
There is a free applescript studio app called Desktop Icon Memorizer (DIM) v2.0.2 that works in Lion. It has two functions: It remembers the positions of your desktop icons. It restores them when they get messed up by Lion.
You can get it here:
It also includes the original applescript in the download for people curious on what it was built on, as well as the xcode project. It's donationware and not crippled. I'm not affiliated with DIM or the coder but always looking for easy solutions to problems that will probably get solved in an OS X update or two.
ditto that .... my desktop icons are the only stability I have as well, its everything else that doesn't maintain view option settings that I set ... also I do not, and never have, used MobileMe or iDisk syncing, as stated in the earlier posts
has everyone made sure to send a bug report to Apple? http://www.apple.com/feedback/macosx.html
after updating to 10.7.2, the problem remains. any further ideas?
Sorry to read that . I've been beta-testing 10.7.2 for the last six weeks, and this problem completely stopped for me with the first 10.7.2 build I tried and has remained fixed ever since. So it appeared 10.7.2 would be the answer for most others too.
Prior to that, the problem wasn't quite as severe on my machine as some people reported, but many folders frequently forgot their settings and my desktop was messed up several times, enough to be extremely annoying.
Only idea I have at the moment is feedback to Apple.