1

I have a problem with the old PageSpinner 5.2.1 that has not been updated for a long time and it can no longer remember the last opened folder in Open dialogs and always default to the same ~/Documents folder. Is there a way to change the default folder for a specific application and/or for all applications Open... dialog?

1

The Open... Dialog defaults to the current folder for MOST applications. You chan change this by changing directory in Terminal (note that in my experience, some applications, especially Java ones do not follow this default behavior and in stead open the same directory every time, I assume this is hard-coded in the application).

Now to the meat of your question: can we change this behavior on a per-application basis, using the tools OS X has pre-installed? My guess is yes!, though I don't have time to do the research right now. What we'd be looking for is:

# wait for application to be switched 

# see if we have defined a default directory for that app

# if we have change, if not go to default 

# go back to top and wait to app switching

Others should definitely feel free to flesh out my skeleton code, please don't accept this answer until it is complete. I'll look again tonight and see if I can't finish that out. Potentially helpful link

  • I can't reproduce the relationship between the current directory in Terminal and the directory used in the Open dialog, can you clarify where/how exactly this works? – nohillside Sep 6 '15 at 12:38
  • @patrix, I appear to be wrong, this worked in Mountain Lion, appears to be broken in Yosemite, it looks like it just chooses the last directory selected from an Open... dialogue. I'll look further into it. – agentroadkill Sep 6 '15 at 12:44
  • Someone had a similar question on SuperUser, I found a promising answer, though that's from back in '11, so I can't vouch for how current it is – agentroadkill Sep 6 '15 at 12:52
  • More answers on where, how, and why this is set. My understanding was that each App was launched from a common shell, hence my current directory method worked. When Apple moved to true sandboxing in OS X 10.9 (or 8?), it was likely changed so that each app launches from its own shell. This is annoying in that it no longer works, but interesting in that there is probably a way to set a default startup directory for each app. – agentroadkill Sep 6 '15 at 13:02
  • Applications are started by Finder (kind of), as is Terminal and any shell running within, there isn't (and never was) a relationship between the default directory used by Finder and the one used by Terminal. The linked articles don't really relate to the problem at hand. – nohillside Sep 6 '15 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .