Xpra: Ticket #739: xpra launcher does not handle autoconnect properly

xpra launcher seems to handle "autoconnect" improperly.

I create an *.xpra file with the launcher and add


When I double-click it, I get the error "argument of type 'int' is not iterable" (instead of auto connecting).

It does not matter where in the file I place the autoconnect line.

I also tried "1", "true" instead of "True", no change.

Windows client is "Xpra 0.14.11", Rev 8096

Thu, 20 Nov 2014 20:15:28 GMT - Lukas Haase: cc set

Fri, 21 Nov 2014 22:29:08 GMT - Antoine Martin: owner changed

I've just tried it and it worked fine, it is also part of the release tests so I would expect to have spotted this problem before. Can you post your sample file?

I think there may be another problem with it, causing the parsing error and preventing it from getting to the autoconnect.

Fri, 21 Nov 2014 22:58:42 GMT - Lukas Haase: attachment set

example xpra file

Fri, 21 Nov 2014 23:00:01 GMT - Lukas Haase:

See attached. It also contains a screenshot what happens after I double click it.

I observe that there are also weird line endings but they don't seem to matter for the other options.

Fri, 21 Nov 2014 23:35:15 GMT - Antoine Martin: attachment set

extracted the screenshot

Fri, 21 Nov 2014 23:35:42 GMT - Antoine Martin: owner, status changed

Inlining file contents to make it easier to parse this ticket:

Fri, 21 Nov 2014 23:41:16 GMT - Antoine Martin: attachment set

what ms windows sees in this launch file

Fri, 21 Nov 2014 23:41:32 GMT - Antoine Martin:

I believe it's the line endings in that file that confused the file parser: what ms windows sees in this launch file

We can try to be more clever about this.

Fri, 21 Nov 2014 23:49:20 GMT - Lukas Haase: attachment set

Fri, 21 Nov 2014 23:51:30 GMT - Lukas Haase:

The reason why I did not use inline is that I was exactly confused about the line endings (as mentioned initially).

However, I tried different line endings and nothing helps.

See here for example with fixed endings:

Everythings is read properly except for the autoconnect.

I can also convert to UNIX only (LF), same story.

Also, adding the empty lines again does not help.

Sat, 22 Nov 2014 02:19:58 GMT - Antoine Martin:

I've added a simple test for the file parsing code in r8142. It works fine on Linux:

$ ./tests/xpra/scripts/test_config.py /home/antoine/test.xpra
   1 loaded              : username=cad
   2 empty line
   3 loaded              : encoding=rgb
   4 empty line
   5 loaded              : ssh_port=22
   6 empty line
   7 loaded              : speed=0
   8 empty line
   9 loaded              : min-speed=0
  10 empty line
  11 loaded              : host=virtuoso
  12 empty line
  13 loaded              : min-quality=30
  14 empty line
  15 loaded              : mode=ssh
  16 empty line
  17 loaded              : password=
  18 empty line
  19 loaded              : quality=0
  20 empty line
  21 loaded              : port=1984
  22 empty line
  23 loaded              : autoconnect=True
loaded 12 lines
loaded 12 aggregated lines
assigned (new): username='cad'
assigned (new): encoding='rgb'
assigned (new): ssh_port='22'
assigned (new): speed='0'
assigned (new): min-speed='0'
assigned (new): host='virtuoso'
assigned (new): min-quality='30'
assigned (new): mode='ssh'
assigned (new): password=''
assigned (new): quality='0'
assigned (new): port='1984'
assigned (new): autoconnect='True'
read_config(/home/antoine/test.xpra)={'username': 'cad', 'autoconnect': 'True', \
    'encoding': 'rgb', 'ssh_port': '22', 'quality': '0', 'min-quality': '30', 'host': \
    'virtuoso', 'min-speed': '0', 'mode': 'ssh', 'password': '', 'speed': '0', 'port': '1984'}

Mon, 24 Nov 2014 21:26:07 GMT - Antoine Martin:

Something very odd is going on: if I call the launcher with the file as argument, then it works fine, but if I double click then I get the bug! Double clicking is supposed to do the same thing:

Root: HKCR; Subkey: "Xpra.Session\shell\open\command"; ValueType: string; ValueName: ""; \
    ValueData: """{app}\Xpra-Launcher.exe"" ""%1"""; Flags: uninsdeletekey

Mon, 24 Nov 2014 23:29:11 GMT - Antoine Martin:

With r8151, I was able to narrow it down.

r8152 fixes this, and will be backported for the next stable update. Thanks for the bug report.

You can find a beta build with this fix here: http://xpra.org/beta.

Mon, 24 Nov 2014 23:36:09 GMT - Lukas Haase:

Great, thanks! I'll wait and hope for the backport. I tried 0.15 recently and it does not really work :-( So I am back to 0.14. (Unfortunately the problems are again subtle and difficult to describe (e.g., windows are "greyed" out after switching windows) but I'll create a separate bug report for this).

Thu, 04 Dec 2014 17:25:04 GMT - Antoine Martin: status changed; resolution set

The backport to v0.14 is in r8170.

Closing as I am confident this is fixed, feel free to re-open if the next stable update does not fix this for you.

Sat, 23 Jan 2021 05:04:33 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/739