xpra icon
Bug tracker and wiki

Opened 8 years ago

Closed 8 years ago

#260 closed defect (fixed)

Windows launcher TCP mode is broken

Reported by: ahuillet Owned by:
Priority: blocker Milestone: 0.9
Component: core Version: trunk
Keywords: Cc:

Description

Hello,

I can connect to Xpra sessions with the 0.8.4 Windows launcher in SSH mode without a problem, but TCP mode is broken. The launcher disappears for the moment, reappears with "command terminated OK" message.

Connecting to the same session using the Linux launcher and current SVN works fine.

The server on the other side is 0.8.1.
Help appreciated!

Attachments (4)

simplify-launch-code.patch (3.2 KB) - added by Antoine Martin 8 years ago.
use the standard codepath for launching with autoconnect (breaks ssh..)
simplify-launch-code-v2.patch (11.5 KB) - added by Antoine Martin 8 years ago.
better cleanup, ssh works but socket timeout does not :(
simplify-launch-code-v4.patch (29.3 KB) - added by Antoine Martin 8 years ago.
updated patch with cruft removed
simplify-launch-code-v5.patch (29.4 KB) - added by Antoine Martin 8 years ago.
updated patch fixing username option, can be specified in two ways: username@host or username field in gui (the former takes precedence)

Download all attachments as: .zip

Change History (16)

comment:1 Changed 8 years ago by Antoine Martin

I test TCP mode very regularly (more often than SSH mode), so this must really be one of the last few changes - can you try 0.8.2 to narrow it down further?

Also, is it broken if you use the command line version or just using the launcher?

Last edited 8 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 8 years ago by ahuillet

0.8.2 : launcher doesn't work in TCP mode, with a correct or incorrect password (haven't tried without any password).

Works with commandline version though.

comment:3 Changed 8 years ago by alas

It works ok in TCP mode without a password, on Windows 7 Pro, both with 0.8.2 and 0.8.4

comment:4 Changed 8 years ago by Antoine Martin

Does this patch fix the issue (applies both to trunk and v0.8.x branch):

--- src/xpra/scripts/client_launcher.py	(revision 2745)
+++ src/xpra/scripts/client_launcher.py	(working copy)
@@ -566,7 +566,7 @@
 		self.do_connect()
 
 	def do_connect(self):
-		if xpra_opts.mode=="tcp" and not sys.platform.startswith("win"):
+		if xpra_opts.mode=="tcp":
 			""" Use built-in connector (faster and gives feedback) - does not work on win32... (dunno why) """
 			self.connect_tcp()
 		else:

works or me(tm)

comment:5 Changed 8 years ago by ahuillet

Patch makes the launcher work OK for TCP sessions with password - but not with a config file when autoconnect=True!

Last edited 8 years ago by ahuillet (previous) (diff)

comment:6 Changed 8 years ago by ahuillet

Note that autoconnect=True doesn't work without the patch either.

So the patch does seem to fix part of the issue.

comment:7 Changed 8 years ago by Antoine Martin

OK, so I've committed the patch as r2754 + r2755 (for 0.8.x)

Now, on to figure out the auto-connect thing... (I really hope that was not the reason for the win32 workaround..)

Changed 8 years ago by Antoine Martin

Attachment: simplify-launch-code.patch added

use the standard codepath for launching with autoconnect (breaks ssh..)

Changed 8 years ago by Antoine Martin

better cleanup, ssh works but socket timeout does not :(

Changed 8 years ago by Antoine Martin

updated patch with cruft removed

comment:8 Changed 8 years ago by Antoine Martin

Please test the updated v4 patch against trunk, on win32 and also on other platforms just to be safe, also using config files for launching.

Changed 8 years ago by Antoine Martin

updated patch fixing username option, can be specified in two ways: username@host or username field in gui (the former takes precedence)

comment:9 Changed 8 years ago by ahuillet

With the patch nr. 5:

win32, TCP mode, config file, autoconnect = True : works
win32, TCP mode, config file, autoconnect = False : works
win32, TCP mode, details in GUI : works

Last edited 8 years ago by ahuillet (previous) (diff)

comment:10 Changed 8 years ago by Antoine Martin

Committed v6 (minor tweaks) in r2762 - please help with testing! (will then backport to v0.8.x)

What we want to test:

  • linux server (any - there are no server changes at all) with win32 clients (since that's where the bug was), but also:
  • linux server with old linux clients (ie: CentOS 5.x which has python2.4)
  • tcp mode from launcher (with and without password)
  • ssh mode from launcher
  • tcp and ssh modes via autoconnect

For those testing and unsure about what auto-connect is, one can create session files (and the launcher will eventually gain the ability to edit and save those files).
These files are associated with the xpra_launcher application via extension lookup / mime-types (except on osx) so double-clicking on them should fire up the launcher, and if the file has autoconnect = True then the launcher will connect automatically without first showing the GUI.
One can also do this by hand from the command line, which is better for debugging/testing, ie:

xpra_launcher /path/to/session1.xpra

Or on win32:

Xpra_Launcher.exe C:\path\to\session1.xpra

The extension for those files is .xpra and they should look something like this:

  • for TCP:
    mode = tcp
    host = 192.168.1.16
    port = 10000
    password = yoursessionpassword
    encoding = x264
    
  • for SSH:
    mode = ssh
    host = 192.168.1.16
    port = 10
    username = yourusername
    password = yoursshpassword
    encoding = x264
    

Notes:

  • The "port" is actually the display number in SSH mode.
  • using SSH mode with password authentication (--password-file option) is currently not supported: it should work, but really, why bother? As you already have strong authentication with SSH, and there is currently no way of specifying a different password for the session authentication.

comment:11 Changed 8 years ago by ahuillet

Confirmed working in 0.8.6rc : TCP mode both with and without config file as well as SSH mode without config file.

comment:12 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

backported to v0.8.x in r2764

Closing at last!

Note: See TracTickets for help on using tickets.