Skip to content

Fix for FreeRDP 3 syntax, paths with spaces, and libvirt system context #948

Description

@Edgar-muci

What happened?

A bug happened!

Bug Report: FreeRDP 3 compatibility, Path Spaces, and Libvirt System URI Crash

I successfully managed to fix three major bugs when running WinApps on a modern Rolling Release distribution (CachyOS/Arch Linux) utilizing FreeRDP 3 and GNOME.

1. FreeRDP 3 syntax error & Obsolete Arguments

FreeRDP 3 completely rejects the legacy || app syntax (/app:"||cmd"). Furthermore, sub-arguments like ,hidef:, ,icon:, and ,name: cause the command parser to fail instantly.

  • Fix (Line 842 & 866): Simplified the argument to just use /app:program:$WIN_EXECUTABLE or "/app:program:$WIN_EXECUTABLE".

2. Broken Paths with Spaces (e.g., Microsoft Edge)

When launching an application with spaces in its path (like Edge or portable apps), the script crashes because the inner variables inside /app:program:"$WIN_EXECUTABLE" break the command into pieces.

  • Fix: Enclose the entire argument expression in outer double quotes:
    "/app:program:$WIN_EXECUTABLE"

3. Libvirt User vs. System Context Blindspot

By default, the virsh checks inside waCheckVMRunning target qemu:///session (User context). If the Windows VM is installed under the System context (qemu:///system), the script throws an Error 10 (VM Nonexistent) and exits.

  • Fix: Users can circumvent this by exporting the global environment variable:
    export VIRSH_DEFAULT_CONNECT_URI="qemu:///system"
    (Suggesting adding native support or documentation for checking the system URI context).D

Your FreeRDP version and where you got it from

FreeRDP 3.x (Installed via official CachyOS repositories)

Your Linux distribution and version

CachyOS (Arch Linux-based, Rolling Release)

Your winapps.conf

WAFLAVOR="libvirt"
VM_NAME="RDPWindows"
LIBVIRT_URI="qemu:///system"
RDP_USER="RDPWindows"
RDP_PASS="XXXXXX"
RDP_IP="192.168.122.15"
RDP_PORT="3389"
RDP_SCALE="100"
RDP_FLAGS="/cert:tofu /sound /microphone +home-drive"
export VIRSH_DEFAULT_CONNECT_URI="qemu:///system"

Logs

+ waCheckVMRunning
+ virsh list --all --name
+ grep -Fxq -- RDPWindows
+ EXIT_STATUS=10
+ '[' 10 -ne 0 ']'
+ waThrowExit 10
+ dprint 'ERROR: WINDOWS NONEXISTENT. EXITING.'
+ exit 10

Terms

  • I am running the latest version.
  • To the best of my knowledge, this is a bug and not a setup nor a FreeRDP problem.
  • I have checked for duplicate issues.
  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiCreated using assistance of LLMstriageFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions