When you change the size and position of a freshly opened window, the new settings should be retained whenever you next open that window, even after restarting the system. This is because the settings for each window are stored in the hidden .DS_Store file within the opened directory for that window. Sometimes, however, the settings will not appear to load properly, which can be frustrating for users.
Apple discussion poster "Imagine" writes:
"I have a 30-inch display. Every time I reboot my Mac Pro, I have to resize my main drives window to make it bigger. I never seems to keep. Is there a way to fix this?"
How window size and position settings work:
If you open a window, the .DS_Store settings for the first viewed folder are used, and as long as that window is utilized for navigation the settings will be preserved for other folders viewed. Any changes to window size will only be saved if you are still viewing the original folder that was opened. Navigating to another folder and then changing the window size will not preserve the settings in either that new folder's .DS_Store file or in the original folder's .DS_Store file.
This is normal OS behavior, and basically means in order to change a folder's settings you need to open that folder in a new window, alter the window settings, and then close the folder. Then to access the settings again you need to directly open that folder in a new window again. Keep in mind that by default the system will show your "Home" folder when creating a new window, so the .DS_Store file for that directory will be loaded the most.
There are two possible reasons why the settings for a window will not load: one being because of normal window behavior, and the other being corruption or inaccessibility of the .DS_Store file itself.
Settings are loaded once for each window.
As I described above, the OS will only load the .DS_Store settings for the first window opened and then continue to use those settings for the current window session, regardless of where you navigate. You can overcome this default behavior in two ways:
The first is to set the Finder to always open folders in a new window, which will make use of each folder's .DS_Store file every time. This can be set by going to the "General" tab in the Finder's preferences and checking the box to always open folders in a new window.
The second is to press and hold the command key while double-clicking a folder to open it in a new window, which will load that folder's .DS_Store file upon opening. From here if you navigate with the new window, the new settings will be maintained.
Corrupt .DS_Store files.
If the .DS_Store file is corrupt, then regardless of how you open the folder the window settings will not load. If this is the case, you can have the system recreate the .DS_Store file by deleting it from the affected folder. You can easily do this in the Terminal with the following procedure:
Open the Terminal
Type "sudo rm " followed by a single space
Drag the offending folder to the terminal window
Delete the space at the end of the line and type "/.DS_Store". The command should now look like the following:
sudo rm /Users/tkessler/test/.DS_Store
Press enter and authenticate to remove the file.
NOTE: The use of "sudo" to run the command with administrative privileges is only needed for folders which you do not have write access. Sometimes the DS_Store file corruption can be that the file is not accessible by you because of permissions settings, in which case the "sudo" command will be needed to remove the file. Be sure the command is completed as indicated to avoid any errors.
Once the file has been removed, open the folder directly (using command with double-clicking) and then close it again after changing the size and position. This will create the new .DS_Store file which should now be accessible.