Solved xrdp session: Xvnc error - problem connecting

Hi,

I'm looking into running an Xrdp server, the Xorg-session is working right out of the box, unfortunately I'm unable to get Xvnc running. From what I understand on the firewall side there is only 3389/tcp required to be available no other port is mandatory. (tcpdump is supporting this)

Anybody else got this work ?

I get the following error message:
Connection Log
connecting to sesman on 127.0.0.1:3350
sesman connect ok
sending login info to session manager. Please wait ...
login successful for user tanis on display 12
VNC started connecting
VNC connecting to 127.0.0.1:5912
VNC error - problem connecting
some error
Error connecting to user session

Code:
# /usr/local/etc/xrdp/xrdp.ini
[...]
#
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
#
[...]
 
As you can see by the configuration and the output, it loops back to a VNC session. I suspect you don't have that. What xrdp basically does in this configuration is to accept RDP and translating this to a VNC connection locally.

It's been a while since I last used it but the Xorg session doesn't use VNC underwater and should work. You might need to enable xrdp_sesman_enable for this to work.
 
So my understanding is wrong that Xvnc creates a VNC session on request (login) and I need to setup Xvnc by hand so I can connect it through Xrdp:Xvnc?

Just for the record Xorg seems to spin up it's on instance when I login, so I assumed Xvnc would do the same?!
 
So my understanding is wrong that Xvnc creates a VNC session on request (login) and I need to setup Xvnc by hand so I can connect it through Xrdp:Xvnc?
Yes, that's what the Xvnc session does.
 
Sorry, I'm confused. 😅

A ) Xvnc is actually creating a VNC session on request (login)
B ) I have to create the VNC session by hand and Xvnc just forwards my connection to that session.
 
Some VNC server has to be running for xrdp to connect to. It's a rather convoluted way. Try the Xorg session instead, it doesn't require VNC and should connect directly to Xorg.
 
Hmmm ... I just spun up an Alma Linux 9.1 using bhyve installed xrdp as well and eh viola Xvnc is creating a new Xvnc instance on login. xrdp.ini is the same. So there must be more to this.

Xorg is working, unfortunately it's responsiveness is just to slow to work with it.
 
In both cases Xvnc is provided by tigerVNC, perhaps there is a difference in how both binary packages are created?!
 
Just set it up on one of my test systems. It's been a while and I do remember having to fiddle with it to get it to work.

With the Xorg session I'm getting these:
Code:
[20221123-16:09:34] [INFO ] Session started successfully for user dice on display 10
[20221123-16:09:34] [INFO ] Starting the xrdp channel server for display 10
[20221123-16:09:34] [INFO ] Session in progress on display 10, waiting until the window manager (pid 60423) exits to end the session
[20221123-16:09:34] [WARN ] Timed out waiting for X server on display 10 to startup
[20221123-16:09:34] [ERROR] There is no X server active on display 10
[20221123-16:09:34] [ERROR] A fatal error has occurred attempting to start the window manager on display 10, aborting connection
[20221123-16:09:34] [WARN ] Window manager (pid 60423, display 10) exited quickly (0 secs). This could indicate a window manager config problem
[20221123-16:09:34] [INFO ] Calling auth_stop_session and auth_end from pid 60422
It does try to start an X session on display 10 but it seems to fail to start. Haven't figured out why yet. It may have something to do with a non-existent xorg.conf.
 
The Xrdp:Xorg is running out-of-the-box for me using FBSD 13.1 (latest binary everything), the Xrdp:Xvnc case is for whatever reason not working. To be more precise, an Xvnc instance is created but Xrdp is unable to hand the session over to the running Xvnc instance. Looks like I need to investigate that further.
 
Add the following to the [Xvnc] section sometimes xrdp (sesman) will try to connect to the VNC session before it starts.

Code:
delay_ms=2000

It's also possible you need to forcefully set the color depth as well.
Code:
xserverbpp=24
Just make sure your client matches that value
 
Adding delay_ms = 2000 indeed did the trick, thank you! 😮

Code:
# /usr/local/etc/xrdp/xrdp.ini
[...]
#
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
delay_ms=2000
#
[...]

Case closed!😎
 
Is this an extension to the Xorg case ? Which benefits does this package bring, better compression would be interesting for once? 😅
 
In most cases it's using less bandwidth with RFX (https://en.wikipedia.org/wiki/RemoteFX) if you're doing everything via the LAN Xvnc support is almost on par with Xorg xorgxrdp. However, most features and improvements make to Xorg first and is the current direction of the project. For instance just recently (~1 year Xvnc got multimonitor support). DRI/glamor support is Xorg only (remote hardware acceleration).

The successor of RFX is GFX that currently in development on xrdp.

GFX development

Xorg does have it's own set of quirks other issues with Xorg (just sleep in startwm.sh like Xvnc delayms).

Latest Win 11 mstsc has an issue with RFX.

If you just need simple a remote desktop and have the bandwidth Xvnc should be fine.
 
Just for clarification, xorgxrdp is not by any chance referencing the following configuration:

Code:
# /usr/local/etc/xrdp/xrdp.ini
[...]
#
[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20
#
[...]

That configuration is working out-of-the-box, unfortunately if I use Remote Desktop Connection (Windows 11) or Microsoft Remote Desktop App (Windows 11 Microsoft Store) it's slow in comparison to Xrdp:Xvnc. Slow sums up a lack of responsiveness, and heavy screen tearing.

Setup is as follows:
Server:
native hypervisor: bhyve FreeBSD 13.1-p4 (latest binary) using ZFS
vm running FreeBSD 13.1-p4 (latest binary), xrdp:Xorg, XFCE4 slow (lacks responsiveness, heavy screen tearing)
vm running Alma Linux 9.1, xrdp:Xvnc, XFCE4 (holds the benchmark: better responsiveness, no screen tearing)

Client:
same lan, no remote
Windows 11 app is Remote Desktop Connection and Windows Remote Desktop App.

So far Alma Linux 9.1 is winning, and to be honest I don't know why?! It's a bit sade, as I would prefer to see FBSD making the race.
 
Hard to say what your issue might be but I can say on a 2011 TS130 Think Server. Native, jail, and vbox running xrdp, xorgxrdp works without (much?) issue. No serious (if any?) screen tearing and responsiveness if fine assuming you're trying to do anything like screen video (even though windowed video is fine with a text editor).

My experience with xfce4 over xorgxrdp is that it best to turn off the compositor (Settings, Window Manager Tweaks, Compositor. However, I mainly use openbox, fvwm, and fvmw3.
 
Right now, both VMs (FreeBSD 13.1, Alma Linux 9.1) are just created with defaults, no particular treatment in configuration. All packages are based on default repos (FreeBSD binary packages, Alma Linux default repo and EPEL). Both cases run xrdp:Xvnc and XFCE default installation. I diffed the configuration files, matching perfectly. 🤔

So far, Alma is rocking it out of the gate: no screen tearing, almost ordinary responses. Sure, I could deactivate Compositing for FBSD but that wouldn’t explain why Alma is just rocking it. 🤷‍♂️

I honestly don’t think this is a hardware issue as the whole system is rather nicely equipped 🤓:
2x Intel E5-2695-v3 or something similar 😅
512 GB Memory
2x NIC 10 Gbit/s

VM configuration:
vm cores: 16
vm mem: 64 GB

So this begs the question: How can I pop the hood on this one and figure out where this difference in performance is originating?! 🤓
 
Back
Top