XRDP fails kde for non-root account

Hello all,

Following this instruction I installed xrdp on Suse 15.1 : https://www.youtube.com/watch?v=Qtm_evqIoJo
The computer uses kde plasma desktop.

~> plasmashell --version
plasmashell 5.12.8
~> kf5-config --version
Qt: 5.9.7
KDE Frameworks: 5.55.0
kf5-config: 1.0

RDP connection is then established to windows PC.
In the instructions the author says that KDE desktop is fine in this RDP usage when connecting as root.
However trying to connect as regular user results in brief start of the session and the immediate closing.
Workaround provided in the tutorial is to use xfce:

echo "xfce4-session" > .xsession

I am looking for a solution to again be able to use kde plasma desktop in RDP.

I was trying the solution given here : http://sigkillit.com/tag/xrdp/

sudo echo "startkde" > ~/.Xclients
sudo chmod +x ~/.Xclients
sudo systemctl restart xrdp.service

But it does not allow regular user to connect.

So far setting desktop to xfce4 is the only way I can make the connection as regular user.

I am surprised that login as root vs regular user is the determining factor to enable connection.

I want to use this for remote support of a family member and that will include desktop settings.

Any solutions?

Cheers,
Gert

I do not know anything about Windows, so I cannot really help you with this, but I see that you mention log in in the desktop as root. That is something you never should do.

Do you have another (local) login session as this user?

I tested under Tumbleweed (sorry, this is the only VM where I have KDE installed) and it works as long as there is no other user session. If I am logged in KDE on console attempt to start Xrdp session as the same user hangs; it hangs even if I log out on console, apparently session is not cleaned up properly.

I understand that Leap 15.1 and Tumbleweed are not directly comparable, but this confirms that in principle KDE under Xrdp works as normal user. Try to log out locally, make sure no user processes are left, kill them if needed.

@arvidjaar](https://forums.opensuse.org/member.php/69818-arvidjaar)

That solved the issue. When I have no other activity on the laptop I can RDP into the system as my user account. Great!
But it raises the question : What’s goes wrong here? I was able to make the reverse test and while I am connected via RDP try login as user account on the physical laptop and it FAILS. Very confusing! KDE/Plasma not able to run multiple instances? :frowning:

For now it’s OK. I’ll just tell my relatives to start the computer and not touch it when I am helping them with remote stuff.

Cheers,
Gert

Assuming “no other activity” means “the same user is not logged in” - nothing. This works as designed.

KDE/Plasma not able to run multiple instances?

of the same user. You can have several graphical sessions with different users.

This is current trend in Linux desktop development. Both GNOME and KDE do not support multiple concurrent sessions for the same user (GNOME pretty explicitly, KDE probably by the way of implementation). It does not look like it is going to change in the neat future.

I do not know how you are using this remote session, but note that xorgxrdp in Linux is not comparable to remote desktop in Windows - it starts completely separate virtual X11 server instead of providing access to current session on console (like in Windows). Usually when I hear “remote support” I expect you are interested in accessing shared remote desktop so you both can see what other user is doing and can take control if necessary.

If you really just need the way to log in graphically while other user is active, simply create user dedicated to remote support and use it so it won’t conflict with users your relatives are using.

Gert,

You may find this thread useful that I started when I had a similar issue with Tumbleweed:

https://forums.opensuse.org/showthread.php/546967-XRDP-Plasma-gives-a-blank-window

Also worth noting that the session started by XRDP depends on /etc/xrdp/startwm.sh. Some versions use the contents of .xsession others start a session with a wm based upon the distribution.

If you want to set up a better supported solution for what you’re describing,

The official openSUSE documentation describes setting up VNC a number of different ways… But your primary options are primarily “one time” vs “persistent” sessions. Persistent sessions support shared desktops while one time sessions are primarily used to login and view your own session.

https://doc.opensuse.org/documentation/leap/reference/html/book-opensuse-reference/cha-vnc.html

The VNC protocol is different than, but from your point of view accomplishes the same thing… enable viewing a remote desktop on another machine.
The openSUSE documentation also describes how to install the Remmina client which can be used for both RDP and VNC sessions.

As for your adventures setting up and using RDP…
Be wary following YouTube video authored by “anybody.” Ask about recommended setups in these Forums for hopefully better advice. The video itself is honest about logging in as root options (he does say use sudo or relog on in as root but doesn’t say to use the “su -” command vs logging in as root directly). And, he is honest about his limited understanding what he’s doing.
Instead of what is described in the video, installing xrdp is better done using the following package
https://software.opensuse.org/package/xrdp

The ArchLinux page for XRDP describes how to setup for KDE and Gnome(which also likely is the recommended method for other DE like XFCE, but YMMV)
https://wiki.archlinux.org/index.php/xrdp

But in general VNC is recommended over RDP solutions.

TSU