Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Changing non-Home folder view options Desktop
I think I have found a better solution for the folder view problem [Editor's note: The problem lies in trying to change the view on folders outside your home directory; you can do it, but the settings do not stick].

If you don't want to log in as root every time you want to change settings so that the Finder doesn't forget them after you log out, you just have to change the owner of the invisible .DS_Store files within the folder. You do that with the terminal command
sudo chown #yourownername# .DS_Store
If you want to do this for all .DS_Store files on your hardrives you should try this:
sudo find / -name .DS_Store | xargs chown #yourownername#
This should be quite fast but the problem is that paths that contain withespaces arent recognized as one path. so probably you better use this
sudo find / -name .DS_Store -exec chown #yourownername# {} \;
[Editor's note: I have not tried this myself, but it makes sense that if you own the .DS_Store file, your changed view settings would be remembered.]
  • Currently 1.50 / 5
  You rated: 1 / 5 (4 votes cast)

Changing non-Home folder view options | 13 comments | Create New Account
Click here to return to the 'Changing non-Home folder view options' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Second version doesn't work for me
Authored by: monickels on Jan 02, '02 11:33:34AM
Using the the second command exactly as typed, I get this error: find: -exec: no terminating ";" even though I have included the ;

[ Reply to This | # ]
Second version doesn't work for me
Authored by: escowles on Jan 02, '02 11:44:09AM

You need to put a backslash "\\" in front of the semicolon. This probably got stripped out of the original posting.

[ Reply to This | # ]
Fixed article...
Authored by: robg on Jan 02, '02 04:29:43PM

Nice catch; I put the backslash into the original article again ... sigh.


[ Reply to This | # ]
Thank you thank you thank you thank...
Authored by: sjonke on Jan 02, '02 12:23:42PM

Thank you for clueing me in! My top level (/) folder was driving me crazy with files and folders scattered about willy nilly. The questions is, how did they get that way in the first place? I didn't do it, I swear. :) Also, are there any security issues in having this owned by someone other than root?

[ Reply to This | # ]
A solution using Dragthing hot keys
Authored by: jjckanellis on Jan 02, '02 05:15:58PM

The way I've done this (without planning to) is to assign a hot key in dragthing for some of my most used folders. For example, after dragging my "Downloads folder" onto the dragthing dock, I assigned the keys command-control-d. I discovered that whenever I press the hot keys, the folder opens in the view that was last used.

I am a big fan of Robs two column view setup (as recommended in his fantastic OSX guide) and have assigned command-control-up arrow to the top window and command-control-down arrow to the bottom window (just select two folders you often have to access, particularly to rearrange things, and drag them onto dragthing - assign one the top view and the other the bottom view ). I use my software library (on another partition) as the bottom window. I find these hot keys much quicker than the "Tandem" Applescript for calling up the 2 window setup.

You can assign any view and window size - icons, columns etc, by simply closing the window once it is right - just as you do for the Finder dock icon. I now have about 10 of my most used folders just a key stroke away (apps, utilities, favorites, downloads, installers, photos, music etc.). Couple this with some links in the toolbar and quick access to any file is ensured. Dragthing is great. If you try this make sure you check the hotkeys already assigned under Dragthings Preferences. You may choose to change some of these or switch them off. If you assign more than one thing to the same hot key, then they should all happen when the hot key is pressed (as far as I've seen so far).

Incidentally, assigning drag thing hot keys to applescripts is also great. I have a few for some of my most used iTunes applescripts (select/deselect, add to favorites, file renamer etc. ).

[ Reply to This | # ]
Quicker shell command
Authored by: vasi on Jan 03, '02 06:45:49AM

This should go a bit faster from the command line prompt:

sudo find / -name .DS_Store -user root -print0 | sudo xargs -0 chown vasi

Replace "vasi" with your username, of course. The print0 and -0 flags work quite nicely together on a system like OS X that's full of spaces in filenames.

[ Reply to This | # ]
Quicker shell command
Authored by: zadig on Feb 04, '02 09:26:01PM

That works well, and thanks for putting me on the right track, but you don't need to change the owner or the group. Instead just add write privileges to the group that the .DS_Store files already belong to (Admin). If you're logged in to an Admin account, you're good to change prefs and they'll be remembered.

If you want all users to be able to change the .DS_Store files, add write privileges to the world as well. Here's the modified version of the command that will do this:

sudo find / -name .DS_Store -user root -print0 | sudo xargs -0 chmod go=+w

That should work, and without changing the owner or group.

[ Reply to This | # ]
Quicker shell command
Authored by: uurf on May 07, '02 01:53:45PM

Sorry, what would the command be to "just add write privileges to the group that the .DS_Store files already belong to (Admin)."?


[ Reply to This | # ]
Quicker shell command
Authored by: uurf on May 07, '02 02:07:28PM

is it this:
sudo find / -name .DS_Store -user root -print0 | sudo xargs -0 chmod g=+w


[ Reply to This | # ]
Quicker shell command
Authored by: uurf on May 07, '02 02:55:18PM

thanks man pages - i think this is it - a command to find all the .DS_Store files owned by root and change their group from wheel to admin

sudo find / -name .DS_Store -user root -print0 | sudo xargs -0 chown :admin

[ Reply to This | # ]
how to make new windows remember?
Authored by: bruddahmax on Jul 03, '02 02:55:24AM

new folders create new .DS_Store files with default preferences not set to ADMIN as the user. how can this be changed?

[ Reply to This | # ]
how to make new windows remember?
Authored by: Cobber99 on May 28, '06 03:24:49PM

Indeed - does anyone know how to stop the system from making new directories
with root ownership on the .DS_Store file? It is insanely annoying and any help
here would be much appreciated!

[ Reply to This | # ]
root-owned .DS_Store files
Authored by: sjk on May 28, '06 04:41:17PM
.DS_Store are created with ownership of the current Finder user. If you're seeing root-owned .DS_Store files they've probably been added by running authenticated installers; that's how they've gotten onto my systems anyway. Or you're running Finder as root? :-)

If you're logged in as a non-root user and new .DS_Store files in folders you create with Finder are owned as root then things get tricker. There's no reason to over-speculate about possible causes without more detailed information about your system/environment. Seems better to start with simple explanations.

[ Reply to This | # ]