Skip to content

Commit

Permalink
Pass DISPLAY environment variable to scripts (Fix ome#4027)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Jan 11, 2012
1 parent 05a95ce commit 1ff6faa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/tools/OmeroPy/src/omero/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def __init__(self, ctx, interpreter, properties, params, iskill = False,\

def make_env(self):
self.env = omero.util.Environment("PATH", "PYTHONPATH",\
"DYLD_LIBRARY_PATH", "LD_LIBRARY_PATH", "MLABRAW_CMD_STR", "HOME")
"DYLD_LIBRARY_PATH", "LD_LIBRARY_PATH", "MLABRAW_CMD_STR", "HOME",\
"DISPLAY")
# WORKAROUND
# Currently duplicating the logic here as in the PYTHONPATH
# setting of the grid application descriptor (see etc/grid/*.xml)
Expand Down
3 changes: 2 additions & 1 deletion components/tools/OmeroPy/src/omero/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,9 @@ def __init__(self, *args):
else:
self.env = {}
for arg in args:
if os.environ.has_key(arg):
if arg in os.environ:
self.env[arg] = os.environ[arg]

def __call__(self):
"""
Returns the environment map when called.
Expand Down

0 comments on commit 1ff6faa

Please sign in to comment.