winapps-org / winapps-org/winapps
Fix for FreeRDP 3 syntax, paths with spaces, and libvirt system context
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 16k
- Forks
- 508
- Avg merge
- 13h 35m
- Merged PRs (30d)
- 3
Description
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_EXECUTABLEor"/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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the script code around lines 842 and 866 and the waCheckVMRunning entry point; review how the FreeRDP application arguments are assembled and how virsh selects its connection URI. Use the provided winapps.conf and log to reproduce FreeRDP 3 syntax, paths containing spaces, and qemu:///system behavior. Done means these cases work without requiring a manual environment-variable workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100