[virt-manager PATCH 4/4] sshtunnels: use <listen> element to get UNIX socket for graphics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Graphics devices has a new XML element to configure UNIX socket path:

  <graphics type='vnc' socket='/path/to/socket'>
    <listen type='socket' socket='/path/to/socket'/>
  </graphics>

  <graphics type='spice'>
    <listen type='socket' socket='/path/to/socket'/>
  </graphics>

and as you can see SPICE uses only the new XML element.  For VNC the
old 'socket' attribute is for backward compatibility.

In order to connect to SPICE graphics on remote host using SSH tunnel
we need to get the UNIX socket path from <listen> element.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1441127

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 virtManager/sshtunnels.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
index 12390a32..7f825b86 100644
--- a/virtManager/sshtunnels.py
+++ b/virtManager/sshtunnels.py
@@ -35,7 +35,7 @@ class ConnectionInfo(object):
     def __init__(self, conn, gdev):
         self.gtype = gdev.type
         self.gport = gdev.port and str(gdev.port) or None
-        self.gsocket = gdev.socket
+        self.gsocket = (gdev.listens and gdev.listens[0].socket) or gdev.socket
         self.gaddr = gdev.listen or "127.0.0.1"
         self.gtlsport = gdev.tlsPort or None
         self.glistentype = gdev.get_first_listen_type()
-- 
2.13.5

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux