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 <sgw@linux.intel.com>
This commit is contained in:
Saul Wold 2020-01-22 11:01:53 -08:00
parent a8acbf01c5
commit 49b0d1390e
1 changed files with 2 additions and 1 deletions

View File

@ -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)