[master/rhel7/f21] Start vncconfig for cutNpaste
Mark Hamzy
hamzy at us.ibm.com
Mon Oct 6 15:12:01 UTC 2014
Another reason to start vncconfig in a vnc session is to support cut & paste.
---
pyanaconda/vnc.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index a7e2072..a9ba148 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -177,6 +177,21 @@ class VncServer:
maxTries), maxTries)
return False
+ def startVncConfig(self):
+ """Attempt to start vncconfig"""
+
+ self.log.info(_("Attempting to start vncconfig"))
+
+ vncconfigcommand = [self.root+"/usr/bin/vncconfig", "-display", ":%s"%self.display]
+
+ try:
+ vncconfigp = subprocess.Popen(vncconfigcommand, stdout=self.openlogfile(), stderr=subprocess.STDOUT)
+
+ return True
+ except OSError:
+ self.log.info(_("Could not start vncconfig: %s", e))
+ return False
+
def VNCListen(self):
"""Put the server in listening mode.
@@ -247,6 +262,7 @@ class VncServer:
sys.exit(1)
# Lets try to configure the vnc server to whatever the user specified
+ connected = False
if self.vncconnecthost != "":
connected = self.connectToView()
if not connected:
@@ -256,6 +272,9 @@ class VncServer:
os.environ["DISPLAY"]=":%s" % self.display
+ if not connected:
+ self.startVncConfig()
+
def changeVNCPasswdWindow(self):
""" Change the password to a sane parameter.
--
2.1.0
More information about the anaconda-patches
mailing list