From 49b0d1390ebb1323cf116238f627f5c88cd0b5c8 Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Wed, 22 Jan 2020 11:01:53 -0800 Subject: [PATCH] Add test for DISPLAY environment variable Check for the DISPLAY variable before blinding setting it to :0, this ensures that if you are working remotely that the correct display is used. Closes-Bug: 1860593 Change-Id: I9fcbfa8ff52732dcd3ee6d86edf7581a49236703 Signed-off-by: Saul Wold --- automated-robot-suite/Libraries/iso_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automated-robot-suite/Libraries/iso_setup.py b/automated-robot-suite/Libraries/iso_setup.py index 91f4d1f..2bf622c 100644 --- a/automated-robot-suite/Libraries/iso_setup.py +++ b/automated-robot-suite/Libraries/iso_setup.py @@ -48,7 +48,8 @@ class Installer(object): terminal = 'xterm' terminal_title = '"controller-0 boot console"' geometry = '-0+0' # upper right hand corner - os.environ['DISPLAY'] = ':0' + if 'DISPLAY' not in os.environ: + os.environ['DISPLAY'] = ':0' command = 'python {suite}/Utils/watcher.py {log_path}'.format( suite=suite_path, log_path=LOG_PATH)