Bug 447768

Summary: The GUI should not be run as root but only prompt for the root password for loading the logs (security & Wayland issues)
Product: [Applications] KSystemLog Reporter: myndstream
Component: generalAssignee: Nicolas Ternisien <nicolas.ternisien>
Status: REPORTED ---    
Severity: normal CC: fabian, null, xenoidaltu
Priority: NOR    
Version First Reported In: 20.08   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description myndstream 2022-01-01 10:51:04 UTC
SUMMARY
KSystemLog is started as root to read the log files. However, it is bad practice to  run GUIs with root privileges due to security vulnerability issues and because this doesn't work in Wayland. I recently switched to Wayland and KSystemLog doesn't work anymore.

Relevant info can be found here for example: https://wiki.archlinux.org/title/Running_GUI_applications_as_root

Here is a bug report about Wayland not running applications as root: https://bugzilla.gnome.org/show_bug.cgi?id=772875

STEPS TO REPRODUCE
1. Switch to Wayland on Debian11/KDE (upper left of the login screen)
2. Try to run KSystemLog, entering the root password

OBSERVED RESULT
Does not start. (It only starts when starting without sudo from the console, not via the .desktop entry in the menu or via the root GUI Wayland workaround.)

EXPECTED RESULT
It should start and after starting prompt the user for the root password to read the root-owned log files.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
KSystemLog: "4:20.12.0-1"

ADDITIONAL INFORMATION
Comment 1 Fabian Vogt 2022-01-29 20:53:55 UTC
For making kdesu/xdg-su work with XWayland at least you need https://invent.kde.org/plasma/kwin/-/merge_requests/665 (5.22+).
Comment 2 fanzhuyifan 2024-05-02 20:11:52 UTC
*** Bug 456793 has been marked as a duplicate of this bug. ***
Comment 3 fanzhuyifan 2024-05-02 20:11:58 UTC
*** Bug 486442 has been marked as a duplicate of this bug. ***