xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #17: xpra-multi-hosts.patch

File xpra-multi-hosts.patch, 998 bytes (added by Antoine Martin, 10 years ago)
  • main.py

    old new  
    176176            }
    177177        sshspec = display_name[len("ssh:"):]
    178178        if ":" in sshspec:
    179             (desc["host"], desc["display"]) = sshspec.split(":", 1)
    180             desc["display"] = ":" + desc["display"]
     179            hosts = sshspec.split(":")
     180            desc["display"] = ":" + hosts.pop()
     181            desc["host"] = hosts
    181182            desc["display_as_args"] = [desc["display"]]
    182183        else:
    183184            desc["host"] = sshspec
    184185            desc["display"] = None
    185186            desc["display_as_args"] = []
    186187        desc["ssh"] = opts.ssh.split()
    187         desc["full_ssh"] = desc["ssh"] + ["-T", desc["host"]]
     188        desc["full_ssh"] = reduce(lambda x,y: x+y, [desc["ssh"] + ["-T", h] for h in desc["host"]])
    188189        desc["remote_xpra"] = opts.remote_xpra.split()
    189190        desc["full_remote_xpra"] = desc["full_ssh"] + desc["remote_xpra"]
    190191        return desc