https://bugs.kde.org/show_bug.cgi?id=485075
Alexis-Emmanuel Haeringer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Ever confirmed|0 |1 Status|REPORTED |CONFIRMED --- Comment #4 from Alexis-Emmanuel Haeringer <[email protected]> --- I am also affected by this issue (or similar side-effects of how Konsole currently spawns its shell processes). My practical use case: I dynamically update user environment variables during a session (specifically XDG variables, like redirecting XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/data}" via environment.d). Because Konsole processes do not dynamically inherit systemd's updated activation environment, I am forced to restart my entire graphical session just to have new terminal tabs apply these changes. While fixing this specific environment propagation issue, it might be worth considering a broader transition to spawning Konsole sessions/tabs as transient systemd user services (similar to gnome-terminal-server's architecture, as discussed in systemd's upstream tracker: https://github.com/systemd/systemd/issues/12938#issuecomment-591180454 ). Beyond fixing the environment inheritance, it seems to me that this approach could bring significant long-term security and robustness benefits to Plasma 6: 1. Privilege Separation and Least Privilege Spawning terminal sessions as distinct systemd user services/scopes allows the application of strict systemd-level sandboxing directives (e.g., ProtectSystem=, ProtectHome=, PrivateTmp=, or IPAddressDeny=) to specific terminal instances. This ensures a compromised process in one Konsole tab cannot easily compromise the rest of the graphical session (KWin/Plasmashell) since they wouldn't share the same process-tree constraints. 2. CGroup Isolation and Resource Control Systemd group allocation (cgroups v2) allows the system to enforce strict resource limits (CPU, Memory, I/O) per terminal window or tab. This mitigates local Denial of Service (DoS) risks where a runaway user script or heavy compile job in Konsole completely freezes the entire Plasma Desktop. 3. Auditing and Lifetime Tracking Managing shell sessions via systemd user services ensures that background processes spawned by a terminal are reliably tracked and cleaned up upon session termination (using systemd's KillMode), preventing "orphan" or lingering processes from running invisibly in the user space after Konsole is closed. This would align Konsole with modern Linux process management and security standards. Thanks for looking into this! (& thank you for your time and dedication to making Plasma 6 so great!) -- You are receiving this mail because: You are watching all bug changes.
