From f57e608a6927440b16402377f800d260b9c73dac Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Sat, 10 Dec 2022 22:13:01 +0100 Subject: [PATCH] automatically start x11 if "dovnc" option is given (#310) VNC does not make much sense if X11 isn't running. Automatically starting X11 on dovnc was done before SystemRescue 9.00, but this logic seems to have been lost in the option handling code refactoring. --- airootfs/etc/systemd/scripts/sysrescue-initialize-whilenet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airootfs/etc/systemd/scripts/sysrescue-initialize-whilenet b/airootfs/etc/systemd/scripts/sysrescue-initialize-whilenet index 8448442..10f4a03 100755 --- a/airootfs/etc/systemd/scripts/sysrescue-initialize-whilenet +++ b/airootfs/etc/systemd/scripts/sysrescue-initialize-whilenet @@ -162,7 +162,7 @@ if rootcryptpass != "": errcnt+=1 # Auto-start the graphical environment (tty1 only) -if dostartx == True: +if dostartx == True or dovnc == True: str = '[[ ! $DISPLAY ]] && [[ ! $SSH_TTY ]] && [[ $XDG_VTNR == 1 ]] && startx' if (os.path.exists("/root/.bash_profile") == False) or (open("/root/.bash_profile", 'r').read().find(str) == -1): file1 = open("/root/.bash_profile", "a")