winapps-org / winapps

The winapps main project, forked from https://github.com/Fmstrat/winapps/
Other
1.28k stars 58 forks source link

FreeRDP failed to establish a connection with Windows. - Tried all troubleshooting tips, none worked. #168

Closed PierreV23 closed 4 months ago

PierreV23 commented 4 months ago
pierrev@pierrevd:~/Downloads/winapps$ ./installer.sh 
################################################################################
#                                                                              #
#                            WinApps Install Wizard                            #
#                                                                              #
################################################################################

Q) Install or uninstall WinApps? --> Installncies are installed... 
Q) Configure WinApps for the current user 'pierrev' or the whole system? --> Current User
Q) Automatically install supported applications or choose manually? --> Manual (Default)

Installing WinApps.
Checking for existing conflicting WinApps installations... Done!
Attempting to load WinApps configuration file... Done!
Checking whether dependencies are installed... Done!
Checking whether the user 'pierrev' is part of the required groups... Done!
Checking the status of the Windows VM... Done!
Checking for an open RDP Port on Windows... Done!
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/pierrev/.local/share/winapps/FreeRDP_Test_20240725_1614_254016032.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/pierrev/.config/freerdp/server.
  - 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'.
pierrev@pierrevd:~/Downloads/winapps$ ls /home/pierrev/.config/freerdp
ls: cannot access '/home/pierrev/.config/freerdp': No such file or directory
pierrev@pierrevd:~/Downloads/winapps$ ls /home/pierrev/.config/ -la | grep rdp
pierrev@pierrevd:~/Downloads/winapps$ cat /home/pierrev/.local/share/winapps/FreeRDP_Test_20240725_1614_254016032.log 
[16:14:36:990] [2:00000003] [WARN][com.freerdp.crypto] - [verify_cb]: Certificate verification failure 'self-signed certificate (18)' at stack position 0
[16:14:36:990] [2:00000003] [WARN][com.freerdp.crypto] - [verify_cb]: CN = RDPWindows
[16:14:36:991] [2:00000003] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[16:14:36:991] [2:00000003] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[16:14:36:993] [2:00000003] [ERROR][com.freerdp.core] - [nla_recv_pdu]: ERRCONNECT_ACCOUNT_RESTRICTION [0x00020017]
[16:14:36:993] [2:00000003] [ERROR][com.freerdp.core.rdp] - [rdp_recv_callback_int][0x55746a6b71f0]: CONNECTION_STATE_NLA - nla_recv_pdu() fail
[16:14:36:993] [2:00000003] [ERROR][com.freerdp.core.rdp] - [rdp_recv_callback_int][0x55746a6b71f0]: CONNECTION_STATE_NLA status STATE_RUN_FAILED [-1]
[16:14:36:993] [2:00000003] [ERROR][com.freerdp.core.transport] - [transport_check_fds]: transport_check_fds: transport->ReceiveCallback() - STATE_RUN_FAILED [-1]
pierrev@pierrevd:~/Downloads/winapps$ cat ~/.config/winapps/winapps.conf 
RDP_USER="User"
RDP_PASS=""
#RDP_DOMAIN="MYDOMAIN"
#RDP_IP="192.168.123.111"
WAFLAVOR="libvirt" # Acceptable values are 'docker', 'podman' and 'libvirt'.
#RDP_SCALE=100 # Acceptable values are 100, 140, and 180.
#RDP_FLAGS=""
#MULTIMON="true"
#DEBUG="true"
#FREERDP_COMMAND="xfreerdp"
pierrev@pierrevd:~/Downloads/winapps$ 

image

I did merge the .reg file, I signed the user out and I opened+closed the VM in Virtual Machine Manager multiple times

skjerns commented 4 months ago

check which freerdp command is used in your distro.

In my case the alias was xfreerdp3, so I entered that in the line 10 in ~/.config/wineapps/winapps.conf

RDP_USER="docker"
RDP_PASS=""
#RDP_DOMAIN="MYDOMAIN"
RDP_IP="127.0.0.1"
WAFLAVOR="docker" # Acceptable values are 'docker', 'podman' and 'libvirt'.
#RDP_SCALE=100 # Acceptable values are 100, 140, and 180.
#RDP_FLAGS=""
#MULTIMON="true"
DEBUG="true"
FREERDP_COMMAND="xfreerdp3"
PierreV23 commented 4 months ago

check which freerdp command is used in your distro.

In my case the alias was xfreerdp3, so I entered that in the line 10 in ~/.config/wineapps/winapps.conf

RDP_USER="docker"
RDP_PASS=""
#RDP_DOMAIN="MYDOMAIN"
RDP_IP="127.0.0.1"
WAFLAVOR="docker" # Acceptable values are 'docker', 'podman' and 'libvirt'.
#RDP_SCALE=100 # Acceptable values are 100, 140, and 180.
#RDP_FLAGS=""
#MULTIMON="true"
DEBUG="true"
FREERDP_COMMAND="xfreerdp3"

Apparently there's no command available for me at all:

pierrev@pierrevd:~$ compgen -ca | sort | egrep 'free|rdp'
free
free
pierrev@pierrevd:~$

I installed freerdp through flatpak like the readme suggested because freerdp3-x11 was not available through my package manager for some reason.

Any idea what I should do?

skjerns commented 4 months ago

Any idea what I should do?

I also couldn't get it started using the Flatpak version, so I resorted to xfreerdp3.

maybe try find a version that is supported by your package manager? or build freerdp from source somehow?

Maybe it will work if you explicitly set the path of the flatpak binary in the config?

PierreV23 commented 4 months ago

Any idea what I should do?

I also couldn't get it started using the Flatpak version, so I resorted to xfreerdp3.

maybe try find a version that is supported by your package manager?

pierrev@pierrevd:~$ apt search freerdp | grep '^[a-zA-Z0-9]'

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Sorting...
Full Text Search...
arctica-greeter-remote-logon/stable,stable 0.99.3.0-1+deb12u2 all
freerdp2-dev/stable 2.10.0+dfsg1-1 amd64
freerdp2-shadow-x11/stable 2.10.0+dfsg1-1 amd64
freerdp2-wayland/stable 2.10.0+dfsg1-1 amd64
freerdp2-x11/stable 2.10.0+dfsg1-1 amd64
libfreerdp-client2-2/stable 2.10.0+dfsg1-1 amd64
libfreerdp-server2-2/stable 2.10.0+dfsg1-1 amd64
libfreerdp-shadow-subsystem2-2/stable 2.10.0+dfsg1-1 amd64
libfreerdp-shadow2-2/stable 2.10.0+dfsg1-1 amd64
libfreerdp2-2/stable 2.10.0+dfsg1-1 amd64
libpam-freerdp2/stable 2.0.0-3 amd64
libpam-freerdp2-dev/stable 2.0.0-3 amd64
libwinpr-tools2-2/stable 2.10.0+dfsg1-1 amd64
libwinpr2-2/stable 2.10.0+dfsg1-1 amd64
libwinpr2-dev/stable 2.10.0+dfsg1-1 amd64
lightdm-remote-session-freerdp2/stable 2.0.0-1+b1 amd64
winpr-utils/stable 2.10.0+dfsg1-1 amd64
xrdp/stable 0.9.21.1-1 amd64
pierrev@pierrevd:~$ 

There doesnt seem to be a freerdp3 version available.

or build freerdp from source somehow?

I'd rather not, so that's a last resort.

Maybe it will work if you explicitly set the path of the flatpak binary in the config?

How do i go about trying this?

skjerns commented 4 months ago

No idea, but mine seems to point to ~/.local/share/flatpak/app/com.freerdp.FreeRDP/x86_64/stable/6d1aeabdd5d1cf871a0e50ba781cc14fa9eaa3185aa0ddb2a648a626457c9104/export/bin/com.freerdp.FreeRDP

your UID will be differen though

PierreV23 commented 4 months ago

No idea, but mine seems to point to ~/.local/share/flatpak/app/com.freerdp.FreeRDP/x86_64/stable/6d1aeabdd5d1cf871a0e50ba781cc14fa9eaa3185aa0ddb2a648a626457c9104/export/bin/com.freerdp.FreeRDP

your UID will be differen though

Putting the entire path to the binary worked! Thanks!

KernelGhost commented 4 months ago

It seems unusual that the script isn't automatically setting the FreeRDP command. If the FreeRDP Flatpak is detected, it should default to using flatpak run --command=xfreerdp com.freerdp.FreeRDP.