skip to Main Content

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".

enter image description here

Things I’ve tried:

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


  1. 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.

    [ec2-user@ip-addr ~]$ history
        1  sudo yum update
        2  sudo reboot
        3  sudo passwd ec2-user
        4  sudo openssl req -x509 -sha384 -newkey rsa:3072 -nodes -keyout /etc/xrdp/key.pem -out /etc/xrdp/cert.pem -days 365
        5  sudo systemctl enable xrdp
        6  sudo systemctl start xrdp
        7  cd /etc/xrdp
        8  ls
        9  cat xrdp.ini
       10  vim xrdp.ini
       11  sudo vim xrdp.ini
       12  wget https://rpmfind.net/linux/epel/testing/7/x86_64/Packages/x/xrdp-0.9.22-4.el7.x86_64.rpm # DID NOT WORK
       13  ping 8.8.8.8
       14  wget google.com
       15  ls
       16  cdf # fatfingered
       17  cd
       18  wget https://rpmfind.net/linux/epel/testing/7/x86_64/Packages/x/xrdp-0.9.22-4.el7.x86_64.rpm # If at first you do not succeed, try and try again
       19  wget https://kojipkgs.fedoraproject.org//packages/xrdp/0.9.22/4.el7/x86_64/xrdp-0.9.22-4.el7.x86_64.rpm # <<-- WORKED
       20  sudo yum install ./xrdp-0.9.22-4.el7.x86_64.rpm
       21  sudo reboot now
    

    Here is the pertinent section of the working /etc/xrdp/xrdp.ini:

    [Xvnc]
    name=Xvnc
    lib=libvnc.so
    #lib=libxrdp-vnc.so
    username=ask
    password=ask
    ip=127.0.0.1
    port=-1
    
    Login or Signup to reply.
  2. In my case it only worked with the below package, the newer releases would fail to install due to Amazon OpenSSL lib dependencies.

    wget https://kojipkgs.fedoraproject.org//packages/xrdp/0.9.22/4.el8/x86_64/xrdp-0.9.22-4.el8.x86_64.rpm
    
    sudo yum install xrdp-0.9.22-4.el8.x86_64.rpm
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search