xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#2114 closed defect (fixed)

Small problem running xpra from mingw prompt with paramiko

Reported by: Nathan Hallquist Owned by: Nathan Hallquist
Priority: minor Milestone: 2.5
Component: client Version: 2.4.x
Keywords: Cc:

Description

When running XPRA from the MinGW prompt, which on windows is my development environment Paramiko fails on "_dailog" operations.

There seem to be two problems:

  • When None is passed into popen the underlying python chokes. To fix this I add an 'or ""'
  • Popen doesn't work on the xpra script text file, rather, only on the xpra.exe command. Windows doesn't seem to be fond of the '#!'. To fix this I have changed get_xpra_command to explicitly include the "python" invocation if the result doesn't end in ".exe".

With these changes things work for me. That said, I am not certain this is the right thing to do. I'll be verifying that this doesn't break Linux later today.

Antoine, can you look what I am proposing?

Attachments (2)

mingw.patch (2.5 KB) - added by Nathan Hallquist 6 months ago.
mingw2.patch (2.0 KB) - added by Nathan Hallquist 6 months ago.

Download all attachments as: .zip

Change History (8)

Changed 6 months ago by Nathan Hallquist

Attachment: mingw.patch added

comment:1 Changed 6 months ago by Antoine Martin

Owner: changed from Antoine Martin to Nathan Hallquist

What about the other changes in that patch (ignoring the whitespace ones): is the or "" needed?
We don't want to pollute default_do_get_xpra_command with win32 concerns, it should be possible to modify path.py in the platforms/win32 module instead.

comment:2 in reply to:  1 Changed 6 months ago by Nathan Hallquist

The white spaces were a mistake. The or "" is needed because it resolves the following error:

Traceback (most recent call last):
  File "C:/msys64/home/nathan/src/build/lib.mingw-2.7/xpra/net/ssh.py", line 83, in exec_dialog_subprocess
    proc = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, **kwargs)
  File "C:/msys64/mingw64/lib/python2.7/subprocess.py", line 326, in __init__
    errread, errwrite)
  File "C:/msys64/mingw64/lib/python2.7/subprocess.py", line 532, in _execute_child
    args = list2cmdline(args)
  File "C:/msys64/mingw64/lib/python2.7/list2cmdline.py", line 51, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'NoneType' is not iterable

Replying to Antoine Martin:

What about the other changes in that patch (ignoring the whitespace ones): is the or "" needed?
We don't want to pollute default_do_get_xpra_command with win32 concerns, it should be possible to modify path.py in the platforms/win32 module instead.

comment:3 Changed 6 months ago by Nathan Hallquist

Here's the current version of the patch. Seems to work, I've built and installer package that also worked. May I commit this?

Changed 6 months ago by Nathan Hallquist

Attachment: mingw2.patch added

comment:4 Changed 6 months ago by Antoine Martin

May I commit this?

Sure, looks good.

I'm not sure why the icon is not found (can you run Path_info.exe?) - but not going to worry about this for now, the patch fixes a real bug.

comment:5 Changed 6 months ago by Nathan Hallquist

Resolution: fixed
Status: newclosed

I believe I've fixed it in r21479. Forgot to put the ticket number in my svn log. Sorry about that, I'm not sure how to fix that, but I'll be careful going forward.

comment:6 Changed 6 months ago by Nathan Hallquist

Component: androidclient
Priority: majorminor
Note: See TracTickets for help on using tickets.