[Chimera-users] default directory for opening files
pett at cgl.ucsf.edu
Thu Jun 23 17:16:58 PDT 2016
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.
> On Jun 23, 2016, at 4:43 PM, Dougherty, Matthew T <matthewd at 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 at cgl.ucsf.edu <mailto:meng at cgl.ucsf.edu>>
> Sent: Thursday, June 23, 2016 6:29:26 PM
> To: Dougherty, Matthew T
> Cc: chimera-users at cgl.ucsf.edu <mailto:chimera-users at 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 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 at cgl.ucsf.edu <mailto:pett at 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 at 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 at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users