0

I installed Ubuntu 22.04 from quick create and everything works fine with Gnome. However I want to switch to KDE and installed that and also this is working fine in Hyper V local mode. If I connect via XRDP however, Gnome is still used. I changed /etc/xrdp/startwm.sh and commented out the last two lines and added exec startkde:

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

However this is not working and in local mode I can see these errors in /var/log/xrdp.log:

[20231017-13:52:43] [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
[20231017-13:52:43] [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
[20231017-13:52:43] [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
[20231017-13:52:43] [ERROR] xrdp_process_data_in: xrdp_process_loop failed
[20231017-13:52:43] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20231017-13:52:44] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed

I also found How to configure XRDP to start cinnamon as default desktop session and tried

echo "startkde" > ~/.Xclients

chmod u+x ~/.Xclients

sudo systemctl restart xrdp.service

However this is also not working. What is wrong?

Just saw the /etc/xrdp/startubuntu.sh file and this looks like it should be changed, too:

#!/bin/sh
# DESKTOP_IMG: This file was created/modified by the Desktop Image build process
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
exec /etc/xrdp/startwm.sh

I tried it with

export KDE_SESSION_VERSION=5
export DESKTOP_SESSION=plasma
export XDG_CURRENT_DESKTOP=KDE
exec /etc/xrdp/startwm.sh

However still not working.

jan
  • 253

2 Answers2

1

The more sane solution if you want desktop to be per-user is:

~/.xsession

startplasma-x11

~/.xsessionrc

export KDE_SESSION_VERSION=5
export DESKTOP_SESSION=plasma
export XDG_CURRENT_DESKTOP=KDE
0

My solution was nearly correct, only startplasma-x11 instead of startkde was necessary!

Summary:

/etc/xrdp/startubuntu.sh:

#!/bin/sh
# DESKTOP_IMG: This file was created/modified by the Desktop Image build process
export KDE_SESSION_VERSION=5
export DESKTOP_SESSION=plasma
export XDG_CURRENT_DESKTOP=KDE
exec /etc/xrdp/startwm.sh

Last 3 lines of /etc/xrdp/startwm.sh:

#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
exec startplasma-x11
jan
  • 253