Installing rdesktop on Linux Desktop Environment for Remote Connection to Windows via RDP

Publish: 2022-03-11 | Modify: 2022-03-11

Recently, I switched to the Deepin system on my office computer. Wine's QQ and WeChat are very unstable and often crash, so I decided to find an alternative solution. A simple method is to use software like Sunflower/Teamviewer for remote connection to my home Windows (installed with PVE). However, these software are not very stable and the display effect is not ideal. The best solution is to use Windows' built-in RDP for remote desktop connection.

Enabling Windows Remote Desktop

Taking Windows 10 as an example, go to Settings - System - Remote Desktop and enable Remote Desktop. (You also need to allow port 3389 in the firewall. If you are not sure, you can disable the firewall directly.)

You also need to manually map the public port on your router. The default remote port for Windows is 3389.

Installing rdesktop on Deepin

The installation method is the same for Deepin/Debian/Ubuntu systems:

# Install rdesktop
sudo apt install rdesktop

Using rdesktop for Remote Connection to Windows

# Remote connection to Windows
rdesktop -g 1920x1080 -a 24 192.168.0.31 -u admin -p password

The meanings of the above parameters are as follows:

  • -g: Specify the resolution of the remote desktop. Here, I set it to 1920x1080.
  • -a: Set the color depth. The default is 16, but I set it to 24 for better quality. Higher color depth requires higher network requirements.
  • 192.168.0.31: The remote target IP. If you are using port mapping on the router, enter your public domain name (IP) and port.
  • -u: Specify the username (Windows username).
  • -p: Specify the password (Windows password).

Troubleshooting

If you encounter an error during the connection:

ERROR: CredSSP: Initialize failed, do you have correct kerberos tgt initialized ?

Failed to connect, CredSSP required by server.

Open Windows 10 settings - System - Remote Desktop - Advanced settings, and uncheck "Require computers to use network-level authentication for connection".

Conclusion

This article refers to the following sources:


Comments