Bug 494231 - When init is not systemd, krdpserver cannot be managed by the KCM with no user feedback.
Summary: When init is not systemd, krdpserver cannot be managed by the KCM with no use...
Status: RESOLVED FIXED
Alias: None
Product: KRdp
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.1.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-07 07:29 UTC by Steve Vialle
Modified: 2025-06-30 14:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
video report krdp server (3.46 MB, video/mp4)
2025-06-29 19:03 UTC, José Rafael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Vialle 2024-10-07 07:29:15 UTC
SUMMARY
On systems without systemd[user-units], krdpserver is not autostarted at login or by the toggle in kcm_krdpserver.
KDE/Plasma already has a service manager, since when is it policy to break portability by hardcoding systemd dependencies in new applications?

STEPS TO REPRODUCE
1. Run something other than systemd as init (sysvinit, openrc, runit, s6, dinit, BSD rc.d, etc. etc.)
2. Toggle "Enable RDP server" on
3. Toggle "Autostart on login" on

OBSERVED RESULT
krdpserver process is not launched, "Enable RDP server" toggle reverts to off upon reopening kcm_krdpserver.
krdpserver is not autostarted at login, despite "Autostart on login" being enabled.
No discoverable error message is generated, STDERR prints "org.kde.krdp.kcm: Toggling KRDP Server to  true over QDBus" and nothing more.
Manually starting krdpserver works, "'Remote control" notification and systray appear, but status is not reflected in kcm_krdpserver (toggle remains off).

EXPECTED RESULT
krdpserver starts when toggled on, autostarts at login when configured to do so, and cleanly terminates with plasma session (as other plasma "background services" do), regardless of init system in use.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.6.54-gentoo-dist (64-bit)
Graphics Platform: Wayland
Comment 1 José Rafael 2025-06-29 18:59:43 UTC
I've noticed that it's also happening on Fedora, both traditional and Fedora Kinoite Atomic
I enable it on the switch but the service is not enabled in systemD and because of that I can't use remote access

Fedora Traditional 42:
➜  ~ kinfo
MESA-INTEL: warning: Haswell Vulkan support is incomplete
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-4200U CPU @ 1.60GHz
Memory: 8 GiB of RAM (7.7 GiB usable)
Graphics Processor 1: Intel® HD Graphics 4400
Graphics Processor 2: NVIDIA GeForce GT 740M

Fedora Kinoite Atomic 42

joserafael@Ibyte-Fly2:/var/home/joserafael$ kinfo
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-2410M CPU @ 2.30GHz
Memory: 8 GiB of RAM (7.7 GiB usable)
Graphics Processor: llvmpipe

I'll send a video gif here
Comment 2 José Rafael 2025-06-29 19:03:20 UTC
Created attachment 182785 [details]
video report krdp server
Comment 3 David Edmundson 2025-06-30 09:29:40 UTC
>KDE/Plasma already has a service manager,

No it does not. 

It has an autostart service which isn't sufficient for runtime changes. 
We use systemd because it's the right tool.

We shouldn't be failing silently, so I'll make it hide the option/throw a warning
Comment 4 Bug Janitor Service 2025-06-30 13:41:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/krdp/-/merge_requests/107
Comment 5 David Edmundson 2025-06-30 14:28:40 UTC
Git commit 1776d388d7e4438b1b8bb33bd7b6a18f8bb358f6 by David Edmundson.
Committed on 30/06/2025 at 13:40.
Pushed by davidedmundson into branch 'master'.

kcm: Clarify requriements for service manager

krdpserver calls into systemd to manage the service.

Users without systemd are reponsible for figuring this out themselves,
as we don't have a service manager to work with.

The user shouldn't be presented with controls that don't work, so tis
patch hides them when a service manager is not available.

M  +6    -0    src/kcm/kcmkrdpserver.cpp
M  +2    -0    src/kcm/kcmkrdpserver.h
M  +10   -0    src/kcm/ui/main.qml

https://invent.kde.org/plasma/krdp/-/commit/1776d388d7e4438b1b8bb33bd7b6a18f8bb358f6