[Python-apps-team] Bug#638355: xpra: Patch to allow a chain of SSH hosts
Ph. Marek
philipp.marek at linbit.com
Thu Aug 18 19:53:11 UTC 2011
Package: xpra
Version: 0.0.6+dfsg-1+b1
Severity: wishlist
Tags: patch experimental
Here's a patch that allows specification of multiple SSH hosts to tunnel
through.
Example call:
xpra attach ssh:user1 at host1:user2 at host2:0
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xpra depends on:
ii libc6 2.13-10 Embedded GNU C Library: Shared lib
ii libx11-6 2:1.4.4-1 X11 client-side library
ii python 2.6.7-2 interactive high-level object-orie
ii python-gtk2 2.24.0-2 Python bindings for the GTK+ widge
ii python-wimpi 0.0.6+dfsg-1+b1 library for writing window manager
ii x11-xserver- 7.6+3 X server utilities
ii xvfb 2:1.10.99.901+git20110731-1 Virtual Framebuffer 'fake' X serve
xpra recommends no packages.
Versions of packages xpra suggests:
ii openssh-client 1:5.8p1-7 secure shell (SSH) client, for sec
ii openssh-server 1:5.8p1-7 secure shell (SSH) server, for sec
-- no debconf information
-------------- next part --------------
--- main.py 2009-03-22 10:44:03.000000000 +0100
+++ main.py-new 2011-08-18 21:50:45.376577909 +0200
@@ -116,7 +116,8 @@
if display_name.startswith("ssh:"):
sshspec = display_name[len("ssh:"):]
if ":" in sshspec:
- (host, display) = sshspec.split(":", 1)
+ hosts = sshspec.split(":")
+ display = hosts.pop()
display_args = [":" + display]
else:
host = sshspec
@@ -127,7 +128,7 @@
else:
remote_xpra = ["$HOME/.xpra/run-xpra"]
- p = subprocess.Popen(["ssh", host, "-e", "none"]
+ p = subprocess.Popen((reduce(lambda x,y: x+y, [["ssh", h, "-e", "none"] for h in hosts]))
+ remote_xpra + ["_proxy"] + display_args,
stdin=b.fileno(), stdout=b.fileno(),
bufsize=0)
More information about the Python-apps-team
mailing list