[rhel7] Start vncconfig for cut/paste

David Shea dshea at redhat.com
Thu Jun 4 21:28:23 UTC 2015


From: Mark Hamzy <hamzy at us.ibm.com>

(cherry picked from commit 9a9aab028fcd77370d7624819b9623e949073615)

Resolves: rhbz#1169991
---
 pyanaconda/vnc.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index c31006b..2626786 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -180,6 +180,16 @@ 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", "-nowin", "-display", ":%s" % constants.X_DISPLAY_NUMBER]
+
+        # Use startProgram to run vncconfig in the background
+        iutil.startProgram(vncconfigcommand, stdout=self.openlogfile(), stderr=subprocess.STDOUT)
+
     def VNCListen(self):
         """Put the server in listening mode.
 
@@ -257,6 +267,9 @@ class VncServer:
         else:
             self.VNCListen()
 
+        # Start vncconfig for copy/paste
+        self.startVncConfig()
+
     def changeVNCPasswdWindow(self):
         """ Change the password to a sane parameter.
 
-- 
2.1.0



More information about the anaconda-patches mailing list