summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-08-07 22:03:05 +0000
committerMike Fulbright <msf@redhat.com>2003-08-07 22:03:05 +0000
commit8cf3997fb7de47a9d667f5387d177cbebeea3301 (patch)
treee875d76ef6e4891531214266e67db7414e3bb2de /anaconda
parentb5a4ced05c841421383b31e95a9ed62cdbd9e93b (diff)
downloadanaconda-8cf3997fb7de47a9d667f5387d177cbebeea3301.tar.gz
anaconda-8cf3997fb7de47a9d667f5387d177cbebeea3301.tar.xz
anaconda-8cf3997fb7de47a9d667f5387d177cbebeea3301.zip
add vncconnecthost=<host> and vncconnectport=<port>. First you setup your vnc client in listen mode. Then anaconda will connect its vnc server to the client automatically once it starts up.
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda41
1 files changed, 34 insertions, 7 deletions
diff --git a/anaconda b/anaconda
index f91d3ae0e..419e2ceaa 100755
--- a/anaconda
+++ b/anaconda
@@ -56,7 +56,8 @@ def startMiniWM(root='/'):
return childpid
# startup vnc X server
-def startVNCServer(vncpassword=None, root='/'):
+def startVNCServer(vncpassword=None, root='/', vncconnecthost=None,
+ vncconnectport=None):
def set_vnc_password(root, passwd, passwd_file):
(pid, fd) = os.forkpty()
@@ -175,10 +176,27 @@ def startVNCServer(vncpassword=None, root='/'):
dup_log(_("if you would like to secure the server.\n\n"))
dup_log(_("The VNC server now running."))
- if connxinfo is not None:
- dup_log(_("Please connect to %s to begin the install...") % (connxinfo,))
+
+ if vncconnecthost is not None:
+ dup_log(_("Attempting to connect to vnc client on host %s...") % (vncconnecthost,))
+
+ if connxinfo is not None:
+ dup_log(_("If for some reason this fails, please manually connect your vnc client to %s to begin the install.") % (connxinfo,))
+ else:
+ dup_log(_("If for some reason this fails, please manually connect your vnc client to begin the install."))
+
+ hostarg = vncconnecthost
+ if vncconnectport is not None:
+ hostarg = hostarg + ":" + vncconnectport
+
+ argv = ["/usr/bin/vncconfig", "-display", ":1", "-connect", hostarg]
+ iutil.execWithRedirect(argv[0], argv)
+
else:
- dup_log(_("Please connect to begin the install...") % (connxinfo,))
+ if connxinfo is not None:
+ dup_log(_("Please connect to %s to begin the install...") % (connxinfo,))
+ else:
+ dup_log(_("Please connect to begin the install..."))
os.environ["DISPLAY"]=":1"
doStartupX11Actions()
@@ -353,8 +371,9 @@ try:
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
'lang=', 'keymap=', 'kbdtype=', 'module=', 'class=',
'expert', 'serial', 'lowres', 'nofb', 'rescue', 'nomount',
- 'autostep', 'resolution=', 'skipddc', 'vnc', 'cmdline',
- 'headless'])
+ 'autostep', 'resolution=', 'skipddc',
+ 'vnc', 'vncconnecthost=', 'vncconnectport=',
+ 'cmdline', 'headless'])
except TypeError, msg:
sys.stderr.write("Error %s\n:" % msg)
sys.exit(-1)
@@ -419,6 +438,8 @@ customClass = None
kbd = None
ksfile = None
vncpassword = None
+vncconnecthost = None
+vncconnectport = None
#
# parse off command line arguments
@@ -513,6 +534,10 @@ for n in args:
buttons = (_("OK"),))
screen.finish()
sys.exit(0)
+ elif (str == '--vncconnecthost'):
+ vncconnecthost = arg
+ elif (str == '--vncconnectport'):
+ vncconnectport = arg
#
# must specify install, rescue mode
@@ -799,7 +824,9 @@ if display_mode == 'g' and flags.usevnc:
if flags.test:
vncpassword = None
- startVNCServer(vncpassword=vncpassword)
+ startVNCServer(vncpassword=vncpassword,
+ vncconnecthost=vncconnecthost,
+ vncconnectport=vncconnectport)
if display_mode == 'g' and not os.environ.has_key('DISPLAY'):
import rhpl.monitor as monitor