[ome-devel] Scripts / Environment Variables / OpenGL...

Josh Moore josh at glencoesoftware.com
Wed Jan 26 18:15:26 GMT 2011


Hi Jerome,

The entire environment from the running user is not copied into the subprocess. If you would like to workaround for the moment see:
https://trac.openmicroscopy.org.uk/omero/browser/ome.git/components/tools/OmeroPy/src/omero/processor.py#L127
We can discuss the implementation under:
http://trac.openmicroscopy.org.uk/omero/ticket/4027

Cheers,
~Josh


On Jan 26, 2011, at 6:46 PM, Jerome Avondo wrote:

> 
> Hi all,
> 
> I have the following problem,
> 
> I have OMERO 4.2.1 installed on a linux box, fedora core 12.
> I have a user called omero on the box, who starts/runs omero,
> The user omero also has the ~/.bashrc file setup to contain,
> 
> export DISPLAY =:0.0
> 
> such that I can have access to the xserver for stuff like OpenGL applications. 
> So when I'm logged in as omero, I can run glxinfo etc etc ... 
> All works fine from terminal...
> 
> But when I try to run a server side script from OMERO.insight, and do something simple like (note some code removed for simplicity sake):
> 
> import subprocess
> 
> def doSomething():
> 
>        cmd = "glxinfo"
>        run = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
> 
>        returncode = run.wait()
> 
>        stdout = run.stdout.readlines()
>        stderr = run.stderr.readlines()        
>        log("stdout: %s stderr: %s" % (stdout,stderr) )
> 
> I get an error back saying "Error: unable to open display". Which would lead me to believe that the DISPLAY environment variable is not specified no?
> The omero python scripts should be executed as the omero user no? So how come the DISPLAY variables seems to have gotten lost?
> 
> Any help appreciated as useal...
> Thanks,
> 
> Jerome.
> 



More information about the ome-devel mailing list