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
Ubuntu 20.04: connects, then immediately disconnects #2293
Comments
|
I manually started The other logs look the same. |
|
Thanks for the comprehensive logs. I think your window manager is exiting early:- Installing xrdp does not install GNOME - it might install bits of it due to pulling in other dependencies which depend on bits of GNOME however. Do you specifically want a GNOME desktop for xrdp? If so, the next step is to explicitly install it (which pulls in a LOT of software). If not, installing another desktop (e.g. XFCE) might be a better way to go. Let me know which way you want to go. |
|
Thanks ! Ok, this could be it. The leaner the better for the window manager. XFCE would be great. |
|
Remote X11 with ssh forwarding works BTW but is very slow for the specific app. |
|
I installed Not sure why display :12 is used. :10 is for x11 forwarding, :11 probably from an earlier rdp display attempt. I am using gdm3. I went ahead and followed https://operavps.com/install-xrdp-on-ubuntu-20/ to circumvent Xsession startup completely by editing /etx/xrdp/startwm.sh to start xfce4 directly without dm. That worked. It allowed my to use rdp with krdc. But it may be nicer to avoid that and use the regular Xsession setup. Would lightdm be an alternative ? |
|
By default In terms of Ubuntu session startup, there's a lot of clever scripting that goes on to try to find the session manager to use. It's all based under TLDR; If you've got an executable file called On my 20.04 system which starts GNOME by default:- $ ls -l /etc/alternatives/x-session-manager lrwxrwxrwx 1 root root 22 Dec 7 2020 /etc/alternatives/x-session-manager -> /usr/bin/gnome-session To set the system default to xfce4:- $ sudo update-alternatives --config x-session-manager There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/gnome-session 50 auto mode 1 /usr/bin/gnome-session 50 manual mode 2 /usr/bin/startxfce4 50 manual mode 3 /usr/bin/xfce4-session 40 manual mode Press to keep the current choice[*], or type selection number: 3 update-alternatives: using /usr/bin/xfce4-session to provide /usr/bin/x-session-manager (x-session-manager) in manual mode Try that, and come back to me. |
|
Thanks. I had looked at /etc/X11/Xsession.d but did not realize that x-session-manager was a symlink. Also, the scripting has a lot of indirection and options. I restored That worked fine ! To summarize, starting from a headless ubuntu install, it is necessary to install a desktop, choose the session manager, and then install xrdp:
Reboot not necessary but a good time to test if everything works after a reboot. Looks simple enough but took a while to figure out. Let me close the issue. |
|
The setup (option 3 above) directly launches the xfce4 desktop. While I prefer that to logging in through a dm, how would one configure to connect to a dm first ? |
|
If by dm, you mean something like gdm3 or lightdm, that's not possible I'm afraid. You can use the xrdp login facilities, but they're pretty light on features. |
|
Yes, gdm3 or lightdm. That's ok, thanks. |
andreasplesch commentedJun 27, 2022
•
edited
The setup is Ubuntu 20.04 starting from non-X11 configuration. Then standard
sudo apt install xrdpwhich pulls in X11 and gnome (not sure how much of gnome). Nothing else is explicitly installed.
The standard non-root user was set up to only login with ssh keys, This caused xrdp authentication problems. Setting a password and using it for the xrdp connection (via krdc) seems to allow better authentication although there is still a gnome keyring problem
From what I can tell then the Xserver starts up fine but then immediately closes down (with or without parallel console ssh login).
This is how far I got.
I scoured issues and forums for an extended time but could not identify a solution. I tried Xwrapper.config allowed_users=anyone but without success.
Here are relevant logs:
The text was updated successfully, but these errors were encountered: