summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-05-28 20:33:26 +0000
committerJeremy Katz <katzj@redhat.com>2004-05-28 20:33:26 +0000
commit60a3b5225fe09c4f44a05d145292b161f708417a (patch)
treea6dd8cf9134482167daf7c39ce7756a66e7358ee /anaconda
parent01c1abd3cc4b424fab4ec598a65a7b835fd32944 (diff)
downloadanaconda-60a3b5225fe09c4f44a05d145292b161f708417a.tar.gz
anaconda-60a3b5225fe09c4f44a05d145292b161f708417a.tar.xz
anaconda-60a3b5225fe09c4f44a05d145292b161f708417a.zip
* move vnc initialization a little bit later
* if we can't figure out how to start X and text mode hasn't been explicitly asked for, prompt for if the user would prefer to do a VNC installation
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda46
1 files changed, 30 insertions, 16 deletions
diff --git a/anaconda b/anaconda
index ef96cf3b4..2559e268f 100755
--- a/anaconda
+++ b/anaconda
@@ -429,6 +429,7 @@ progmode = 'install' # 'rescue', or 'install'
method = None # URL representation of install method
logFile = None # may be a file object or a file name
display_mode = None
+graphical_failed = 0
# should we ever try to probe for X stuff? this will give us a convenient
@@ -665,6 +666,7 @@ if (debug):
import isys
import instdata
import floppy
+import vnc
if not isHeadless:
import xsetup
@@ -877,21 +879,12 @@ else: # s390/iSeries checks
flags.usevnc):
dup_log("DISPLAY variable not set. Starting text mode!")
display_mode = 't'
+ graphical_failed = 1
time.sleep(2)
-# if they want us to use VNC do that now
-if display_mode == 'g' and flags.usevnc:
- # dont run vncpassword if in test mode
- if flags.test:
- vncpassword = None
-
- startVNCServer(vncpassword=vncpassword,
- vncconnecthost=vncconnecthost,
- vncconnectport=vncconnectport)
-
# 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 display_mode == 'g' and not os.environ.has_key('DISPLAY'):
+if display_mode == 'g' and not os.environ.has_key('DISPLAY') and not flags.usevnc:
import rhpl.monitor as monitor
# if no monitor probed lets guess based on runres
@@ -917,17 +910,37 @@ if display_mode == 'g' and not os.environ.has_key('DISPLAY'):
else:
xlogfile = None
- xsetup_failed = xserver.startXServer(videohw, monitorhw, mousehw, kbd,
- runres,
- xStartedCB=doStartupX11Actions,
- xQuitCB=doShutdownX11Actions,
- logfile=xlogfile)
+ xsetup_failed = xserver.startXServer(videohw, monitorhw, mousehw, kbd,
+ runres,
+ xStartedCB=doStartupX11Actions,
+ xQuitCB=doShutdownX11Actions,
+ logfile=xlogfile)
if xsetup_failed:
dup_log(" X startup failed, falling back to text mode")
display_mode = 't'
+ graphical_failed = 1
time.sleep(2)
+if display_mode == 't' and graphical_failed:
+ ret = vnc.askVncWindow()
+ if ret != -1:
+ display_mode = 'g'
+ flags.usevnc = 1
+ if ret is not None:
+ vncpassword = ret
+
+# if they want us to use VNC do that now
+if display_mode == 'g' and flags.usevnc:
+ # dont run vncpassword if in test mode
+ if flags.test:
+ vncpassword = None
+
+ startVNCServer(vncpassword=vncpassword,
+ vncconnecthost=vncconnecthost,
+ vncconnectport=vncconnectport)
+
+
#
# read in anaconda configuration file
#
@@ -969,6 +982,7 @@ if (display_mode == 'g'):
from gui import InstallInterface
except Exception, e:
+ log("Exception starting GUI installer: %s" %(e,))
# if we're not going to really go into GUI mode, we need to get
# back to vc1 where the text install is going to pop up.
if not x_already_set: