[master 1/2] Introduce flags.preexisting_x11.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This way one can always determine whether it was us or somebody else who
started the X server and so whether the X11 is forwarded or if we run the
standard graphical installation.
---
 anaconda |    6 ++++--
 flags.py |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index f781cd6..33607af 100755
--- a/anaconda
+++ b/anaconda
@@ -1044,6 +1044,8 @@ if __name__ == "__main__":
     if iutil.memInstalled() < isys.MIN_GUI_RAM:
         flags.vncquestion = False
 
+    if os.environ.has_key('DISPLAY'):
+        flags.preexisting_x11 = True
 
     if anaconda.displayMode == 't' and flags.vncquestion: #we prefer vnc over text mode, so ask about that
         title = _("Would you like to use VNC?")
@@ -1080,7 +1082,7 @@ if __name__ == "__main__":
 
     # s390/iSeries checks
     if anaconda.isHeadless and anaconda.displayMode == "g" and not \
-       (os.environ.has_key("DISPLAY") or flags.usevnc):
+       (flags.preexisting_x11 or flags.usevnc):
         stdoutLog.warning(_("DISPLAY variable not set. Starting text mode."))
         anaconda.displayMode = 't'
         graphical_failed = 1
@@ -1088,7 +1090,7 @@ if __name__ == "__main__":
 
     # if DISPLAY not set either vnc server failed to start or we're not
     # running on a redirected X display, so start local X server
-    if anaconda.displayMode == 'g' and not os.environ.has_key('DISPLAY') and not flags.usevnc:
+    if anaconda.displayMode == 'g' and not flags.preexisting_x11 and not flags.usevnc:
         try:
             # The following code depends on no SIGCHLD being delivered, possibly
             # only except the one from a failing X.org. Thus make sure before
diff --git a/flags.py b/flags.py
index e5e08aa..af6216c 100644
--- a/flags.py
+++ b/flags.py
@@ -92,6 +92,7 @@ class Flags:
         self.__dict__['flags']['useIPv4'] = True
         self.__dict__['flags']['useIPv6'] = True
         self.__dict__['flags']['sshd'] = 0
+        self.__dict__['flags']['preexisting_x11'] = False
         # for non-physical consoles like some ppc and sgi altix,
         # we need to preserve the console device and not try to
         # do things like bogl on them.  this preserves what that
-- 
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux