xrdp: XRDP doesn't work with gnome

Hello, I tried to install an XRDP server on gnome, kde and unity desktops. Spend 4 days, but still without success. Here are my results till now: Debian 9.1 Gnome - XRDP doesn’t work Debian 9.1 KDE - XRDP doesn’t work Ubuntu 17.04 Gnome - XRDP doesn’t work Ubuntu 17.04 Unity - XRDP doesn’t work CentOS 7.3 Gnome - XRDP WORKS!!! Fedora 26 Gnome - XRDP doesn’t work

As you can see only CentOS works with XRDP. It might be problems on my machine. What do I have: Server - Dell Poweredge T30 GPU - Intel HD Graphics 530

I found that only CentOS doesn’t have drivers for this graphic card. So, maybe when my graphic card is used then XRDP doesn’t work in this scenario.

I tried to install default xrdp distro packets and compile XRDP 0.9.3 by myself. Both ways failed.

Here are my XRDP logs from Fedora:

xrdp.log:

[20170810-17:01:29] [INFO ] starting xrdp with pid 3159
[20170810-17:01:29] [INFO ] listening to port 3389 on 0.0.0.0
[20170810-17:02:18] [INFO ] Socket 12: AF_INET connection received from 192.168.0.133 port 40692
[20170810-17:02:18] [DEBUG] Closed socket 12 (AF_INET 192.168.0.134:3389)
[20170810-17:02:18] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20170810-17:02:18] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20170810-17:02:18] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20170810-17:02:18] [DEBUG] TLSv1.2 enabled
[20170810-17:02:18] [DEBUG] TLSv1.1 enabled
[20170810-17:02:18] [DEBUG] TLSv1 enabled
[20170810-17:02:18] [DEBUG] Security layer: requested 3, selected 1
[20170810-17:02:20] [INFO ] connected client computer name: debian
[20170810-17:02:20] [INFO ] TLS connection established from 192.168.0.133 port 40692: TLSv1.2 with cipher AES256-GCM-SHA384
[20170810-17:02:20] [DEBUG] xrdp_00000c96_wm_login_mode_event_00000001
[20170810-17:02:20] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20170810-17:02:20] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20170810-17:02:29] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20170810-17:02:30] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20170810-17:02:30] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20170810-17:02:30] [DEBUG] return value from xrdp_mm_connect 0
[20170810-17:02:30] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20170810-17:02:30] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170810-17:02:30] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20170810-17:02:33] [DEBUG] VNC error 1 after security negotiation
[20170810-17:02:33] [DEBUG] VNC error before sending share flag
[20170810-17:02:33] [DEBUG] VNC error before receiving server init
[20170810-17:02:33] [DEBUG] VNC error before receiving pixel format
[20170810-17:02:33] [DEBUG] VNC error before receiving name length
[20170810-17:02:33] [DEBUG] VNC error before receiving name
[20170810-17:02:33] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20170810-17:02:33] [DEBUG] Closed socket 19 (AF_INET 0.0.0.0:56802)
[20170810-17:02:33] [DEBUG] xrdp_wm_log_msg: some problem
[20170810-17:02:33] [DEBUG] xrdp_mm_module_cleanup
[20170810-17:02:33] [DEBUG] VNC mod_exit
[20170810-17:02:33] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:57298)
[20170810-17:02:45] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20170810-17:02:46] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20170810-17:02:46] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20170810-17:02:46] [DEBUG] return value from xrdp_mm_connect 0
[20170810-17:02:46] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20170810-17:02:46] [DEBUG] xrdp_wm_log_msg: started connecting
[20170810-17:02:49] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:02:53] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:02:56] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:00] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:03] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:07] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:10] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:14] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:17] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:21] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:24] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:28] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:31] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:35] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:38] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:42] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:45] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:49] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:52] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:56] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:03:59] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:03] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:06] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:10] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:13] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:17] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:20] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:24] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:27] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:31] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:34] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:38] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:39] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20170810-17:04:39] [CORE ] shutting down log subsystem...
[20170810-17:04:42] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:45] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:49] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:52] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:56] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:04:59] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:03] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:06] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:10] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:13] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:17] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:20] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:24] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:27] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:31] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:34] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:38] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:41] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:45] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:48] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:52] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:55] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:05:59] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:06:02] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:06:06] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:06:09] [DEBUG] Closed socket 19 (AF_UNIX)
[20170810-17:06:10] [INFO ] starting xrdp with pid 3721
[20170810-17:06:10] [INFO ] listening to port 3389 on 0.0.0.0
[20170810-17:07:32] [INFO ] Socket 12: AF_INET connection received from 192.168.0.133 port 46736
[20170810-17:07:32] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20170810-17:07:32] [DEBUG] Closed socket 12 (AF_INET 192.168.0.134:3389)
[20170810-17:07:32] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20170810-17:07:32] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20170810-17:07:32] [DEBUG] TLSv1.2 enabled
[20170810-17:07:32] [DEBUG] TLSv1.1 enabled
[20170810-17:07:32] [DEBUG] TLSv1 enabled
[20170810-17:07:32] [DEBUG] Security layer: requested 3, selected 1
[20170810-17:07:32] [INFO ] connected client computer name: debian
[20170810-17:07:32] [INFO ] TLS connection established from 192.168.0.133 port 46736: TLSv1.2 with cipher AES256-GCM-SHA384
[20170810-17:07:32] [DEBUG] xrdp_00000f84_wm_login_mode_event_00000001
[20170810-17:07:32] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20170810-17:07:32] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20170810-17:07:45] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20170810-17:07:46] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20170810-17:07:46] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20170810-17:07:46] [DEBUG] return value from xrdp_mm_connect 0
[20170810-17:07:46] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20170810-17:07:46] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170810-17:07:46] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20170810-17:07:49] [DEBUG] VNC error 1 after security negotiation
[20170810-17:07:49] [DEBUG] VNC error before sending share flag
[20170810-17:07:49] [DEBUG] VNC error before receiving server init
[20170810-17:07:49] [DEBUG] VNC error before receiving pixel format
[20170810-17:07:49] [DEBUG] VNC error before receiving name length
[20170810-17:07:49] [DEBUG] VNC error before receiving name
[20170810-17:07:49] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20170810-17:07:49] [DEBUG] Closed socket 19 (AF_INET 0.0.0.0:58226)
[20170810-17:07:49] [DEBUG] xrdp_wm_log_msg: some problem
[20170810-17:07:49] [DEBUG] xrdp_mm_module_cleanup
[20170810-17:07:49] [DEBUG] VNC mod_exit
[20170810-17:07:49] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:58722)

xrdp-sesman.log

[20170810-17:01:29] [DEBUG] libscp initialized
[20170810-17:01:29] [INFO ] starting xrdp-sesman with pid 3158
[20170810-17:01:29] [INFO ] listening to port 3350 on 127.0.0.1
[20170810-17:02:29] [INFO ] A connection received from 127.0.0.1 port 57298
[20170810-17:02:30] [INFO ] ++ created session (access granted): username alex, ip 192.168.0.133:40692 - socket: 12
[20170810-17:02:30] [INFO ] starting Xvnc session...
[20170810-17:02:30] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:5910)
[20170810-17:02:30] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:6010)
[20170810-17:02:30] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:6210)
[20170810-17:02:30] [DEBUG] Closed socket 10 (AF_INET 127.0.0.1:3350)
[20170810-17:02:30] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20170810-17:02:30] [DEBUG] Closed socket 10 (AF_INET 127.0.0.1:3350)
[20170810-17:02:30] [INFO ] Xvnc :10 -auth .Xauthority -geometry 1024x768 -depth 16 -rfbauth /home/alex/.vnc/sesman_alex_passwd:10 -bs -nolisten tcp -localhost -dpi 96  
[20170810-17:02:30] [CORE ] waiting for window manager (pid 3231) to exit
[20170810-17:02:31] [CORE ] window manager (pid 3231) did exit, cleaning up session
[20170810-17:02:31] [INFO ] ++ terminated session:  username alex, display :10.0, session_pid 3227, ip 192.168.0.133:40692 - socket: 12
[20170810-17:02:45] [INFO ] A connection received from 127.0.0.1 port 57306
[20170810-17:02:46] [INFO ] ++ created session (access granted): username alex, ip 192.168.0.133:40692 - socket: 12
[20170810-17:02:46] [INFO ] starting Xorg session...
[20170810-17:02:46] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5910)
[20170810-17:02:46] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6010)
[20170810-17:02:46] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6210)
[20170810-17:02:46] [DEBUG] Closed socket 5 (AF_INET 127.0.0.1:3350)
[20170810-17:02:46] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20170810-17:02:46] [DEBUG] Closed socket 5 (AF_INET 127.0.0.1:3350)
[20170810-17:02:46] [INFO ] setpriv --no-new-privs Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log  
[20170810-17:02:56] [ERROR] X server for display 10 startup timeout
[20170810-17:02:56] [CORE ] waiting for window manager (pid 3368) to exit
[20170810-17:02:56] [ERROR] X server for display 10 startup timeout
[20170810-17:02:56] [ERROR] another Xserver might already be active on display 10 - see log
[20170810-17:02:56] [DEBUG] aborting connection...
[20170810-17:02:56] [CORE ] window manager (pid 3368) did exit, cleaning up session
[20170810-17:02:56] [INFO ] ++ terminated session:  username alex, display :10.0, session_pid 3367, ip 192.168.0.133:40692 - socket: 12
[20170810-17:06:10] [INFO ] shutting down sesman 1
[20170810-17:06:10] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20170810-17:06:10] [CORE ] shutting down log subsystem...
[20170810-17:06:10] [DEBUG] libscp initialized
[20170810-17:06:10] [INFO ] starting xrdp-sesman with pid 3720
[20170810-17:06:10] [INFO ] listening to port 3350 on 127.0.0.1
[20170810-17:07:45] [INFO ] A connection received from 127.0.0.1 port 58722
[20170810-17:07:46] [INFO ] ++ created session (access granted): username alex, ip 192.168.0.133:46736 - socket: 12
[20170810-17:07:46] [INFO ] starting Xvnc session...
[20170810-17:07:46] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:5910)
[20170810-17:07:46] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:6010)
[20170810-17:07:46] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:6210)
[20170810-17:07:46] [DEBUG] Closed socket 10 (AF_INET 127.0.0.1:3350)
[20170810-17:07:46] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20170810-17:07:46] [DEBUG] Closed socket 10 (AF_INET 127.0.0.1:3350)
[20170810-17:07:46] [INFO ] Xvnc :10 -auth .Xauthority -geometry 1024x768 -depth 16 -rfbauth /home/alex/.vnc/sesman_alex_passwd:10 -bs -nolisten tcp -localhost -dpi 96  
[20170810-17:07:46] [CORE ] waiting for window manager (pid 3978) to exit
[20170810-17:07:47] [CORE ] window manager (pid 3978) did exit, cleaning up session
[20170810-17:07:47] [INFO ] ++ terminated session:  username alex, display :10.0, session_pid 3976, ip 192.168.0.133:46736 - socket: 12

Please, if you have any ideas / suggestions how to instal XRDP I would be happy!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 74 (10 by maintainers)

Most upvoted comments

I created the script called /usr/libexec/xrdp/startwm-local.sh containing the two lines (revised version:)

#!/bin/sh
exec dbus-launch --exit-with-x11 /usr/libexec/xrdp/startwm-bash.sh

Then in the config file /etc/xrdp/sesman.ini where it says DefaultWindowManager write startwm-local.sh as the value.

I’m still not sure whose fault this is, because if I start vncserver manually then GNOME fires up no problem inside it. There is something about the xrdp environment that causes GNOME not to start its own dbus.

I too can’t run xrdp on modern distributions out of box, but can with some modifications.

For Ubontu 17.04: dpkg-reconfigure xserver-xorg-legacy and switch allowed_users=anybody. This because of better X11 security in modern distributions. Then install mate and modify /etc/xrdp/startwm.sh:

#!/bin/sh
# xrdp X session start script (c) 2015 mirabilos
# published under The MirOS Licence

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

#original:
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession

#modified:
export LOGNAME=$USER
export LIBGL_ALWAYS_INDIRECT=1

mate-session
#gnome-session
#startxfce4
#unity

At least this configuration works for me with xrdp from repo.

Hi, I had similar problem in my CentOS7 VM. The reason was using of python3.6 by default. I defined PATH to python3.6 at the head of PATH: export PATH=/opt/anaconda3/bin:$PATH CentOS uses python2 by default and after the PATH change I got the problem with xrdp. The following change in the PATH definition fixed the problem: export PATH=$PATH:/opt/anaconda3/bin

GNOME does seem a bit temperamental to start up. On Fedora 24 it worked most of the time, and I now have it working on Fedora 26 but I had to hack the startwm script to start a dbus. Without starting a dbus, I get this output from gnome-session:

** (process:25696): WARNING **: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused

My fix is to name the following startwm script in the sesman.ini config:

$ cat /usr/libexec/xrdp/startwm-local.sh 
#!/bin/sh
exec dbus-launch /usr/libexec/xrdp/startwm-bash.sh

+1 for this issue.

I was able to get xrdp running on kali by simply moving away from gnome.

apt install lxde xrdp tigervnc-standalone-server                                                                                                               
sudo update-alternatives --config x-session-manager
  #chose lxsession
service xrdp-sesman start
service xrdp start

Not ideal but better than nothing. Hope this helps someone like it helped me. 😃

Simplified from https://forums.kali.org/showthread.php?34751-How-to-set-up-xrdp-on-the-AWS-Kali-image

Logout out of your console gnome session. Then try to login through xrdp. Try to use some other user that you know for sure is not logged in.

I do xrdp connection prior to any logins

untitled

so this this irrelevant. Will use xfce, too tired of banging with gnome. Thanks for help anyway.

I would try:

  1. Logout out of your console gnome session. Then try to login through xrdp.
  2. Try to use some other user that you know for sure is not logged in.
  3. Try to install vanilla Fedora (most recent). Install xrdp and xrdp-selinux. Then xrdp will just work. Again, this user should not be logged in when you are connecting with xrdp.

@Suncatcher What I did on 17.10;

  1. Replace gdm3 with lightdm, make sure login with X11 session, install mate and xrdp from repo.
  2. Config /etc/X11/Xwrapper.config with allowed_users=anybody, needs_root_rights=no
  3. /etc/xrdp/startwm.sh contents:
#!/bin/sh
# xrdp X session start script (c) 2015 mirabilos
# published under The MirOS Licence

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

#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession

export LOGNAME=$USER
export LIBGL_ALWAYS_INDIRECT=1

mate-session

I have physical 17.04 installation. With xrdp from repo doesn’t work for me too (mate-session works fine). Seems build from source is necessary.

xrdp works with gnome: My setup: Ubuntu 17.04 installed with gnome desktop xrdp 0.9.4 compiled from sources according to the debian8 documentation on the wiki /etc/X11/Xwrapper.conf

allowed_users =anybody
needs_root_rights=no

startwm.sh (or ~/.xsession)

/usr/lib/gnome-session/gnome-session-binary --session=gnome

(the /usr/bin/gnome-session script doesn’t work)

@Suncatcher I’m on Ubuntu 17.04. No, out of box it don’t works. I write how to run it above (Mate also must be installed).