Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Something like
Reset window’s size and position commands discussed so far:
AppStore [code]defaults delete com.apple.AppStore "NSWindow Frame AppStoreMainWindow"[/code] Messages [code]defaults delete com.apple.MobileSMS "NSWindow Frame CKMessagesSceneDelegate"[/code] Photos [code]defaults delete com.apple.photos "NSWindow Frame MainWindow"[/code] Safari [code]defaults delete ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist "NSWindow Frame BrowserWindowFrame"[/code] System Information [code]defaults delete com.apple.SystemProfiler "NSWindow Frame SystemProfile"[/code] System Settings [code]defaults delete com.apple.systempreferences "NSWindow Frame main"[/code]

I wrote as code so you can copy-paste (⌘⌥⇧V) it into the first post and appear like
AppStore
Code:
defaults delete com.apple.AppStore "NSWindow Frame AppStoreMainWindow"

Messages
Code:
defaults delete com.apple.MobileSMS "NSWindow Frame CKMessagesSceneDelegate"

Photos
Code:
defaults delete com.apple.photos "NSWindow Frame MainWindow"

Safari
Code:
defaults delete ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist "NSWindow Frame BrowserWindowFrame"

System Information
Code:
defaults delete com.apple.SystemProfiler "NSWindow Frame SystemProfile"

System Settings
Code:
defaults delete com.apple.systempreferences "NSWindow Frame main"
 
As this thread appears among the first results on Google, I suggest making the first post a wiki post and adding all the reset commands discussed here and confirmed to be working. @ProQuiz

I’m not a developer, I can’t make an app. The best I could do is put the commands in an AppleScript that could be saved as an app.
Something like this:

AppleScript:
set theAPPSs to {"AppStore", "Messages", "Photos", "Safari", "System Information", "System Settings"}
set the selectedAPP to choose from list the theAPPSs with prompt "Reset window for:" default items {"AppStore"}
if selectedAPP = {"AppStore"} then
    do shell script "defaults delete com.apple.AppStore 'NSWindow Frame AppStoreMainWindow'"
end if
if selectedAPP = {"Messages"} then
    do shell script "defaults delete com.apple.MobileSMS 'NSWindow Frame CKMessagesSceneDelegate'"
end if
if selectedAPP = {"Photos"} then
    do shell script "defaults delete com.apple.photos 'NSWindow Frame MainWindow''"
end if
if selectedAPP = {"Safari"} then
    do shell script "defaults delete com.apple.Safari 'NSWindow Frame BrowserWindowFrame'"
end if
if selectedAPP = {"System Information"} then
    do shell script "defaults delete com.apple.SystemProfiler 'NSWindow Frame SystemProfile'"
end if
if selectedAPP = {"System Settings"} then
    do shell script "defaults delete com.apple.systempreferences 'NSWindow Frame main'"
end if

I came across this page https://www.codejam.info/2023/04/macos-reset-app-window-size-position.html that offers an interesting way to search for NSWindowFrame values.

Code:
find ~/Library -type f -name '*.plist' -exec grep -E 'NSWindow ?Frame' {} +
Having just clicked the wrong button in Sequoia — I am actually liking the tiling options with Safari and Mail in spilt screen on my Studio Display, but selected a "fill and arrange" rather than a "move and resize" and so ARD suddenly expanded to half the screen, with no undo… Rage. But that code jam.link is great @bogdanw : I could find the .plist. Apple Remote Desktop is an interesting one in that the .plist contains all settings: the NSWindow seems commingled and not a line item I could plausibly edit or run a script on, so I needed to reset the whole app. I'm running three Macs so this was trivial; if I were a sysadmin obviously that would be a nuclear option.

But this thread brings a smile: thanks vm again. You are doing God's work…
 
Apple Remote Desktop is an interesting one in that the .plist contains all settings: the NSWindow seems commingled and not a line item I could plausibly edit or run a script on, so I needed to reset the whole app.
Reset main window for Remote Desktop 3.9.7, tested in Sequoia
Code:
defaults delete com.apple.RemoteDesktop "NSWindow Frame mainWindow"
 
@bogdanw

I edited the first post.

Should we also request to move this thread into the "macOS" forum (not macOS Sequoia but the "generic" forum titled simply "macOS")? Or should we just leave this thread in this forum?
 
  • Like
Reactions: Weaselboy
Reset main window for Remote Desktop 3.9.7, tested in Sequoia
Code:
defaults delete com.apple.RemoteDesktop "NSWindow Frame mainWindow"

Yes, I see it works. I did not understand (/do not understand, clearly!) the nature of the preference: I was expecting to see numerical variables when I looked at the .plist. This is useful.
 
At risk of pushing my luck as this is just curiosity, anyone know how to do Quicken?

There's a ~/Library/Preferences/com.quicken.Quicken.plist and it does contain a NSWindow, but in Terminal I have tried as many variants as I can, and always get:
Domain (com.quicken.Quicken.plist) not found.

Deleting that just causes Quicken to forget where its data file is; on opening it, the window is the same size as it was before. So, I'm not sure what the .plist is doing anyway, apart form pointing to the data file.

The data file is a package container, with file extension .quicken. Expanding the codejam.com Terminal search to the whole user folder (I think / presume) by removing Library:
Code:
find ~/ -type f -name '*.plist' -exec grep -E 'NSWindow ?Frame' {} +)
It doesn't find anything else.

Not to impugn the good folks at Quicken but this is a Frankenapp that has been ported in, rewritten and back again, and sold, so I would not be surprised if it follows its own rubric entirely. Just curious though.
 
There's a ~/Library/Preferences/com.quicken.Quicken.plist and it does contain a NSWindow, but in Terminal I have tried as many variants as I can, and always get:
Domain (com.quicken.Quicken.plist) not found.
Run defaults delete ~/Library/Preferences/com.quicken.Quicken.plist followed by the quoted name of the NSWindow key
 
  • Like
Reactions: alexjohnson
Not working for me (Safari in Sequoia):
defaults delete ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist "NSWindow Frame BrowserWindowFrame"

"Domain not found".
 
Not working for me (Safari in Sequoia):
defaults delete ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist "NSWindow Frame BrowserWindowFrame"

"Domain not found".
Have you given Full Disk Access to Terminal?
 
Have you given Full Disk Access to Terminal?
Thanks. I hadn't but have now. Same outcome. My "Containers" does not have "com.apple.Safari". It does have:
com.apple.Safari.BrowserDataImportingService
com.apple.Safari.CredentialExtractionHelper
com.apple.Safari.SafariLinkExtension
com.apple.Safari.SafariWidgetExtension
com.apple.SafariFoundation.CredentialProviderExtensionHelper
com.apple.SafariPlatformSupport.Helper

All of these have "Data/Library/Preferences", none of which have "com.apple.Safari.plist".
 
Try
defaults delete com.apple.Safari "NSWindow Frame BrowserWindowFrame"
 
You can’t delete Safari. The app first shows you what it finds, then you can cancel.
Tried this, but no Safari.plist. Searched Macintosh HD, but no Safari.plist anywhere. Reinstalled Sequoia. Same thing. Searched my Air with Sequoia. Same thing. No com.apple.Safari anywhere. I found five com.apple.SafariServices.plist files with the same date and size, all in ~/Library/Group Containers. Can you confirm that your Sequoia contains Safari.plist, please?
 
Yes, com.apple.Safari.plist exists in
~/Library/Containers/com.apple.Safari/Data/Library/Preferences/ on a clean Sequoia install.

If you are looking in Finder, the folder com.apple.Safari appears as Safari in ~/Library/Containers/.

com.apple.Safari_.jpg
 
Yes, com.apple.Safari.plist exists in
~/Library/Containers/com.apple.Safari/Data/Library/Preferences/ on a clean Sequoia install.

If you are looking in Finder, the folder com.apple.Safari appears as Safari in ~/Library/Containers/.

View attachment 2431691
Found it! Thanks. Finder should be renamed Searcher, with no guarantees. I revised my earlier Terminal command (defaults delete ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist "NSWindow Frame BrowserWindowFrame"), which didn't work, to defaults delete Macintosh HD/Users/me/Library/Containers/Safari/Data/Library/Preferences/com.apple.Safari.plist "NSWindow Frame BrowserWindowFrame", where "me" is my username, which did work (the tilde was a problem).

Thanks a million for your help and patience with me. I'll have a beer in your honour.
 
  • Like
Reactions: bogdanw
Run defaults delete ~/Library/Preferences/com.quicken.Quicken.plist followed by the quoted name of the NSWindow key

Yes, I think that's what I'm doing. The file is definitely there in ~/Library/Preferences/:
Code:
defaults delete com.quicken.Quicken.plist "NSWindow Frame"
2024-10-03 12:01:12.881 defaults[30594:3221043]
Domain (com.quicken.Quicken.plist) not found.
Defaults have not been changed.

The .plist has this (truncated):
!"#$%&'()*+,-,,,1-3-567K,MN-,,R-h-j-ltu-,t---{,-~,-_%NSWindow Frame NSNavPanelAutosaveName_QuickFillAllInstancesOfPayee_SUHasLaunchedBefore_NoDecimalPointAmounts_LastVoiceOverEnabledValue_"CategoryDisplayFullyQualifiedNames_NSOSPLastRootDirectory_didClearHTTPLogYSUFeedURL_SUEnableAutomaticChecks_FirstLaunchWhatsNewVersion_LastLaunchTimestampZBIDHistory_!NSNavPanelExpandedSizeForOpenMode_&MarkAutoReconciledTransactionsReviewed_LastExitTimestamp]LastProcessID_CompletedJulyDatabaseUpdate_RenameAllInstancesOfPayee_AllowCanadaFeaturesZSKUHistory_NotFirstReconcile_SULastCheckTime_SUAutomaticallyUpdateZMaxBackups_&AllowLinkedTransfersUsingCategoryField_<NSToolbar Configuration 27DC7DE7-6CAA-41D3-A4C3-
So it looks like it's on the right track, it just doesn't actually work. I have a hunch it's because it's stored in the saved data file, although there's nothing in that which leaps off the page. (In the Quicken forum someone suggested creating a new file and importing old data; it's at about 20 years at this point…!)

As I said, I can live with this — I'm just curious at this point as to what "Domain (com.quicken.Quicken.plist) not found" means of a file I can see is right there.
 
As I said, I can live with this — I'm just curious at this point as to what "Domain (com.quicken.Quicken.plist) not found" means of a file I can see is right there.
When you don't supply a full pathname of a plist, 'defaults' expects you to omit the ".plist" suffix of the file. That is, you should supply one of:
a domain name -- com.quicken.Quicken
a pathname -- ~/Library/Preferences/com.quicken.Quicken.plist

Read the manpage for defaults to see details:
Code:
man defaults

Also try using the 'read' subcommand to 'defaults':
Code:
defaults read com.quicken.Quicken
 
  • Like
Reactions: alexjohnson
When you don't supply a full pathname of a plist, 'defaults' expects you to omit the ".plist" suffix of the file. That is, you should supply one of:
a domain name -- com.quicken.Quicken
a pathname -- ~/Library/Preferences/com.quicken.Quicken.plist

Read the manpage for defaults to see details:
Code:
man defaults

Also try using the 'read' subcommand to 'defaults':
Code:
defaults read com.quicken.Quicken

That's super-useful. So looking at "read" in Terminal I am guessing the main line is:
"NSWindow Frame NSNavPanelAutosaveName" = "880 628 800 448 0 0 2560 1415 ";
So: would I be right to assume that the defaults delete I need to put is, "NSWindow Frame NSNavPanelAutosaveName"? Is the string of numbers something like window sizes and coordinates in (guess) pixels?

Sadly, I did that, and the window position didn't change. I did create a new file, to see if I could compare-and-contrast… and oddly the "NSWindow Frame" hasn't repopulated itself. So, I don't know what exactly is going on with the .plist but I have come to the conclusion that as I expected this is buried in the save file itself. But, I have learned something! Thank you @chown33 .
 
You could try something drastic, like moving "com.quicken.Quicken.plist" out of the Preferences folder, and onto the Desktop. Do this while the app isn't running.

I you relaunch the app, it should rebuild its preferences file with defaults.

All of this is predicated on your version of Quicken still using that plist file in Preferences. How apps store preferences has changed over the years, so your Quicken version might not even use the Preferences plist.
 
  • Like
Reactions: alexjohnson
"NSWindow Frame NSNavPanelAutosaveName" = "880 628 800 448 0 0 2560 1415 ";
I don't think that's for the main window.
Try
read
Code:
defaults read com.quicken.Quicken "NSWindow Frame"
delete
Code:
defaults delete com.quicken.Quicken "NSWindow Frame"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.