Skip to content

Fixes X2GO client path lookup for correct argument type#166

Closed
aschumann-virtualcable wants to merge 1 commit intov4.0from
dev/andres/v4.0-fix-x2go-path-tunnel
Closed

Fixes X2GO client path lookup for correct argument type#166
aschumann-virtualcable wants to merge 1 commit intov4.0from
dev/andres/v4.0-fix-x2go-path-tunnel

Conversation

@aschumann-virtualcable
Copy link
Copy Markdown
Contributor

This pull request makes a small but important fix to how the findApp function is called in the Windows X2GO tunnel script. Instead of passing a string for the search path, it now passes a list, which matches the expected input for the function. The script's signature file has also been updated accordingly.

  • Bug fix:

    • Changed the findApp call in tunnel.py to pass a list of paths instead of a single string, ensuring compatibility with the function's expected argument type.
  • Maintenance:

    • Updated the script signature in tunnel.py.signature to reflect the code change.
      [Copilot is generating a summary...]Ç

Explains:

Reason: The old findApp signature was:

def searchApplication(applicationName, extraPath=None):

searchPath = os.environ['PATH'].split(os.pathsep)

if extraPath is not None:
searchPath += list(extraPath)
list(extraPath) behavior:

list([x2goPath]) → [x2goPath] ✓ (integer path)
list(x2goPath) → ['C',':','\','P','r',...] ✗ (iterates string character by character)
That's why the script passes [x2goPath] — designed for the old signature.

New version in client/src/uds/tools.py:110:

def search_application(application_name: string, extra_path: writing.Optional[string] = None):
if extra_path:
searchPath.append(extra_path)
Takes string directly. Deployed client still uses old version → script must continue passing list for compatibility. Comment in client/src/uds/tools.py:278-279 confirms: aliases maintain compatibility with older scripts until version 3.x is no longer supported.

Changes the lookup for the X2GO client executable to pass a list of paths,
ensuring compatibility with the expected argument type and preventing runtime errors
if the path is not found. Updates signature to reflect the code adjustment.
@aschumann-virtualcable aschumann-virtualcable deleted the dev/andres/v4.0-fix-x2go-path-tunnel branch April 20, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants