xpra icon
Bug tracker and wiki

Opened 5 years ago

Closed 5 years ago

#739 closed defect (fixed)

xpra launcher does not handle autoconnect properly

Reported by: Lukas Haase Owned by: Antoine Martin
Priority: major Milestone:
Component: client Version: trunk
Keywords: Cc: lukashaase@…

Description

xpra launcher seems to handle "autoconnect" improperly.

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

autoconnect=True

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

Attachments (4)

example.zip (12.5 KB) - added by Lukas Haase 5 years ago.
example xpra file
launcher-screenshot.png (17.1 KB) - added by Antoine Martin 5 years ago.
extracted the screenshot
line-endings.png (5.4 KB) - added by Antoine Martin 5 years ago.
what ms windows sees in this launch file
line-endings2.png (22.0 KB) - added by Lukas Haase 5 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 5 years ago by Lukas Haase

Cc: lukashaase@… added

comment:2 Changed 5 years ago by Antoine Martin

Owner: changed from Antoine Martin to Lukas Haase

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.

Changed 5 years ago by Lukas Haase

Attachment: example.zip added

example xpra file

comment:3 Changed 5 years ago by 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.

Changed 5 years ago by Antoine Martin

Attachment: launcher-screenshot.png added

extracted the screenshot

comment:4 Changed 5 years ago by Antoine Martin

Owner: changed from Lukas Haase to Antoine Martin
Status: newassigned

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

  • screenshot: extracted the screenshot
  • launch file contents:
    username=cad
    encoding=rgb
    ssh_port=22
    speed=0
    min-speed=0
    host=virtuoso
    min-quality=30
    mode=ssh
    password=
    quality=0
    port=1984
    autoconnect=True
    

Changed 5 years ago by Antoine Martin

Attachment: line-endings.png added

what ms windows sees in this launch file

comment:5 Changed 5 years ago by 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.

Changed 5 years ago by Lukas Haase

Attachment: line-endings2.png added

comment:6 Changed 5 years ago by 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.

comment:7 Changed 5 years ago by 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'}

comment:8 Changed 5 years ago by 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

comment:9 Changed 5 years ago by 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.

comment:10 Changed 5 years ago by 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).

comment:11 Changed 5 years ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

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.

Note: See TracTickets for help on using tickets.