OS version on the server: Ubuntu Desktop 18.04
Client OS version: Windows 10 pro 1709
Problem: I can RDP to the server, I can see light blue background and a login form, as soon as I login I disconnects from the server.
Logs:
log1-when I was at login form
log2-after I login (and get kicked?)
A little hint on how to troubleshoot this (how to get more information) is appreciated, Linux systems is new to me.
Try to set colour depth in windows client to 24 or 16 bits.
By default it 32 bits.
It's on "Screen" tab.
Unfortunately it doesn't help.
@axzxc1236 - are you running the GNOME desktop?
If so, you could be running into #1122. The Ubuntu package 0.9.5-2 needs an update to work with GNOME and the Xorg backend (which is the Debian default).
Try selecting the Xvnc backend on the login box and see if that gets you any further.
Yes I think so since GNOME is default desktop environment (and I don't know how to change it), and it's version "0.9.5-2 amd64".
I tried Xvnc but it doesn't work either but I shows some error messages.
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait...
login successful for display 10
VNC started connecting
VNC connecting to 127.0.0.1 5910
VNC error - problem connecting
some problem
I am not sure how to "update" because it's in latest version, should I build from source code?
Sorry if I wasn't clear about the update. The latest package needs updating by the maintainers before the Xorg backend will work with GNOME. The exact details about the problem are documented under #1122.
Your message suggests you don't have a VNC server installed. The VNC server is called Xvnc. Type in the command which Xvnc to see if there's anything on your path. If there isn't, the following should install one for you:-
sudo apt-get install vnc4server
I installed Xvnc, but it doesn't help.
(Thank you anyway.)
There should be a log file called xrdp-sesman.log somewhere on your system. I can't tell you exactly where it is I'm afraid as I don't have xrdp installed on Ubuntu. Try in /var/log.
Have a look in there. It should tell you what's happening when the sesman process tries to start the Xvnc server.
https://gist.github.com/axzxc1236/f5a0d716718de9c741c07c3ce11edd9e
I see a line
[ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
keeps showing, but I don't know if it's that causing it or how to fix it.
I don't think that's causing your problem.
Your Xvnc line looks like this:-
Xvnc :10 -auth .Xauthority -geometry 1920x1080 -depth 32 -rfbauth /home/control/.vnc/sesman_control_passwd:10 -bs -nolisten tcp -localhost -dpi 96
Try typing that on the command line to see if you get any error message generated when the X server starts up. If Xvnc runs you can type control-c to stop it. That will be useful information.
Also, you're still running a depth of 32. Some programs don't like that as @sergey-dryabzhinsky mentioned above. For the Xorg backend it doesn't matter as this will force 24 bits, but for Xvnc you will need to set 24 bits or strange things may happen.
Message:
Xvnc Free Edition 4.1.1 - built Feb 25 2015 23:02:21
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40300000, The XFree86 Project, IncThu Jun 7 21:30:45 2018
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5910
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/share/fonts/X11/Speedo/, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
I tried 24bits depth again, but Xvnc still shows the same error message.
I think those errors are OK, provided Xvnc keeps running. The "font path" is largely a legacy X thing these days as fonts are done differently from how they were done in the past. I'm afraid I don't know about the SecurityPolicy file. I've not come across that.
If the X server's running, there must be a problem with the desktop when it starts. I don't know for sure where the desktop will log to on Ubuntu, but as you're running systemd there may be something in the journal.
This command will display the last 3 minutes from the journal:-
sudo journalctl -S -3m
Maybe something in there will give us a clue.
I tried to Xrdp to the computer first and run the command after, this is all what it showed.
https://gist.github.com/axzxc1236/166347a5160b3c283b9c3ee311dd1010
There are two messages I haven't seem before
software acceleration check failed: Child process exited with code 1
CRITICAL: We failed, but the fail whale is dead. Sorry....
Do you think that might help?
Yes, that does make a bit of sense.
IIRC, GNOME 3 requires a 3D-capable X server. If you're running on hardware that's fine. For software you need an X server which implements a thing called the 'GLX extension' in software.
I don't think the Xvnc from the vnc4server package supports GLX.
We've had a lot of posts so far. I'll summarize the situation as I understand it
I've just opened bug 1775631 on the Ubuntu tracker to start to address the first of these.
At this point I think you have three options to get this working:-
I hope someone will step in at this point if there are any mistakes in my reasoning, or in the options above.
Thos was about the time MIcrosoft pushed some network layer 802.1 x
security packages that broke even Windows-to-Windows RDP clients sessions
stopped working. Once the client was updated, connections broke.
On Fri, May 11, 2018 at 7:28 PM 佴弌 notifications@github.com wrote:
OS version on the server: Ubuntu Desktop 18.04
Client OS version: Windows 10 pro 1709
Problem: I can RDP to the server, I can see light blue background and a
login form, as soon as I login I disconnects from the server.Logs:
log1-when I was at login form
https://gist.github.com/axzxc1236/75d9834ac2e54c949e7c8498fbd6172c
log2-after I login (and get kicked?)
https://gist.github.com/axzxc1236/e48c085a7ed9d1aa3f707746cfb18d6aA little hint on how to troubleshoot this is appreciated, Linux systems is
new to me.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/neutrinolabs/xrdp/issues/1128, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAV_lzwxJJ0ejExAgG8Mug8BjVakbuEbks5txiydgaJpZM4T8NQb
.
I was having a similar problem and it turned out I needed to log out of the X session via the VMware WS console. Then logging in via RDP worked fine again. Not sure if this is a universal solution but it worked for me.
I was having a similar problem and it turned out I needed to log out of the X session via the VMware WS console. Then logging in via RDP worked fine again. Not sure if this is a universal solution but it worked for me.
This was also my issue. This is a VM on Synology. Closing X in the host allowed RDP to work.
This is my /var/log/xrdp-sesman.log
@matt335672
[20190322-22:58:37] [DEBUG] libscp initialized
[20190322-22:58:37] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350.
[20190322-22:58:37] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350)
[20190322-22:58:37] [INFO ] starting xrdp-sesman with pid 9068
[20190322-22:58:37] [INFO ] listening to port 3350 on 127.0.0.1
[20190322-23:00:42] [INFO ] A connection received from ::1 port 38368
[20190322-23:00:43] [INFO ] ++ created session (access granted): username shellus, ip ::ffff:192.168.31.84:5878 - socket: 12
[20190322-23:00:43] [INFO ] starting Xorg session...
[20190322-23:00:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20190322-23:00:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20190322-23:00:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20190322-23:00:43] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20190322-23:00:43] [INFO ] calling auth_start_session from pid 10169
[20190322-23:00:43] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20190322-23:00:43] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20190322-23:00:43] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20190322-23:00:53] [ERROR] X server for display 10 startup timeout
[20190322-23:00:53] [CORE ] waiting for window manager (pid 10183) to exit
[20190322-23:00:53] [ERROR] X server for display 10 startup timeout
[20190322-23:00:53] [ERROR] another Xserver might already be active on display 10 - see log
[20190322-23:00:53] [DEBUG] aborting connection...
[20190322-23:00:53] [CORE ] window manager (pid 10183) did exit, cleaning up session
[20190322-23:00:53] [INFO ] calling auth_stop_session and auth_end from pid 10169
[20190322-23:00:53] [DEBUG] cleanup_sockets:
[20190322-23:00:53] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdp_chansrv_socket_10
[20190322-23:00:53] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdpapi_10
[20190322-23:00:53] [DEBUG] cleanup_sockets: failed to delete /var/run/xrdp/sockdir/xrdpapi_10
[20190322-23:00:53] [INFO ] ++ terminated session: username shellus, display :10.0, session_pid 10169, ip ::ffff:192.168.31.84:5878 - socket: 12
This looks like an entirely different problem.
The log file shows the X server being started at 20190322-23:00:43.
At 20190322-23:00:53, the session manager decides the X server hasn't started, so the whole connection is aborted.
I can think of two sensible ways to proceed here:-
shellus account to see if there's any useful information in it.shellus, and try running that command directly?@matt335672
root@v-master:~# cat /home/shellus/.xorgxrdp.10.log
[ 30.453]
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
[ 30.453] Build Operating System: Linux 4.4.0-140-generic x86_64 Ubuntu
[ 30.453] Current Operating System: Linux v-master 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12 UTC 2019 x86_64
[ 30.453] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-17-generic root=UUID=28057975-1b08-4062-b47e-a0b879242ed6 ro quiet splash vt.handoff=1
[ 30.453] Build Date: 27 November 2018 05:27:12PM
[ 30.453] xorg-server-hwe-18.04 2:1.20.1-3ubuntu2.1~18.04.1 (For technical support please see http://www.ubuntu.com/support)
[ 30.453] Current version of pixman: 0.34.0
[ 30.453] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 30.453] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 30.453] (++) Log file: ".xorgxrdp.10.log", Time: Sat Mar 23 01:29:42 2019
[ 30.454] (EE) Unable to locate/open config file: "xrdp/xorg.conf"
[ 30.454] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 30.454] (==) No Layout section. Using the first Screen section.
[ 30.454] (==) No screen section available. Using defaults.
[ 30.454] (**) |-->Screen "Default Screen Section" (0)
[ 30.454] (**) | |-->Monitor "<default monitor>"
[ 30.455] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 30.455] (==) Automatically adding devices
[ 30.455] (==) Automatically enabling devices
[ 30.455] (==) Automatically adding GPU devices
[ 30.455] (==) Automatically binding GPU devices
[ 30.455] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 30.455] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 30.455] Entry deleted from font path.
[ 30.455] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 30.455] Entry deleted from font path.
[ 30.455] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 30.455] Entry deleted from font path.
[ 30.455] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 30.456] Entry deleted from font path.
[ 30.456] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 30.456] Entry deleted from font path.
[ 30.456] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 30.456] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 30.456] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 30.456] (II) Loader magic: 0x55f81e716020
[ 30.456] (II) Module ABI versions:
[ 30.456] X.Org ANSI C Emulation: 0.4
[ 30.456] X.Org Video Driver: 24.0
[ 30.456] X.Org XInput driver : 24.1
[ 30.456] X.Org Server Extension : 10.0
[ 30.461] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[ 30.462] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 30.463] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[ 30.467] (--) PCI:*(0@0:2:0) 8086:191d:1019:9cea rev 6, Mem @ 0xde000000/16777216, 0xc0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[ 30.467] (II) LoadModule: "glx"
[ 30.467] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 30.474] (II) Module glx: vendor="X.Org Foundation"
[ 30.474] compiled for 1.20.1, module version = 1.0.0
[ 30.474] ABI class: X.Org Server Extension, version 10.0
[ 30.474] (==) Matched modesetting as autoconfigured driver 0
[ 30.474] (==) Matched fbdev as autoconfigured driver 1
[ 30.474] (==) Matched vesa as autoconfigured driver 2
[ 30.474] (==) Assigned the driver to the xf86ConfigLayout
[ 30.474] (II) LoadModule: "modesetting"
[ 30.474] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 30.474] (II) Module modesetting: vendor="X.Org Foundation"
[ 30.474] compiled for 1.20.1, module version = 1.20.1
[ 30.474] Module class: X.Org Video Driver
[ 30.474] ABI class: X.Org Video Driver, version 24.0
[ 30.474] (II) LoadModule: "fbdev"
[ 30.475] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 30.475] (II) Module fbdev: vendor="X.Org Foundation"
[ 30.475] compiled for 1.20.1, module version = 0.5.0
[ 30.475] Module class: X.Org Video Driver
[ 30.475] ABI class: X.Org Video Driver, version 24.0
[ 30.475] (II) LoadModule: "vesa"
[ 30.475] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 30.475] (II) Module vesa: vendor="X.Org Foundation"
[ 30.475] compiled for 1.20.1, module version = 2.4.0
[ 30.475] Module class: X.Org Video Driver
[ 30.475] ABI class: X.Org Video Driver, version 24.0
[ 30.475] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 30.475] (II) FBDEV: driver for framebuffer: fbdev
[ 30.475] (II) VESA: driver for VESA chipsets: vesa
[ 30.475] (EE)
Fatal server error:
[ 30.475] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 30.475] (EE)
[ 30.475] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 30.475] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[ 30.475] (EE)
[ 30.475] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 30.475] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 30.476] (EE) Server terminated with error (1). Closing log file.
root@v-master:~# su shellus
shellus@v-master:/root$ cd ~
shellus@v-master:~$
shellus@v-master:~$
shellus@v-master:~$ /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-140-generic x86_64 Ubuntu
Current Operating System: Linux v-master 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12 UTC 2019 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-17-generic root=UUID=28057975-1b08-4062-b47e-a0b879242ed6 ro quiet splash vt.handoff=1
Build Date: 27 November 2018 05:27:12PM
xorg-server-hwe-18.04 2:1.20.1-3ubuntu2.1~18.04.1 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: ".xorgxrdp.10.log", Time: Mon Mar 25 19:31:07 2019
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
shellus@v-master:~$
This looks very similar to #1159
Have you installed xorgxrdp?
@matt335672
apt install xorgxrdp Solved my problem!
You saved me for a few days.
thank you !
Complicated with many different users' different root cause, closing.
Hi all,
I meet issue that the remote desktop is a blank screen. And I checked the log in ~/.xorgorg.10.log (note: 10 is the example of my server. ) And found similar error like @shellus .
Fatal server error:
[ 30.475] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
I followed the instruction from this post Issues with xRDP and Ubuntu 18.04.2 – How to fix it to solve the issue, i.e. install the missing depenency packages. Following is a summary: remove xrdp than re-install.
sudo apt remove xrdp
sudo apt-get install xserver-xorg-core
sudo apt-get -y install xserver-xorg-input-all
sudo apt-get install xrdp
In my case was simply because I was already logged in my Kubuntu machine. The same user account cannot be connected both locally and remotely.
I was logged into SSH while trying to remote desktop in. That was the problem.
Once I logged out of SSH I was able to log in.
Maybe this is an opportunity to add a feature where a popup message states that the user is already logged in before abruptly closing the session?
I am with my RPi4 on Kali and xRDP doesn't work. Help
I am sad to say that after fighting this for months(really many many months) trying xvnc or was it tightvnc?!, xrdp or was it xorgrdp?! , xwindows (1991 called and it says to use its remote access model!), then fighting upstart, or was it systemd now?! Oh, nevermind, neither ended up working ... blah blah blah... Oh, wait, what's that? Ubuntu has native remote access, you say? Oh, guess what, it's for other ubuntu clients only, no windows support... but that's cool, maybe turn off all encryption and give it a shot? nevermind, even that didn't work. So wow and awesome. You might get lucky and get a sad looking desktop to load once. Oh, and also so sad if you have hdpi, because get ready to squint. Oh, maybe for the 8th time, I'll try some of these hacks of using one server to bootstrap another instance because reasons. Also, make sure you aren't actually logged in locally at console because other reasons... Really, just lol.
I'm not being mean to those that posted solutions that worked for themselves. I love the options and people's contributions. It was sad to see some solutions entailing 18 page science papers. Not that they figured something out that worked for them, because that's incredible and the level of ingenuity amazes me, but that it took so many pages of some of the most ridiculous steps I've seen. Seriously, it was significantly easier to compile a slackware kernel for a crappy NIC in 1992 and build a custom router all from usenet feeds than this has been.
Anyway, yeah, nomachine worked perfectly. Super easy, encrypted, looks secure. Yes, that's right. All I had to do to get remote access to my super secure linux box was put a proprietary 3rd party software package on it.
This feels like a lost cause. You know, because it's 2020 and all. So that's it. I have not much useful to say except that punting and using nomachine worked like I wanted from something OOB.
In my case was simply because I was already logged in my Kubuntu machine. The same user account cannot be connected both locally and remotely.
This was exactly the issue for me. I did a kill as follows from SSH and was able to RDP in no problem.
kill -9 -1
I am with my RPi4 on Kali and xRDP doesn't work. Help
What worked for me was to change the session name to "Xvnc" instead of "Xorg" which is the default when logging in.

Hey, my problem was that I couldn't login me with Xorg if the same session that I tried to connect was connected on my Raspberry.
Did you understand ?
Hi all,
I have discovered a fix for Ubuntu's XRDP & XORG dropping connections after launching remote desktop from Windows. You must edit the /etc/xrdp/startwm.sh per steps below. Confirmed working on Windows 10 RDP to Ubuntu 20.04 LTS. Besides the below changes, I have a basic install following these steps: https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-18-04/
Fix:
Step 3
echo xfce4-session > ~/.xsession
Step 4
I have changed the /etc/xrdp/startwm.sh file:
Step 4.1
I have removed the following lines: (I just commented them out)
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
Step 4.2
I have added the following line to the end:
startxfce4
Step 5
service xrdp restart
Reference/Credit: https://df.tips/t/topic/884
my /etc/xrdp/startwm.sh looks like this now:
if test -r /etc/profile; then
. /etc/profile
fi
if test -r /etc/default/locale; then
. /etc/default/locale
test -z "${LANG+x}" || export LANG
test -z "${LANGUAGE+x}" || export LANGUAGE
test -z "${LC_ADDRESS+x}" || export LC_ADDRESS
test -z "${LC_ALL+x}" || export LC_ALL
test -z "${LC_COLLATE+x}" || export LC_COLLATE
test -z "${LC_CTYPE+x}" || export LC_CTYPE
test -z "${LC_IDENTIFICATION+x}" || export LC_IDENTIFICATION
test -z "${LC_MEASUREMENT+x}" || export LC_MEASUREMENT
test -z "${LC_MESSAGES+x}" || export LC_MESSAGES
test -z "${LC_MONETARY+x}" || export LC_MONETARY
test -z "${LC_NAME+x}" || export LC_NAME
test -z "${LC_NUMERIC+x}" || export LC_NUMERIC
test -z "${LC_PAPER+x}" || export LC_PAPER
test -z "${LC_TELEPHONE+x}" || export LC_TELEPHONE
test -z "${LC_TIME+x}" || export LC_TIME
test -z "${LOCPATH+x}" || export LOCPATH
fi
if test -r /etc/profile; then
. /etc/profile
fi
startxfce4
Hope this helps.
Edited for formatting
You may just use basic mode to login first then disable the auto-login. After that, u can use enhanced session mode again.
Just executing one line seems to help with this issue in the Ubuntu 20.04.
echo xfce4-session > ~/.xsession
This is resolving my issue and I am able to login into through RDP.
Just executing one line seems to help with this issue in the Ubuntu 20.04.
echo xfce4-session > ~/.xsessionThis is resolving my issue and I am able to login into through RDP.
same here same OS, above worked after following this tut : https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-20-04/
Just executing one line seems to help with this issue in the Ubuntu 20.04.
echo xfce4-session > ~/.xsessionThis is resolving my issue and I am able to login into through RDP.
Actually this resolves the issue but I could not login to the server machine without deleting this file!
I'm facing the same problem. I am running Ubuntu Server 20.04 LTS (HVM), SSD Volume Type 64bit on Amazon web services (AWS). I have done all the above steps. Installed xfce4 and xrdp and made changes to the files. I also updated tcp rules in AWS to allow all ingress connections from all sources including tcp on 3389. After doing everything and straining my mind for hours, the closest to the solution I have gotten is through this elaborate thread. I have also attached a video about my problem. SO, please help.

Just executing one line seems to help with this issue in the Ubuntu 20.04.
echo xfce4-session > ~/.xsessionThis is resolving my issue and I am able to login into through RDP.
wow you saved my day. my hero.
So a desktop environment is a pre-req on getting Xrdp to work.
If you have just installed xrdp on a headless then you will see the demonstrated issue.
install as DE - xfce or gnome before xrdp.
link back
https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-20-04/
Just executing one line seems to help with this issue in the Ubuntu 20.04.
echo xfce4-session > ~/.xsessionThis is resolving my issue and I am able to login into through RDP.
I used gnome-session instead of xfce4-session and it worked for me!
I'm facing the same problem. I am running Ubuntu Server 20.04 LTS (HVM), SSD Volume Type 64bit on Amazon web services (AWS). I have done all the above steps. Installed xfce4 and xrdp and made changes to the files. I also updated tcp rules in AWS to allow all ingress connections from all sources including tcp on 3389. After doing everything and straining my mind for hours, the closest to the solution I have gotten is through this elaborate thread. I have also attached a video about my problem. SO, please help.
same problem brother
did u solved it????????
Just executing one line seems to help with this issue in the Ubuntu 20.04.
echo xfce4-session > ~/.xsessionThis is resolving my issue and I am able to login into through RDP.
Having the exact same issue (https://github.com/neutrinolabs/xrdp/issues/1128#issuecomment-695340704) after entering the password my "Remote Desktop Connection" is being closed.
Using Ubuntu 20.04 and XRDP 0.9.12.-1.
Executing the recommended command did not solve the issue.
This is what is shown in the xrdp-sesman.log file after the unsuccsessful attempt via Windows remote desktop.
[20201030-12:33:11] [DEBUG] libscp initialized
[20201030-12:33:11] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350.
[20201030-12:33:11] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350)
[20201030-12:33:11] [INFO ] starting xrdp-sesman with pid 2120
[20201030-12:33:11] [INFO ] listening to port 3350 on 127.0.0.1
[20201030-12:35:59] [INFO ] A connection received from ::1 port 36578
[20201030-12:35:59] [INFO ] ++ created session (access granted): username merlin, ip ::ffff:192.168.178.20:49156 - socket: 12
[20201030-12:35:59] [INFO ] starting Xorg session...
[20201030-12:35:59] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20201030-12:35:59] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20201030-12:35:59] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20201030-12:35:59] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20201030-12:35:59] [INFO ] calling auth_start_session from pid 2146
[20201030-12:35:59] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20201030-12:35:59] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20201030-12:35:59] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20201030-12:36:00] [CORE ] waiting for window manager (pid 2151) to exit
[20201030-12:36:05] [CORE ] window manager (pid 2151) did exit, cleaning up session
[20201030-12:36:05] [INFO ] calling auth_stop_session and auth_end from pid 2146
[20201030-12:36:05] [DEBUG] cleanup_sockets:
[20201030-12:36:05] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10
[20201030-12:36:05] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_10
[20201030-12:36:05] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdpapi_10
[20201030-12:36:05] [INFO ] ++ terminated session: username merlin, display :10.0, session_pid 2146, ip ::ffff:192.168.178.20:49156 - socket: 12
sudo sed -i.bak '/fi/a xfce4-session \n' /etc/xrdp/startwm.sh
sudo systemctl restart xrdp
Had same issue with Ubuntu 20.4 and the above commands resolved my issue
sudo sed -i.bak '/fi/a xfce4-session \n' /etc/xrdp/startwm.sh
sudo systemctl restart xrdp
Had same issue with Ubuntu 20.4 and the above commands resolved my issue
Thank you brother, it worked for me ;)
My situation:
Raspberry Pi 4, Ubuntu Server, lubuntu-desktop
~/.vnc/xstartup:
unset SESSION_MANAGER
exec openbox-session &
startlxqt &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/etc/xrdp/startwm.sh:
....
test -z "${LOCPATH+x}" || export LOCPATH
fi
if test -r /etc/profile; then
. /etc/profile
fi
startlxqt
The key here is to install xfce4 and then follow the instructions mentioned by @goldenjosh
Most helpful comment
Hi all,
I have discovered a fix for Ubuntu's XRDP & XORG dropping connections after launching remote desktop from Windows. You must edit the /etc/xrdp/startwm.sh per steps below. Confirmed working on Windows 10 RDP to Ubuntu 20.04 LTS. Besides the below changes, I have a basic install following these steps: https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-18-04/
Fix:
Step 3
echo xfce4-session > ~/.xsession
Step 4
I have changed the /etc/xrdp/startwm.sh file:
Step 4.1
I have removed the following lines: (I just commented them out)
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
Step 4.2
I have added the following line to the end:
startxfce4
Step 5
service xrdp restart
Reference/Credit: https://df.tips/t/topic/884
my /etc/xrdp/startwm.sh looks like this now:
!/bin/sh
xrdp X session start script (c) 2015, 2017 mirabilos
published under The MirOS Licence
if test -r /etc/profile; then
. /etc/profile
fi
if test -r /etc/default/locale; then
. /etc/default/locale
test -z "${LANG+x}" || export LANG
test -z "${LANGUAGE+x}" || export LANGUAGE
test -z "${LC_ADDRESS+x}" || export LC_ADDRESS
test -z "${LC_ALL+x}" || export LC_ALL
test -z "${LC_COLLATE+x}" || export LC_COLLATE
test -z "${LC_CTYPE+x}" || export LC_CTYPE
test -z "${LC_IDENTIFICATION+x}" || export LC_IDENTIFICATION
test -z "${LC_MEASUREMENT+x}" || export LC_MEASUREMENT
test -z "${LC_MESSAGES+x}" || export LC_MESSAGES
test -z "${LC_MONETARY+x}" || export LC_MONETARY
test -z "${LC_NAME+x}" || export LC_NAME
test -z "${LC_NUMERIC+x}" || export LC_NUMERIC
test -z "${LC_PAPER+x}" || export LC_PAPER
test -z "${LC_TELEPHONE+x}" || export LC_TELEPHONE
test -z "${LC_TIME+x}" || export LC_TIME
test -z "${LOCPATH+x}" || export LOCPATH
fi
if test -r /etc/profile; then
. /etc/profile
fi
startxfce4
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
Hope this helps.
Edited for formatting