[Chimera-users] non-GUI use of Chimera
Charles Moad
cmoad at indiana.edu
Tue May 25 13:43:58 PDT 2004
We do not need the ability to issue requests to a specific instance of
chimera. I changed the preferences and I was having new instances of
chimera appear for each request, but that changed after restarting chimera.
The current solution we are using involves the following. You open a
web page which is a python/cgi script that prompts for input. Using
SOAPpy, we issue a call to a web service function to do the rendering.
The SOAP response is a pointer to the image url. The SOAP server just
generates a chimerax file based on the request and spawns a chimera_send
process. Other than the fact that we must have chimera attached to an
Xserver everything works really well.
Thanks,
Charlie
Thomas Goddard wrote:
> Hi Charlie,
>
> 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.
>
> Tom
>
>
More information about the Chimera-users
mailing list