diff --git a/pyanaconda/core/util.py b/pyanaconda/core/util.py index 01f9e552f9b4..8d2a6d543ab9 100644 --- a/pyanaconda/core/util.py +++ b/pyanaconda/core/util.py @@ -354,7 +354,7 @@ def execWithRedirect(command, argv, stdin=None, stdout=None, root='/', env_prune log_output=log_output, binary_output=binary_output, do_preexec=do_preexec)[0] -def execWithCapture(command, argv, stdin=None, root='/', env_prune=None, +def execWithCapture(command, argv, stdin=None, root='/', env_prune=None, env_add=None, log_output=True, filter_stderr=False, do_preexec=True): """ Run an external program and capture standard out and err. @@ -370,7 +370,7 @@ def execWithCapture(command, argv, stdin=None, root='/', env_prune=None, argv = [command] + argv return _run_program(argv, stdin=stdin, root=root, log_output=log_output, env_prune=env_prune, - filter_stderr=filter_stderr, do_preexec=do_preexec)[1] + env_add=env_add, filter_stderr=filter_stderr, do_preexec=do_preexec)[1] def execWithCaptureAsLiveUser(command, argv, stdin=None, root='/', log_output=True, diff --git a/pyanaconda/display.py b/pyanaconda/display.py index 053183b5b40a..46f2ee96c372 100644 --- a/pyanaconda/display.py +++ b/pyanaconda/display.py @@ -250,14 +250,9 @@ def wl_preexec(): "--wayland", "--no-x11", "--wayland-display", constants.WAYLAND_SOCKET_NAME]) - # remote access needs gnome-kiosk to start in headless mode & - # configure a virtual monitor + # remote access needs gnome-kiosk to start in headless mode if headless: - # check virtual monitor resolution has been set - if headless_resolution is None: - # use default value - headless_resolution = "1280x1024" - argv.extend(["--headless", "--virtual-monitor", headless_resolution]) + argv.extend(["--headless"]) childproc = util.startProgram(argv, env_add={'XDG_DATA_DIRS': xdg_data_dirs}, preexec_fn=wl_preexec) diff --git a/pyanaconda/gnome_remote_destop.py b/pyanaconda/gnome_remote_destop.py index 338ba85b1cf9..65b1864d500f 100644 --- a/pyanaconda/gnome_remote_destop.py +++ b/pyanaconda/gnome_remote_destop.py @@ -168,7 +168,7 @@ def _run_grdctl(self, argv): # extend the base argv by the caller provided arguments combined_argv = base_argv + argv # make sure HOME is set to /root or else settings might not be saved - execWithCapture("grdctl", combined_argv, env_prune=['HOME']) + execWithCapture("grdctl", combined_argv, env_add={"HOME": "/root"}) def _open_grd_log_file(self): # FIXME: redirect to journal ? @@ -187,7 +187,7 @@ def _start_grd_process(self): global grd_process grd_process = startProgram([GRD_BINARY_PATH, "--headless"], stdout=self._open_grd_log_file(), - env_prune=['HOME']) + env_add={"HOME": "/root"}) self.log.info("GNOME remote desktop is now running.") except OSError: stdoutLog.critical("Could not start GNOME remote desktop. Aborting.")