| Summary: | INVOCATION_ID and JOURNAL_STREAM environment variables should not be propagated from plasmashell | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | ctxnop |
| Component: | Startup process | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | minor | CC: | kde, kde, nate |
| Priority: | VLO | ||
| Version First Reported In: | 6.0.4 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
ctxnop
2024-05-17 14:12:54 UTC
Just tried with an X11 session and I have the exact same issue. In theory systemd application launching in combination with systemd services would not have this problem as the env would come from the application launch env. So it's potentially made worse by in 21fce404e05d7180afb897fde4d1c81ea6a5ae96 in kio. FWIW gnome-shell behaves the same. The systemd runner could/should simply remove these variables. I discussed it a bit on the systemd's mailing list, but did not received a clear answer: https://lists.freedesktop.org/archives/systemd-devel/2024-May/050277.html I know that gnome-shell behave the same, but gnome-terminal remove these variables. To me it feels as the wrong place to do that, because it would mean that ALL terminal implementations have to do the exact same "workaround". And there is a lot of different terminal out there... I did not go deep in KDE's code, so I cannot say for sure that it should be systemd side or not. From what I understood, the systemd's part is fine. If called correctly, the spawned process should receive a correct INVOCATION_ID and JOURNAL_STREAM. So that it would means that KDE's way of using systemd to spawn processes is faulty? I tried to patch plasma-shell to remove the two variables (as stated in the mailing list), and everything worked well and solved my initial issue. In any case, if systemd runner or KDE's part is fixed so that systemd correctly provide the two variables to the spawned process, it would means that spawning a terminal (e.g. konsole) will provide a new INVOCATION_ID and JOURNAL_STREAM to that terminal, and the terminal's childs (shell and any application run from within that terminal) will inherit from it. Leading to applications having JOURNAL_STREAM defined and, consequently, writing to the sd-journal of the terminal, instead of the stdout. Does that means that an issue should be opened to all terminals? As stated above, gnome-shell is already exclude few variables, maybe all terminals should do the same? Actually, I was wondering if it should rather be an inclusion list instead? I mean, naively, when starting a terminal, I expect it to be a new fresh and clean environment, and I expect the launched shell to set any initial variables values, just like if it was a TTY. |