VMExtractor: Run graphical QEMU on debug mode only if a $DISPLAY is set

This commit is contained in:
RichardG867
2022-05-21 23:15:08 -03:00
parent 4b111ff9ba
commit 273c971af8

View File

@@ -2558,7 +2558,7 @@ class VMExtractor(ArchiveExtractor):
def _run_qemu(self, hdd=None, hdd_snapshot=True, floppy=None, floppy_snapshot=True, vvfat=None, boot='c', monitor_cmd=None, monitor_flag_file=None):
# Build QEMU arguments.
args = [self._qemu_path, '-m', '32', '-boot', boot]
if not self.debug:
if not self.debug or not os.getenv('DISPLAY'):
args += ['-display', 'none', '-vga', 'none']
if monitor_cmd:
args += ['-monitor', 'stdio']