# Global Preferences



## Jermsmingy (Mar 24, 2002)

Hey Guys, 

     Have any of you noticed in 10.1.3 that the windows you have set to global preferences on you hd go back to this window only whenever you restart?  I can' t figure it out.  My home directory stays on global no matter what and any folder I create stays on global, but my hd, applications, library and all that stuff always resets.  It is very annoying.  Does anyone no how to fix this?  Any ideas would be very helpful.  It does this on the 3 macs that I own.  2 g4 imacs,  and an iBook 500.


----------



## ddma (Mar 25, 2002)

I used to have this problem on my iBook but it was fixed by re-install Mac OS X... And now... it appears again on my PowerBook...


----------



## edX (Mar 25, 2002)

i have noticed that his problem seems to have popped back up with 10.1.3 (happens with 'this window only' as well) after being fixed in 10.1.2.  it does seem a bit weird to be going backwards.


----------



## twister (Mar 25, 2002)

my TiBook does it also.  I tell the stuff on the HD to arrange by Name and it works fine till restart. Then it's not arranged by name anymore.  Stupid thing.

Twister


----------



## simX (Mar 25, 2002)

I believe this problem is caused by the ".DS_Store" file not being able to be written to by your user.  This means that when you do the changing, it honors it temporarily, but since you can't write to the file, when you logout the changes are lost.

What you could simply do is delete all of the .DS_Store files in every folder, and then when you are browsing through the windows in your own user, they will be created with you as the owner.  Or you could just go into the problem folder and change the owner of the .DS_Store file to yourself, and then be on your merry way.

I'm not exactly how to do it recursively, but the command to change the owner to yourself would be sudo chmod 666 pathtofile.  Alternatively, you could just make yourself the owner by doing a sudo chown yourusername pathtofile command.  I'm not sure which one Apple recommends, though.

I think there was a thread that showed how to do a recursive delete of all your .DS_Store files on your hard disk, which would effectively kill the problem in any folder.  I'll try to find the link and post it here.  Watch for an update.

By the way, the .DS_Store file doesn't have any other use, so deleting the file will have no ill effects.

UPDATE:  This command (when used in the Terminal) will remove all .DS_Store files from your hard disk, and then when you browse your folders via the Finder, they will be recreated with your window preferences (or the defaults if you haven't set the prefs, in which case it will honor your Global preferences you set).

find / -name .DS_Store -exec rm {} \;

I would suggest using a "sudo" before it to prevent any permissions errors.  I would also *HIGHLY* suggest cutting and pasting the command in the Terminal to avoid any problems.  I have tried this, and it works as expected.  (I don't have any text files that contain the string ".DS_Store", but I don't know if it will delete files with that in the name or if it looks for the exact name -- maybe vanguard can clear this up.)

Tell me if that fixes your problems.  It should.


----------



## Jermsmingy (Mar 25, 2002)

worked like a charm.  I had to use the sudo infront of the command and it showed a whole bunch of folders followed with permission denied asked me for my password.  And when I type it in and restart my preferences stayed the same


----------



## Jermsmingy (Mar 25, 2002)

Ok it worked on both of my g4 imacs, but it will not work on my sisters 500 ibook.  I tried it multiple times.  Any ideas on what might be the problem


----------



## Jermsmingy (Mar 25, 2002)

Ok I booted up in console and did fsck -y and then tried it and it worked.  Thanks SimX


----------



## twister (Mar 25, 2002)

that sound complicated.  but i may try it lator.  I wonder if i just log in as root and then it'll save the chages.  Ohhhhh.

Thanks for the solution though!

Twister


----------



## Jermsmingy (Mar 25, 2002)

just type 

"sudo find / -name .DS_Store -exec rm {} \;"  

it will ask for your password and it works like a charm


----------



## Joana (Mar 26, 2002)

Have any of you guys tried chaging the windows settings on Mac OS 9? That's what I did, and when I restarted with OS X, the icons stayed on the same position!

Joana


----------



## simX (Mar 26, 2002)

Joana:  Really?  Wow, that's a strange solution.  I dunno if the window settings for OS 9 and OS X are related, though, because OS X has different views than OS 9.

Can anyone else try Joana's solution?  I'd really be interested if that works.

twister:  The solution isn't that complicated.  First, make sure you are an administrator, then just copy this into the Terminal window: sudo find / -name .DS_Store -exec rm {} \;.  Then press return, type in your user password (it won't show up  not even bullets  but it will be there, don't worry), and type return.  It takes a bit of time to finish deleting all the files, but once it does, it'll work great!


----------



## ddma (Mar 26, 2002)

I tried and it works! Now the Application folder saves my preference, remember the window size... But, I lost all folders' preference as well... Like the position of the icons in Microsoft Office v.X folder.


----------



## simX (Mar 26, 2002)

Yeah, like I said, these files only contain the window preferences stuff, like location of icons and stuff.

Sorry if I didn't stress that enough... I hope it's not too much of an inconvenience, ddma.


----------



## ddma (Mar 26, 2002)

It's fine to me and I need to say thanks instead! I think that caused the windows couldn't save the size/position/preference was that my system was restored by the restore discs from Apple.

Reinstall the system myself would kill the problem, I guess.


----------



## nkuvu (May 11, 2002)

Instead of deleting the .DS_Store files (and consequently have to reset all icon positions), why not just reset their attributes?

```
[color=blue]find / -name .DS_Store -exec sudo chmod 666 {} \;[/color]
```
Should set all .DS_Store files to read/write for all users.  I ran this and got a few errors from find (like "find: /private/var/root/Desktop: Permission denied") but I don't think that will mess anything else up.  Find couldn't access /.Trashes, /private/var, or /System/Library/.

As I said, I just ran this on my machine, so we'll see if it causes any other problems.  But I can't imagine that it would...


----------

