default directory for opening files

Starting chimera without a session file, I would like to use the open pulldown menu. The default directory is at root "/". If I use a 'cd somedirectory' command and open with the gui, it still defaults to the root. Is there a command that will set the open/save directory for the gui? If not, a way in python? Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine ================================================= =================================================

Hi Matt, There is limited control over where the main File->Open dialog starts. The two options are: the directory you last used (even from the previous session) and the current working directory. This choice is controlled by the “Open dialog starts in directory from last session” option in the General preferences category. —Eric Eric Pettersen UCSF Computer Graphics Lab
On Jun 23, 2016, at 1:58 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
Starting chimera without a session file, I would like to use the open pulldown menu.
The default directory is at root "/".
If I use a 'cd somedirectory' command and open with the gui, it still defaults to the root.
Is there a command that will set the open/save directory for the gui? If not, a way in python?
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine ================================================= ================================================= _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>

Hi Matt, Well, this is kludgy and only for the brave (which you are), but you could edit your preferences file to make the desired location the first one listed in the miller browser dirHistory. It would be a pain to do it all the time, but you could probably script something semiautomatic. Another approach I’ve taken occasionally to ensure keeping the environment exactly the same is to have a non-writable preferences file, but of course then you can’t save any other preferences either, and there is an annoying message upon startup. Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 23, 2016, at 4:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Matt, There is limited control over where the main File->Open dialog starts. The two options are: the directory you last used (even from the previous session) and the current working directory. This choice is controlled by the “Open dialog starts in directory from last session” option in the General preferences category.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 23, 2016, at 1:58 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
Starting chimera without a session file, I would like to use the open pulldown menu.
The default directory is at root "/".
If I use a 'cd somedirectory' command and open with the gui, it still defaults to the root.
Is there a command that will set the open/save directory for the gui? If not, a way in python?
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine

So generally, the preference file automatically gets updated at shutdown of chimera? “Open dialog starts in directory from last session” option in the General preferences category seems to imply there is a variable somewhere that is being maintained. what about controlling the variable through python? Not clear on this: miller browser dirHistor Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine ================================================= ================================================= ________________________________ From: Elaine Meng <meng@cgl.ucsf.edu> Sent: Thursday, June 23, 2016 6:29:26 PM To: Dougherty, Matthew T Cc: chimera-users@cgl.ucsf.edu Subject: Re: [Chimera-users] default directory for opening files Hi Matt, Well, this is kludgy and only for the brave (which you are), but you could edit your preferences file to make the desired location the first one listed in the miller browser dirHistory. It would be a pain to do it all the time, but you could probably script something semiautomatic. Another approach I’ve taken occasionally to ensure keeping the environment exactly the same is to have a non-writable preferences file, but of course then you can’t save any other preferences either, and there is an annoying message upon startup. Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 23, 2016, at 4:14 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Matt, There is limited control over where the main File->Open dialog starts. The two options are: the directory you last used (even from the previous session) and the current working directory. This choice is controlled by the “Open dialog starts in directory from last session” option in the General preferences category.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 23, 2016, at 1:58 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
Starting chimera without a session file, I would like to use the open pulldown menu.
The default directory is at root "/".
If I use a 'cd somedirectory' command and open with the gui, it still defaults to the root.
Is there a command that will set the open/save directory for the gui? If not, a way in python?
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine

Preferences generally gets updated more frequently than that. It gets updated whenever you click ‘Save’ in the Preferences dialog. It gets updated whenever you use a file dialog. So, a lot. Though these values are used and preserved via Python, it isn’t being done in a way that is easy to control from an external script. The easiest way, assuming you are willing to edit the source code, is to change line 381 of chimera/tkgui.py in the latest Chimera to add “initialdir=‘wherever-you-want’” to the keywords being given to the _ImportDialog constructor. —Eric
On Jun 23, 2016, at 4:43 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
So generally, the preference file automatically gets updated at shutdown of chimera?
“Open dialog starts in directory from last session” option in the General preferences category seems to imply there is a variable somewhere that is being maintained. what about controlling the variable through python?
Not clear on this: miller browser dirHistor
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine ================================================= ================================================= From: Elaine Meng <meng@cgl.ucsf.edu <mailto:meng@cgl.ucsf.edu>> Sent: Thursday, June 23, 2016 6:29:26 PM To: Dougherty, Matthew T Cc: chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu> Subject: Re: [Chimera-users] default directory for opening files
Hi Matt,
Well, this is kludgy and only for the brave (which you are), but you could edit your preferences file to make the desired location the first one listed in the miller browser dirHistory. It would be a pain to do it all the time, but you could probably script something semiautomatic. Another approach I’ve taken occasionally to ensure keeping the environment exactly the same is to have a non-writable preferences file, but of course then you can’t save any other preferences either, and there is an annoying message upon startup.
Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 23, 2016, at 4:14 PM, Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> wrote:
Hi Matt, There is limited control over where the main File->Open dialog starts. The two options are: the directory you last used (even from the previous session) and the current working directory. This choice is controlled by the “Open dialog starts in directory from last session” option in the General preferences category.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 23, 2016, at 1:58 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
Starting chimera without a session file, I would like to use the open pulldown menu.
The default directory is at root "/".
If I use a 'cd somedirectory' command and open with the gui, it still defaults to the root.
Is there a command that will set the open/save directory for the gui? If not, a way in python?
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Matt, “miller browser dirHistory” is the text that appears in that part of the preferences file, i.e. if you text-edit it, that was meant as a guide to where to make changes. Elaine On Jun 23, 2016, at 4:43 PM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:
Not clear on this: miller browser dirHistor
participants (3)
-
Dougherty, Matthew T
-
Elaine Meng
-
Eric Pettersen