summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-08-06 19:08:59 +0000
committerMike Fulbright <msf@redhat.com>2003-08-06 19:08:59 +0000
commit31798ae251ee2c346616e6cb5a23fe706ef511b7 (patch)
treeeaa9b035c0aafcf71137e46483727ea44d9b8d62 /anaconda
parent89c6f6f6b10c157731e8aa6cd3ab390dc2388f5e (diff)
downloadanaconda-31798ae251ee2c346616e6cb5a23fe706ef511b7.tar.gz
anaconda-31798ae251ee2c346616e6cb5a23fe706ef511b7.tar.xz
anaconda-31798ae251ee2c346616e6cb5a23fe706ef511b7.zip
add product name and version to vnc desktop name, as well as some adjustments to args we pass to Xvnc for use with vnc package version 4.0.0
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda69
1 files changed, 42 insertions, 27 deletions
diff --git a/anaconda b/anaconda
index f5e436471..129088717 100755
--- a/anaconda
+++ b/anaconda
@@ -96,11 +96,46 @@ def startVNCServer(vncpassword=None, root='/'):
dup_log(_("Starting VNC..."))
+ # figure out host info
+ connxinfo = None
+ srvname = None
+ try:
+ import network
+
+ # try to load /tmp/netinfo and see if we can sniff out network info
+ netinfo = network.Network()
+ srvname = None
+ if netinfo.hostname != "localhost.localdomain":
+ srvname = "%s" % (netinfo.hostname,)
+ else:
+ for dev in netinfo.netdevices.keys():
+ try:
+ ip = netinfo.netdevices[dev].get("ipaddr")
+ except:
+ continue
+ if ip == '127.0.0.1':
+ continue
+ srvname = ip
+ break
+
+ if srvname is not None:
+ connxinfo = "%s:1" % (srvname,)
+
+ except:
+ log("Unable to determine VNC server network info")
+
+
+ # figure out product info
+ if srvname is not None:
+ desktopname = _("%s %s installation on host %s") % (product.productName, product.productVersion, srvname)
+ else:
+ desktopname = _("%s %s installation") % (product.productName, product.productVersion)
+
vncpid = os.fork()
if not vncpid:
args = [ root + "/usr/bin/Xvnc", ":1", "-nevershared",
- "-depth", "16", "-geometry", "800x600", "-dontdisconnect"]
+ "-depth", "16", "-geometry", "800x600", "DisconnectClients=false", "desktop=%s" % (desktopname,)]
# set passwd if necessary
if vncpassword is not None:
@@ -115,6 +150,9 @@ def startVNCServer(vncpassword=None, root='/'):
dup_log(_("Make sure your password is at least 6 characters in length."))
else:
args = args + ["-rfbauth", "/tmp/vncpasswd_file"]
+ else:
+ # needed if no password specified
+ args = args + ["SecurityTypes=None",]
tmplogFile = "/tmp/vncserver.log"
try:
@@ -136,32 +174,6 @@ def startVNCServer(vncpassword=None, root='/'):
dup_log(_("You can use the vncpassword=<password> boot option"))
dup_log(_("if you would like to secure the server.\n\n"))
- connxinfo = ''
- try:
- import network
-
- # try to load /tmp/netinfo and see if we can sniff out network info
- netinfo = network.Network()
- srvname = None
- if netinfo.hostname != "localhost.localdomain":
- srvname = "%s" % (netinfo.hostname,)
- else:
- for dev in netinfo.netdevices.keys():
- try:
- ip = netinfo.netdevices[dev].get("ipaddr")
- except:
- continue
- if ip == '127.0.0.1':
- continue
- srvname = ip
- break
-
- if srvname is not None:
- connxinfo = "%s:1" % (srvname,)
-
- except:
- log("Unable to determine VNC server network info")
-
dup_log(_("The VNC server now running."))
if connxinfo is not None:
dup_log(_("Please connect to %s to begin the install...") % (connxinfo,))
@@ -274,6 +286,9 @@ try:
except ImportError:
pass
+# pull this in to get product name and versioning
+import product
+
# do this early to keep our import footprint as small as possible
# Python passed my path as argv[0]!
# if sys.argv[0][-7:] == "syslogd":