https://bugs.kde.org/show_bug.cgi?id=487147

--- Comment #5 from ctx...@gmail.com ---
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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to