Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDP issue #305

Open
edwin1212256756 opened this issue Oct 25, 2024 · 6 comments
Open

RDP issue #305

edwin1212256756 opened this issue Oct 25, 2024 · 6 comments
Labels
bug Something isn't working freerdp Issue related to freerdp

Comments

@edwin1212256756
Copy link

edwin1212256756 commented Oct 25, 2024

when i try to install winapps i get this error:( i have xfreerdp3 installed)

################################################################################

WinApps Install Wizard

################################################################################

Q) Install or uninstall WinApps? --> Install
Q) Configure WinApps for the current user 'edwin' or the whole system? --> System
Q) Automatically install supported applications or choose manually? --> Manual (Default)

WinApps installation already present at /usr/local/bin/winapps-src. Updating...
Already up to date.
Installing WinApps.
Checking for existing conflicting WinApps installations... Done!
Attempting to load WinApps configuration file... Done!
Checking whether dependencies are installed... Done!
Checking container status... 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/edwin/.local/share/winapps/FreeRDP_Test_20241025_1152_189299005.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/edwin/.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'.

Content of log file:

[11:52:38:255] [5069:000013d9] [WARN][com.freerdp.crypto] - [verify_cb]: Certificate verification failure 'self-signed certificate (18)' at stack position 0
[11:52:38:255] [5069:000013d9] [WARN][com.freerdp.crypto] - [verify_cb]: CN = DOCKERW-INPD0A4
[11:52:39:918] [5069:000013d9] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5glue_get_init_creds (Client's credentials have been revoked [-1765328366])
[11:52:39:320] [5069:000013d9] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5glue_get_init_creds (Client's credentials have been revoked [-1765328366])
[11:52:39:338] [5069:000013d9] [ERROR][com.freerdp.core.transport] - [transport_read_layer]: BIO_read retries exceeded
[11:52:39:338] [5069:000013d9] [ERROR][com.freerdp.core] - [transport_read_layer]: ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[11:52:38:172] [5069:000013d9] [INFO][com.freerdp.client.x11] - [xf_setup_x11]: Enabling X11 debug mode.

I think it has something to do with the way it tries to connect to the VM with rdp.

because if i use the cmd: xfreerdp3 /v:127.0.0.1 /u:docker /sec:tls /bpp:16(It works flawlessly)

PS: i use docker.

My winapps config:

##################################
#   WINAPPS CONFIGURATION FILE   #
##################################

# INSTRUCTIONS
# - Leading and trailing whitespace are ignored.
# - Empty lines are ignored.
# - Lines starting with '#' are ignored.
# - All characters following a '#' are ignored.

# [WINDOWS USERNAME]
RDP_USER="docker"

# [WINDOWS PASSWORD]
RDP_PASS=""

# [WINDOWS DOMAIN]
# DEFAULT VALUE: '' (BLANK)
RDP_DOMAIN=""

# [WINDOWS IPV4 ADDRESS]
# NOTES:
# - If using 'libvirt', 'RDP_IP' will be determined by WinApps at runtime if left unspecified.
# DEFAULT VALUE:
# - 'docker': '127.0.0.1'
# - 'podman': '127.0.0.1'
# - 'libvirt': '' (BLANK)
RDP_IP="127.0.0.1"

# [WINAPPS BACKEND]
# DEFAULT VALUE: 'docker'
# VALID VALUES:
# - 'docker'
# - 'podman'
# - 'libvirt'
# - 'manual'
WAFLAVOR="docker"

# [DISPLAY SCALING FACTOR]
# NOTES:
# - If an unsupported value is specified, a warning will be displayed.
# - If an unsupported value is specified, WinApps will use the closest supported value.
# DEFAULT VALUE: '100'
# VALID VALUES:
# - '100'
# - '140'
# - '180'
RDP_SCALE="100"

# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
# DEFAULT VALUE: '/cert:tofu /sound /microphone'
# VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
RDP_FLAGS="/cert:tofu /sound /microphone"

# [MULTIPLE MONITORS]
# NOTES:
# - If enabled, a FreeRDP bug *might* produce a black screen.
        # DEFAULT VALUE: 'false'
# VALID VALUES:
# - 'true'
# - 'false'
MULTIMON="false"

# [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 'docker' and 'manual'.
# - See https://github.com/dockur/windows/issues/674
# 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=""

                                                                                                                      
@AnarchoBooleanism
Copy link

AnarchoBooleanism commented Oct 26, 2024

Hello, I had a similar issue with the WinApps installer failing to establish a Remote Desktop connection to the Windows VM inside the Docker container (note that my instance of FreeRDP was the Flatpak version, 3.9.0, at the time of writing):

################################################################################
#                                                                              #
#                            WinApps Install Wizard                            #
#                                                                              #
################################################################################

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

WinApps installation already present at /home/hihacks/.local/bin/winapps-src. Updating...
Already up to date.
Installing WinApps.
Checking for existing conflicting WinApps installations... Done!
Attempting to load WinApps configuration file... Done!
Checking whether dependencies are installed... Done!
Checking container status... 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/hihacks/.local/share/winapps/FreeRDP_Test_20241026_0759_764904952.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/hihacks/.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'.

This is what my log file looked like:

[07:59:47:963] [2:00000003] [WARN][com.freerdp.crypto] - [verify_cb]: CN = DOCKERW-KB618NB
[07:59:47:964] [2:00000003] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[07:59:47:964] [2:00000003] [ERROR][com.winpr.sspi.Kerberos] - [kerberos_AcquireCredentialsHandleA]: krb5_parse_name (Configuration file does not specify default realm [-1765328160])
[07:59:47:965] [2:00000003] [ERROR][com.winpr.sspi.NTLM] - [ntlm_fetch_ntlm_v2_hash]: Error: Could not find user in SAM database
[07:59:47:965] [2:00000003] [WARN][com.winpr.sspi] - [winpr_InitializeSecurityContextA]: InitializeSecurityContextA status SEC_E_INTERNAL_ERROR [0x80090304]
[07:59:47:965] [2:00000003] [ERROR][com.freerdp.core.auth] - [credssp_auth_authenticate]: InitializeSecurityContext failed with SEC_E_INTERNAL_ERROR [0x80090304]
[07:59:47:965] [2:00000003] [ERROR][com.freerdp.core.rdp] - [rdp_recv_callback_int][0x608d29e7a220]: CONNECTION_STATE_NLA - nla_recv_pdu() fail
[07:59:47:965] [2:00000003] [ERROR][com.freerdp.core.rdp] - [rdp_recv_callback_int][0x608d29e7a220]: CONNECTION_STATE_NLA status STATE_RUN_FAILED [-1]
[07:59:47:965] [2:00000003] [ERROR][com.freerdp.core.transport] - [transport_check_fds]: transport_check_fds: transport->ReceiveCallback() - STATE_RUN_FAILED [-1]
[07:59:47:965] [2:00000003] [ERROR][com.freerdp.core] - [rdp_client_wait_for_activation]: ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]

My winapps config looked like this:

#   WINAPPS CONFIGURATION FILE   #
##################################

# INSTRUCTIONS
# - Leading and trailing whitespace are ignored.
# - Empty lines are ignored.
# - Lines starting with '#' are ignored.
# - All characters following a '#' are ignored.

# [WINDOWS USERNAME]
RDP_USER="DOCKER"

# [WINDOWS PASSWORD]
RDP_PASS=""

# [WINDOWS DOMAIN]
# DEFAULT VALUE: '' (BLANK)
RDP_DOMAIN=""

# [WINDOWS IPV4 ADDRESS]
# NOTES:
# - If using 'libvirt', 'RDP_IP' will be determined by WinApps at runtime if left unspecified.
# DEFAULT VALUE:
# - 'docker': '127.0.0.1'
# - 'podman': '127.0.0.1'
# - 'libvirt': '' (BLANK)
RDP_IP=""

# [WINAPPS BACKEND]
# DEFAULT VALUE: 'docker'
# VALID VALUES:
# - 'docker'
# - 'podman'
# - 'libvirt'
# - 'manual'
WAFLAVOR="docker"

# [DISPLAY SCALING FACTOR]
# NOTES:
# - If an unsupported value is specified, a warning will be displayed.
# - If an unsupported value is specified, WinApps will use the closest supported value.
# DEFAULT VALUE: '100'
# VALID VALUES:
# - '100'
# - '140'
# - '180'
RDP_SCALE="100"

# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
# DEFAULT VALUE: '/cert:tofu /sound /microphone'
# VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
RDP_FLAGS="/cert:tofu /sound /microphone"

# [MULTIPLE MONITORS]
# NOTES:
# - If enabled, a FreeRDP bug *might* produce a black screen.
# DEFAULT VALUE: 'false'
# VALID VALUES:
# - 'true'
# - 'false'
MULTIMON="false"

# [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 'docker' and 'manual'.
# - See https://github.com/dockur/windows/issues/674
# 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=""

I also tried the command you wrote for connecting via RDP, and it did work on my end as well.

Interestingly, what fixed the problem for me was setting a password for my "Docker" account, and then changing the WinApps config file to match. After doing those steps, WinApps was able to successfully connect via RDP and complete the install process.

@xsy420
Copy link

xsy420 commented Oct 26, 2024

I have found why and already sent the issue at FreeRDP/FreeRDP#10784 and notice at dockur/windows#837
freerdp group has also a pull request, once they reviewed it, It will be fixed

@AkechiShiro
Copy link

AkechiShiro commented Nov 1, 2024

Thanks @xsy420, seems FreeRDP 3.9.0 introduced a regression where empty password does not login through RDP with Windows 11, this will be fixed in the next release I guess.

Workaround is to : set a password on the Docker account.

@oskardotglobal oskardotglobal added bug Something isn't working freerdp Issue related to freerdp labels Nov 3, 2024
@mattcbro
Copy link

The work around is not working for me. My vm hangs while it's trying to login, even with a set password, but calling freerdp directly from the command line works fine.

@mattcbro
Copy link

mattcbro commented Nov 25, 2024

Well I got the installer to go through without creating errors. To do this, within the ~/.config/winapps directory I copied setup.sh to . and copied inquirer.sh to the install subdirectory. You get those files from the source zipfile. I then ran setup.sh using source setup.sh rather than bash setup.sh. Apparently it wanted some assigned variables in the global scope rather than in the local bash scope. The script probably needs to be debugged a little better.

You also have to give the Docker user in the windows vm a password and then set it accordingly in winapps.conf

@AkechiShiro
Copy link

AkechiShiro commented Nov 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working freerdp Issue related to freerdp
Projects
None yet
Development

No branches or pull requests

6 participants