Spun up an Amazon Linux 2 EC2 instance with .NET 6, PowerShell, Mono, and MATE Desktop Environment within EC2. I’m attempting to connect to it via RDP on my Mac M1 Pro workstation but I cannot connect. Every time I attempt to connect I get this error:
"Error loading libvnc.so specified in xdrp.ini, please add a valid entry like lib=libxrdp-vnc.so or similar".
Things I’ve tried:
- Connected via ssh and performed a sudo yum update to make sure all binaries are up to date and then rebooted.
- Checked that: xrdp-0.9.22-3.el7.x86_64 installed. It’s my understanding there was a bug that was fixed and was supposed to fix the issue (https://salsa.debian.org/debian-remote-team/xrdp/-/merge_requests/5).
- Searched about 100+ articles which included some of these:
- https://github.com/neutrinolabs/xrdp/issues/2689
- https://askubuntu.com/questions/235905/use-xrdp-to-connect-to-desktop-session
-https://www.reddit.com/r/linuxquestions/comments/13k1bci/xrdp_error/
According to the post here: https://discussion.fedoraproject.org/t/xrdp-fails-to-load-libvnc-so-and-refuses-to-start/82672/3 there is an issue with 9.22.3 where the libvnc.so package is missing. Confirmed by looking at the /usr/lib64/xrdp directory. I upgraded xrdp manually via RPM to 9.22.4 and I see that the libvnc.so library is now there however; now when I login I get yet another missing library error that I am now missing "libxup.so".
"Error loading libxup.so specified in xdrp.ini, please add a valid entry like lib=libxrdp-vnc.so or similar".
I also tried updating the xvnc path in xrdp.ini to use the specific path to no avail.
[Xvnc]
name=Xvnc
lib=/usr/lib64/xrdp/libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
I checked inside of /usr/lib64/xrdp/ and I see that missing libxup.so library is in fact there..
[root@ip-172-31-4-19 xrdp]# ls
libcommon.so.0 libcommon.so.0.0.0 libmc.so libscp.so.0 libscp.so.0.0.0 libvnc.so libxrdpapi.so.0 libxrdpapi.so.0.0.0 libxrdp.so.0 libxrdp.so.0.0.0 libxup.so
Completely lost. How do I do a simple RDP connection to this host?
2
Answers
I faced this exact issue and happened upon this post in my search for answers; I’ve since solved the problem and can RDP in, though it looks like you have performed the same steps as I.
If you are still facing this problem, see below for my shell history.
Here is the pertinent section of the working
/etc/xrdp/xrdp.ini
:In my case it only worked with the below package, the newer releases would fail to install due to Amazon OpenSSL lib dependencies.