[opensuse-support] STDOUT of programs started from DE menu in syslog
Hi list, I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars). If I start the application from a terminal, I get the output there, and nothing in syslog. Is there an easy way to change that behavior? I see (man systemd.exec) that in case of services you can prevent that using the StandardOutput= option. But how to do this for .desktop applications? Who is initiating that redirect on first place? Is it the DE, the window manager, or something else? -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 02/12/2018 12.23, Peter Suetterlin wrote:
Hi list,
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
If I start the application from a terminal, I get the output there, and nothing in syslog.
Is there an easy way to change that behavior? I see (man systemd.exec) that in case of services you can prevent that using the StandardOutput= option. But how to do this for .desktop applications? Who is initiating that redirect on first place? Is it the DE, the window manager, or something else?
What desktopand what openSUSE release are you using? Can you say some other program that shows that behaviour? I don't have kstars installed. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 02/12/2018 12.23, Peter Suetterlin wrote:
Hi list,
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
If I start the application from a terminal, I get the output there, and nothing in syslog.
Is there an easy way to change that behavior? I see (man systemd.exec) that in case of services you can prevent that using the StandardOutput= option. But how to do this for .desktop applications? Who is initiating that redirect on first place? Is it the DE, the window manager, or something else?
What desktopand what openSUSE release are you using?
Yuck. My bad, sorry. This is KDE Plasma on Tumbleweed. But I think it's a more general issue - another report came from some *buntu
Can you say some other program that shows that behaviour? I don't have kstars installed.
Unfortunately, no. Just checked, but the only similar entries I see are for org.kde.powerdevil - but that is rather started by (user)systemd, is it? Nothing else here. I supposed it happens for any program that outputs stuff to STDOUT when not connected to a tty, but that seems not true - just wrote a shell script that outputs something, and a desktop file for starting it, but that one doesn't show up either. So it seems specific to kstars, although the developer said he's not seeing it, or doing unusual things.... Will continue discussing with him :o -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 12/2/18 5:23 AM, Peter Suetterlin wrote:
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
Traditionally, that output went to ".xsession-errors" (or similar). My normal practice was to ignore that, unless I was debugging something. But, yes, now that goes to syslog. This is quite annoying. It clutters up syslog with lots of unimportant stuff. I used to occasionally browse "/var/log/messages", but now there is too much garbage there. I assume that this is a "systemd" feature (or misfeature). As far as I know, this is due to I/O being redirect at X11 startup, and that redirection is inherited by started applications. Since "systemd" is responsible for starting the graphic display service, I assume it is responsible for this change of behavior. I don't know how to change this. But maybe it is done in systemd unit files. -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
02.12.2018 21:24, Neil Rickert пишет:
On 12/2/18 5:23 AM, Peter Suetterlin wrote:
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
Traditionally, that output went to ".xsession-errors" (or similar).
My normal practice was to ignore that, unless I was debugging something.
But, yes, now that goes to syslog. This is quite annoying. It clutters up syslog with lots of unimportant stuff. I used to occasionally browse "/var/log/messages", but now there is too much garbage there.
I assume that this is a "systemd" feature (or misfeature).
Of course. Systemd also ate your kitten.
As far as I know, this is due to I/O being redirect at X11 startup, and that redirection is inherited by started applications. Since "systemd" is responsible for starting the graphic display service, I assume it is responsible for this change of behavior.
stdout/stderr are setup in display manager and inherited by all started processes (including X server), unless processes explicitly change them. Both gdm and sddm prefer journal and this is hardcoded.
I don't know how to change this. But maybe it is done in systemd unit files.
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 02/12/2018 21.22, Andrei Borzenkov wrote:
02.12.2018 21:24, Neil Rickert пишет:
On 12/2/18 5:23 AM, Peter Suetterlin wrote:
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
Traditionally, that output went to ".xsession-errors" (or similar).
My normal practice was to ignore that, unless I was debugging something.
But, yes, now that goes to syslog. This is quite annoying. It clutters up syslog with lots of unimportant stuff. I used to occasionally browse "/var/log/messages", but now there is too much garbage there.
I assume that this is a "systemd" feature (or misfeature).
Of course. Systemd also ate your kitten.
:-)
As far as I know, this is due to I/O being redirect at X11 startup, and that redirection is inherited by started applications. Since "systemd" is responsible for starting the graphic display service, I assume it is responsible for this change of behavior.
stdout/stderr are setup in display manager and inherited by all started processes (including X server), unless processes explicitly change them. Both gdm and sddm prefer journal and this is hardcoded.
Now I understand the issue. X in the past wrote to X.error or something. Now they send instead to the general syslog system, which means the journal or the syslog daemon captures the output. And some programs also sent default output there, so it ends in the same place. Systemd is innocent this time ;-) I was not fully aware of this. It is possible that some display manager doesn't do this :-? Apparently, I have kstars in my older laptop, so I tried - but I do not see entries in syslog. I did not go past the introduction, though, something failed. Oh, no, my mistake: I started it remotely via ssh session, so the output is in my ssh client terminal. I'll try later locally. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 02/12/2018 21.22, Andrei Borzenkov wrote:
stdout/stderr are setup in display manager and inherited by all started processes (including X server), unless processes explicitly change them. Both gdm and sddm prefer journal and this is hardcoded.
Ah. I read about this inheriting, but wasn't sure where it comes from. So starting an X session without a DM should not show that behavior? Have to try that...
Now I understand the issue.
Same here.
Systemd is innocent this time ;-)
But don't forget about the kitten!
Apparently, I have kstars in my older laptop, so I tried - but I do not see entries in syslog. I did not go past the introduction, though, something failed. Oh, no, my mistake: I started it remotely via ssh session, so the output is in my ssh client terminal. I'll try later locally.
I just tried at my computer at home that still runs Leap 42.3. There nothing ends up in syslog. But it's also a very old version of kstars (2.7.6 vs. now recent 3.0.0pre on my TW machine). -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 04/12/2018 15.44, Peter Suetterlin wrote:
Carlos E. R. wrote:
On 02/12/2018 21.22, Andrei Borzenkov wrote:
stdout/stderr are setup in display manager and inherited by all started processes (including X server), unless processes explicitly change them. Both gdm and sddm prefer journal and this is hardcoded.
Ah. I read about this inheriting, but wasn't sure where it comes from. So starting an X session without a DM should not show that behavior? Have to try that...
Now I understand the issue.
Same here.
Systemd is innocent this time ;-)
But don't forget about the kitten!
<https://youtu.be/qiPGvvcE3wQ?t=107> X-)
Apparently, I have kstars in my older laptop, so I tried - but I do not see entries in syslog. I did not go past the introduction, though, something failed. Oh, no, my mistake: I started it remotely via ssh session, so the output is in my ssh client terminal. I'll try later locally.
I just tried at my computer at home that still runs Leap 42.3. There nothing ends up in syslog. But it's also a very old version of kstars (2.7.6 vs. now recent 3.0.0pre on my TW machine).
I tried on the same laptop as previously, but this time locally (it runs Leap 15.0, and DM=sddm), and yes, a lot of entries appeared on the system log. However, using a syslog daemon you could filter out all that crap. With the journal you can't, it will flood and rotate fast. Or fill the disk. It appears to be using facility 1 (LOG_USER) at several levels. Now, if it used a local level, it would be easier. And of course, other graphical programs may do the same. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On Sunday, 2 December 2018 18:24:25 GMT Neil Rickert wrote:
On 12/2/18 5:23 AM, Peter Suetterlin wrote:
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
Traditionally, that output went to ".xsession-errors" (or similar).
My normal practice was to ignore that, unless I was debugging something.
But, yes, now that goes to syslog. This is quite annoying. It clutters up syslog with lots of unimportant stuff. I used to occasionally browse "/var/log/messages", but now there is too much garbage there.
I assume that this is a "systemd" feature (or misfeature).
There was chat a while back about systemd deprecating the journal forwarding to syslog config item as syslog was going to control the import of journal entries into syslog system itself. Not sure if this happened or not.
As far as I know, this is due to I/O being redirect at X11 startup, and that redirection is inherited by started applications. Since "systemd" is responsible for starting the graphic display service, I assume it is responsible for this change of behavior.
I don't know how to change this. But maybe it is done in systemd unit files.
-- opensuse:tumbleweed:20181129 Qt: 5.11.2 KDE Frameworks: 5.52.0 - KDE Plasma: 5.14.3 - kwin 5.14.3 kmail2 5.9.3 - akonadiserver 5.9.3 - Kernel: 4.19.4-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 03/12/2018 10.30, Ianseeks wrote:
On Sunday, 2 December 2018 18:24:25 GMT Neil Rickert wrote:
On 12/2/18 5:23 AM, Peter Suetterlin wrote:
I just noticed/realized that if I start an application via the DE menu, anything that this application prints to stdout is sent to systemd/journal/syslog. (in my case, it's kstars).
Traditionally, that output went to ".xsession-errors" (or similar).
My normal practice was to ignore that, unless I was debugging something.
But, yes, now that goes to syslog. This is quite annoying. It clutters up syslog with lots of unimportant stuff. I used to occasionally browse "/var/log/messages", but now there is too much garbage there.
I assume that this is a "systemd" feature (or misfeature).
There was chat a while back about systemd deprecating the journal forwarding to syslog config item as syslog was going to control the import of journal entries into syslog system itself. Not sure if this happened or not.
I don't understand this. Meaning that syslog daemons would no longer work? :-/ -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On Monday, 3 December 2018 09:54:10 GMT Carlos E. R. wrote:
On 03/12/2018 10.30, Ianseeks wrote: snip
I assume that this is a "systemd" feature (or misfeature).
There was chat a while back about systemd deprecating the journal forwarding to syslog config item as syslog was going to control the import of journal entries into syslog system itself. Not sure if this happened or not.
I don't understand this. Meaning that syslog daemons would no longer work? :-/
I honestly don't know, it was a few years ago. I remember LP talking about it in an article but i can't find the reference now. I was happy with the journal so i didn't follow it up at the time.
-- opensuse:tumbleweed:20181129 Qt: 5.11.2 KDE Frameworks: 5.52.0 - KDE Plasma: 5.14.3 - kwin 5.14.3 kmail2 5.9.3 - akonadiserver 5.9.3 - Kernel: 4.19.4-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 03/12/2018 13.06, Ianseeks wrote:
On Monday, 3 December 2018 09:54:10 GMT Carlos E. R. wrote:
On 03/12/2018 10.30, Ianseeks wrote: snip
I assume that this is a "systemd" feature (or misfeature).
There was chat a while back about systemd deprecating the journal forwarding to syslog config item as syslog was going to control the import of journal entries into syslog system itself. Not sure if this happened or not.
I don't understand this. Meaning that syslog daemons would no longer work? :-/
I honestly don't know, it was a few years ago. I remember LP talking about it in an article but i can't find the reference now. I was happy with the journal so i didn't follow it up at the time.
Well, if that was years ago, nothing of consequence happened, syslog daemons continue working very well. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On Monday, 3 December 2018 12:10:04 GMT Carlos E. R. wrote:
On 03/12/2018 13.06, Ianseeks wrote:
On Monday, 3 December 2018 09:54:10 GMT Carlos E. R. wrote:
On 03/12/2018 10.30, Ianseeks wrote: snip
I assume that this is a "systemd" feature (or misfeature).
There was chat a while back about systemd deprecating the journal forwarding to syslog config item as syslog was going to control the import of journal entries into syslog system itself. Not sure if this happened or not.
I don't understand this. Meaning that syslog daemons would no longer work? :-/
I honestly don't know, it was a few years ago. I remember LP talking about it in an article but i can't find the reference now. I was happy with the journal so i didn't follow it up at the time.
Well, if that was years ago, nothing of consequence happened, syslog daemons continue working very well.
I found this page and it looks like syslog-ng can do the reading of journal instead of syslog. https://news.opensuse.org/2018/04/30/syslog-ng-vs-systemds-journald/ -- opensuse:tumbleweed:20181130 Qt: 5.11.2 KDE Frameworks: 5.52.0 - KDE Plasma: 5.14.3 - kwin 5.14.3 kmail2 5.9.3 - akonadiserver 5.9.3 - Kernel: 4.19.5-1-default - xf86-video-nouveau: 1.0.15 -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 04/12/2018 08.57, Ianseeks wrote:
On Monday, 3 December 2018 12:10:04 GMT Carlos E. R. wrote:
On 03/12/2018 13.06, Ianseeks wrote:
On Monday, 3 December 2018 09:54:10 GMT Carlos E. R. wrote:
On 03/12/2018 10.30, Ianseeks wrote: snip
I assume that this is a "systemd" feature (or misfeature).
There was chat a while back about systemd deprecating the journal forwarding to syslog config item as syslog was going to control the import of journal entries into syslog system itself. Not sure if this happened or not.
I don't understand this. Meaning that syslog daemons would no longer work? :-/
I honestly don't know, it was a few years ago. I remember LP talking about it in an article but i can't find the reference now. I was happy with the journal so i didn't follow it up at the time.
Well, if that was years ago, nothing of consequence happened, syslog daemons continue working very well.
I found this page and it looks like syslog-ng can do the reading of journal instead of syslog.
https://news.opensuse.org/2018/04/30/syslog-ng-vs-systemds-journald/
And rsyslog does even better, as it does not need to read the journal files to get the data. When I say "syslog" I refer to all the variants. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
participants (5)
-
Andrei Borzenkov
-
Carlos E. R.
-
Ianseeks
-
Neil Rickert
-
Peter Suetterlin