[Chimera-users] non-GUI use of Chimera
goddard at cgl.ucsf.edu
Tue May 25 13:12:34 PDT 2004
You should be able to use sys.exit() in a *.chimerax script to quit Chimera.
The sys.exit() call raises SystemExit. Unfortunately the code that runs the
*.chimerax file is catching the SystemExit. This is a bug in Chimera 1951
that we will fix. For now you can use "import os" and "os._exit(0)".
The chimera_send script will start a new Chimera if it does not find
one already running that is accepting connections. By default Chimera
does not accept connections. The easiest way to change this is to
start Chimera by hand and use Favorites/Preferences/Web Data to turn
on "Accept Web Data". Then press the Preferences Save button to save
this setting in the user's Chimera preferences file
(~/.chimera/preferences). (Note you'll need to do this as the user
that Chimera runs with from the web server.) You can also change the
"Confirm open of commands or code" preference to "never". This will
prevent the Chimera warning dialog asking whether you really want to
execute the *.chimerax file. You can also save this setting.
Making these settings may pose a serious security risk. There are
mechanisms to allow only the same user that is running Chimera to
run *.chimerax files but I do not know how strong the security is.
Dan Greenblatt (dan at cgl.ucsf.edu) wrote the code and would know.
As it works now, if you wish to send commands to an already running
Chimera, you cannot specify which instance of Chimera. So it is not
possible to communicate with multiple instances of Chimera as you might
want to support multiple web sessions. Dan Greenblatt may have ideas
for addressing this.
More information about the Chimera-users