I finally solved it. This is my solution to have unattended remote login using Rustdesk.
First the installation of Rustdesk:
Download Rustdesk deb-package from https://github.com/rustdesk/rustdesk/releases and install it using sudo dpkg -i rustdesk-1.4.9-x86_64.deb (which is currently the latest version).
Configure the network connections (also see RustDesk – the alternative to TeamViewer and AnyDesk | Arno Welzel on how to host your own relay-server with encryption):
Start Rustdesk and start the service by clicking “Start service” in the main window:
Connect from a client - Rustdesk will now ask you to choose, which parts of the screen to share. Since it is running as service, this will be stored persistent, so you only have to do this once.
Now to make it work in the login screen with SDDM as well:
Install X11 with sudo apt install xorg.
Configure SDDM with two files in /etc/sddm.conf.d/ - in my case I use UHD (4K) and also need scaling of 200%, adjust this as needed.
/etc/sddm.conf.d/10-default.conf:
# This is the default configuration to make sure, SDDM starts properly
#
# KDE itself will write the login related settings in kde_settings.conf
[General]
# DisplayServer=wayland
DisplayServer=x11
# Note: when using X11 the cursor size in kde_ettings.conf must then also be 48 and not 24!
GreeterEnvironment=QT_SCREEN_SCALE_FACTORS=2, QT_FONT_DPI=192
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
[X11]
EnableHiDPI=true
ServerArguments=-nolisten tcp -dpi 192
/etc/sddm.conf.d/kde_settings.conf:
Note: this file was auto generated by KDE, but you need to change the cursor size from 24 to 48 if you want to use a cursor with a size of 24 since X11 behaves different in this case.
[General]
HaltCommand=
RebootCommand=
[Theme]
Current=breeze
CursorSize=48
CursorTheme=Bibata-Modern-Classic
Font=Noto Sans,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
[Users]
MaximumUid=60000
MinimumUid=1000
[X11]
ServerArguments=-dpi 192
Now Rustdesk can also be used to log in in SDDM, since this uses X11. When the desktop session starts, the connection will be closed and automatically opened again to get access to the Wayland desktop session.
Why it works now and did not in the past - I don’t know. Maybe some updates over the last weeks fixed some bugs here as well. Also Rustdesk itself works better now.
I did not have time yet, to check, if this would also work with the Plasma login manager. Does anyone know, if the Plasma login manager already dropped support for X11 or will do so in the future?