winapps icon indicating copy to clipboard operation
winapps copied to clipboard

Issue with Flake; winapps-setup cannot invoke xfreerdp

Open FXWood350 opened this issue 3 months ago • 3 comments

What happened?

Attempted to run winapps-setup from the flake with varyingly

FREERDP_COMMAND=""
FREERDP_COMMAND="xfreerdp" #indeed what the command is, tested connecting to the machine as detailed in the installation guide, worked all right
FREERDP_COMMAND="/run/current-system/sw/bin/xfreerdp" #output of which xfreerdp. probably not very smart and gives away my ineptitude at linux.

in winapps.conf, and having Exported the path to xfreerdp in that same bash instance (was already in $PATH anyway but can't be too careful). In all instances was met with

Attempting to establish a Remote Desktop connection with Windows... Failed!

ERROR: REMOTE DESKTOP PROTOCOL FAILURE.
FreeRDP failed to establish a connection with Windows.

With logfile: Error: fork/exec /run/current-system/sw/bin/xfreerdp: no such file or directory

or Error: exec: "xfreerdp": executable file not found in $PATH (I'm mostly certain it is, and I made sure to have freerdp in system packages not home). Running exec xfreerdp in exact same terminal works fine. Using Podman if it helps. Apologies for any inconvenience caused by any glaringly obvious things I ought to have tried first. (Maybe requires unstable channel?)

Your FreeRDP version and where you got it from

FreeRDP 3.15.0

Your Linux distribution and version

NixOS, 25.05, Stable channel

Your winapps.conf

RDP_USER="MyWindowsUser"
RDP_PASS="...."

RDP_DOMAIN=""

RDP_ID="127.0.0.1"

WAFLAVOR="podman"


# Can be 100, 140,180
RDP_SCALE="100"

# Remove /network:lan if issues occur.
# https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
RDP_FLAGS="/cert:tofu /sound /microphone +home-drive"


# [DEBUG WINAPPS]
# NOTES:
# - Creates and appends to ~/.local/share/winapps/winapps.log when running WinApps.
# DEFAULT VALUE: 'true'
# VALID VALUES:
# - 'true'
# - 'false'
DEBUG="true"

# [AUTOMATICALLY PAUSE WINDOWS]
# NOTES:
# - This is currently INCOMPATIBLE with 'manual'.
# DEFAULT VALUE: 'off'
# VALID VALUES:
# - 'on'
# - 'off'
AUTOPAUSE="off"

# [AUTOMATICALLY PAUSE WINDOWS TIMEOUT]
# NOTES:
# - This setting determines the duration of inactivity to tolerate before Windows is automatically paused.
# - This setting is ignored if 'AUTOPAUSE' is set to 'off'.
# - The value must be specified in seconds (to the nearest 10 seconds e.g., '30', '40', '50', etc.).
# - For RemoteApp RDP sessions, there is a mandatory 20-second delay, so the minimum value that can be specified here is '20'.
# - Source: https://techcommunity.microsoft.com/t5/security-compliance-and-identity/terminal-services-remoteapp-8482-session-termination-logic/ba-p/246566
# DEFAULT VALUE: '300'
# VALID VALUES: >=20
AUTOPAUSE_TIME="300"

# [FREERDP COMMAND]
# NOTES:
# - WinApps will attempt to automatically detect the correct command to use for your system.
# DEFAULT VALUE: '' (BLANK)
# VALID VALUES: The command required to run FreeRDPv3 on your system (e.g., 'xfreerdp', 'xfreerdp3', etc.).
FREERDP_COMMAND="xfreerdp"

# [TIMEOUTS]
# NOTES:
# - These settings control various timeout durations within the WinApps setup.
# - Increasing the timeouts is only necessary if the corresponding errors occur.
# - Ensure you have followed all the Troubleshooting Tips in the error message first.

# PORT CHECK
# - The maximum time (in seconds) to wait when checking if the RDP port on Windows is open.
# - Corresponding error: "NETWORK CONFIGURATION ERROR" (exit status 13).
# DEFAULT VALUE: '5'
PORT_TIMEOUT="5"

# RDP CONNECTION TEST
# - The maximum time (in seconds) to wait when testing the initial RDP connection to Windows.
# - Corresponding error: "REMOTE DESKTOP PROTOCOL FAILURE" (exit status 14).
# DEFAULT VALUE: '30'
RDP_TIMEOUT="100"

# APPLICATION SCAN
# - The maximum time (in seconds) to wait for the script that scans for installed applications on Windows to complete.
# - Corresponding error: "APPLICATION QUERY FAILURE" (exit status 15).
# DEFAULT VALUE: '60'
APP_SCAN_TIMEOUT="60"

# WINDOWS BOOT
# - The maximum time (in seconds) to wait for the Windows VM to boot if it is not running, before attempting to launch an application.
# DEFAULT VALUE: '120'
BOOT_TIMEOUT="120"

Logs

Attempting to establish a Remote Desktop connection with Windows... Failed!

ERROR: REMOTE DESKTOP PROTOCOL FAILURE.
FreeRDP failed to establish a connection with Windows.
--------------------------------------------------------------------------------
Please view the log at /home/d-wood/.local/share/winapps/FreeRDP_Test_20250903_2125_486485676.log.
Troubleshooting Tips:
  - Ensure the user is logged out of Windows prior to initiating the WinApps installation.
  - Ensure the credentials within the WinApps configuration file are correct.
  - Utilise a new certificate by removing relevant certificate(s) in /home/d-wood/.config/freerdp/server.
  - Try increasing the RDP_TIMEOUT in /home/d-wood/.config/winapps/winapps.conf.
  - If using 'libvirt', ensure the Windows VM is correctly named as specified within the README.
  - If using 'libvirt', ensure 'Remote Desktop' is enabled within the Windows VM.
  - If using 'libvirt', ensure you have merged 'RDPApps.reg' into the Windows VM's registry.
  - If using 'libvirt', try logging into and back out of the Windows VM within 'virt-manager' prior to initiating the WinApps installation.
--------------------------------------------------------------------------------
Exiting with status '14'.


Logfile:

Error: exec: "xfreerdp": executable file not found in $PATH

Terms

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

FXWood350 avatar Sep 03 '25 20:09 FXWood350

can confirm i'm having the same issue.

if i issue a xfreerdp command manually i am able to log into the container without issues.

fuma-afk avatar Sep 04 '25 06:09 fuma-afk

What happens if you set the FREERDP_COMMAND to xfreerdp3?

oskardotglobal avatar Sep 04 '25 09:09 oskardotglobal

well i tried putting there xfreerdp3 and also i tried to installing manually as a package xfreerdp and it just wouldn't work

fuma-afk avatar Sep 04 '25 12:09 fuma-afk

update: i don't know how but after fiddling with parameters and manually reinstallin xfreerdp, setting xfreerdp in the command and adding this "+home-drive /f" to the RDP_FLAGS i was finally able to run the installer again and set up the applications from scratch and make it work.

it's strange because it was working before and it suddenly stopped without me touching anything, go figures.

fuma-afk avatar Sep 09 '25 07:09 fuma-afk

when you say manually reinstalling do you mean removing it from environment.systemPackages, rebuild switching, adding it back in and then rebuild switching again, or reinstalling through flatpak, or something else?

FXWood350 avatar Sep 09 '25 08:09 FXWood350

Hi, i meant from systemPackages.

I also cleared the certificate folder, but this was prior to the reinstall and it didnt fix the issue.

Il mar 9 set 2025, 10:19 FXWood350 @.***> ha scritto:

FXWood350 left a comment (winapps-org/winapps#706) https://github.com/winapps-org/winapps/issues/706#issuecomment-3269472572

when you say manually reinstalling do you mean removing it from environment.systemPackages, rebuild switching, adding it back in and then rebuild switching again, or reinstalling through flatpak, or something else?

— Reply to this email directly, view it on GitHub https://github.com/winapps-org/winapps/issues/706#issuecomment-3269472572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHD3MG3JJCDE3MS2X7J3E33R2ERTAVCNFSM6AAAAACFRZQ2F6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENRZGQ3TENJXGI . You are receiving this because you commented.Message ID: @.***>

fuma-afk avatar Sep 09 '25 08:09 fuma-afk

I have been having similar issues, and doing a reinstall of xfreerdp3 seems to also solve the issue. I have tried to uninstall xfreerdp3 and then installing the flatpak version, but this does not solve the problem. But then after reinstalling xfreerdp3 the Winapps installer proceeds as normal.

iwan1510 avatar Sep 11 '25 10:09 iwan1510

For NixOS users , set freerdp command to the absolute path:

FREERDP_COMMAND="$(readlink $(which xfreerdp))"

https://github.com/winapps-org/winapps/issues/251#issuecomment-3287389469

ttimasdf avatar Sep 13 '25 03:09 ttimasdf

I have also noticed somehow the experience became a lot worse... now i can successfully launch stuff but when i use for example excel (which is the main reason for me using winapps basically) every submenu or popup becomes fullscreen somehow.

Now i'm on hyprland and i'm aware of what is happening, basically any sub-window process is recognized as a new window and the WM does it's thing. However i am sure this wasn't a thing in the not so far past... i mean this happens even if i write a formula, on the dropdown menu that gives the suggestions for which one to pick. Pretty sure i would have noticed before.

fuma-afk avatar Sep 16 '25 13:09 fuma-afk

For NixOS users , set freerdp command to the absolute path:

FREERDP_COMMAND="$(readlink $(which xfreerdp))"

#251 (comment)

This seems to have fixed it, it's now invoking it ok. Thanks for the help

FXWood350 avatar Sep 16 '25 16:09 FXWood350