Issue with configuration of .xsession-errors

Questions about software.
User avatar
ilu
Posts: 2496
Joined: 09 Oct 2013 12:45

Issue with configuration of .xsession-errors

Postby ilu » 04 Jan 2018 13:57

In orderto debug my session problem with firefox I started looking at .xsession-errors. The file is huge - well not as huge as some other users reported but still big - and, what annoys me, is constantly written to. The culprit is a java app I'm using for downloads whose debug level seems to be set at "eXXXtra VERBOSE". I've already filed a bug. Is there a way to stop specifically that app from writing to .xsession-errors?

Edit: It seems I'm alone with that problem - do we have any setting raising the verbosity?

Internet search says that for programs started via GUI STDERR and maybe also STDOUT gets redirected into ~/.xsession-errors by the display manager via a shell script- does that ring any bells? Schoelje,maybe?

User avatar
ilu
Posts: 2496
Joined: 09 Oct 2013 12:45

Re: Chatty app spamming .xsession-errors

Postby ilu » 04 Jan 2018 22:00

It took me some time to figure this out. Starting the app via terminal shows that it is indeed really chatty on STDOUT.

Code: Select all

java -Xms128M -Xmx1G -jar /opt/mediathekview/MediathekView.jar  1>~/out.log 2>~/err.log
This lsof output tells me that xfce4-session, xfwm4 and java all direct STDERR as well as STDOUT into .xsession-errors, right?

Code: Select all

xfce4-ses 3871      0r      CHR                1,3      0t0     6090 /dev/null
xfce4-ses 3871      1w      REG               8,72 10884301  2883624 ~/.xsession-errors
xfce4-ses 3871      2w      REG               8,72 10884301  2883624 ~/.xsession-errors
...
xfwm4   3881      0r      CHR                1,3      0t0     6090 /dev/null
xfwm4   3881      1w      REG               8,72 10886407  2883624 ~/.xsession-errors
xfwm4   3881      2w      REG               8,72 10886407  2883624 ~/.xsession-errors
...
java    4187      0r      CHR                1,3        0t0     6090 /dev/null
java    4187      1w      REG               8,72   11007379  2883624 ~/.xsession-errors
java    4187      2w      REG               8,72   11007379  2883624 ~/.xsession-errors
It seems that all other users don't get STDOUT redirected into ~/.xsession-errors but I'm still waiting for definitive answers. Ubuntu seems to redirect both to /dev/null. So why is SolydX different?

Could somebody with access to SolydK or another distro please check the STDOUT conf with

Code: Select all

pgrep java
lsof -p <PID of java>
and look for the FDs 0, 1 and 2?

User avatar
bas_otten
Posts: 212
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: Issue with configuration of .xsession-errors

Postby bas_otten » 06 Jan 2018 15:15

Hi ilu,
I reproduced your scenario on SolydK9. As you can see below, the stdout and stderr output of MediathekView(java) are redirected to something like 'pipe'. When comparing SolydX, the way stdout messages of MediathekView are showing up in ~/.xsession-errors is not happening like that in SolydK. Despite searching, I have not been able to figure out what determines the redirection of different applications stdout and stderr on various Desktops. What comes to mind is /etc/X11/Xsession, but it's not that one. Or is it lightdm, somehow? As far as I'm aware, on KDE the verbosity of application output into ~/.xsession-errors is controlled by ~/.config/kdebugrc and ~/.kde/share/config/kdebugrc, but for Xfce I don't know.

Code: Select all

root@bashostv:/ #>>> lsof -p `pgrep java` 2>/dev/null | grep ' [012][rw]'
java    2511  bas    0r     FIFO               0,10      0t0   26303 pipe
java    2511  bas    1w     FIFO               0,10      0t0   20411 pipe
java    2511  bas    2w     FIFO               0,10      0t0   20412 pipe

root@bashostv:/ #>>> lsof 2>/dev/null | grep xsession
startkde  1099              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
startkde  1099              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
start_kde 1188              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
start_kde 1188              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kdeinit5  1191              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kdeinit5  1191              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
klauncher 1195              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
klauncher 1195              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1195 1196         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1195 1196         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1195 1197         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1195 1197         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kded5     1198              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kded5     1198              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1198 1200         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1198 1200         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1198 1204         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1198 1204         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
KCupsConn 1198 1221         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
KCupsConn 1198 1221         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QThread   1198 1222         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QThread   1198 1222         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
Qt\x20bea 1198 1298         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
Qt\x20bea 1198 1298         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kaccess   1220              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kaccess   1220              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1220 1224         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1220 1224         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1220 1225         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1220 1225         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kwrapper5 1275              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kwrapper5 1275              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
ksmserver 1276              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
ksmserver 1276              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1276 1277         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1276 1277         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1276 1278         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1276 1278         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kwin_x11  1279              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kwin_x11  1279              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1279 1294         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1279 1294         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1279 1454         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1279 1454         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QQmlThrea 1279 1748         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QQmlThrea 1279 1748         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kwin_x11  1279 1758         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kwin_x11  1279 1758         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QQmlThrea 1279 1774         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QQmlThrea 1279 1774         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
llvmpipe- 1279 1867         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
llvmpipe- 1279 1867         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
llvmpipe- 1279 1868         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
llvmpipe- 1279 1868         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kactivity 1551              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
kactivity 1551              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1551 1580         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QXcbEvent 1551 1580         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1551 1738         bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
QDBusConn 1551 1738         bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
file.so   2158              bas    1w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
file.so   2158              bas    2w      REG               0,37        20816      19117 /tmp/bas.xsession-errors
tail      2457              bas    3r      REG               0,37        20816      19117 /tmp/bas.xsession-errors
As you can see, I redirected the xsession-errors to a tmpfs location, to avoid negative performance and wear impact, as described in https://forums.solydxk.com/viewtopic.ph ... 536#p54827.

User avatar
ilu
Posts: 2496
Joined: 09 Oct 2013 12:45

Re: Issue with configuration of .xsession-errors

Postby ilu » 07 Jan 2018 22:03

Thank you for checking. It seems to be something special about xfce. It would be nice if somebody else could check on XFCE to make sure that I did not bork my install somehow. It's not necessary to download mediathekview, it's enough to post the output of

Code: Select all

 lsof -p `pgrep java` 2>/dev/null | grep ' [012][rw]'
Thank you for condensing that into one command, Bas.

User avatar
bas_otten
Posts: 212
Joined: 19 Oct 2013 12:22
Location: Netherlands

Re: Issue with configuration of .xsession-errors

Postby bas_otten » 08 Jan 2018 20:39

Hi ilu,
You did not bork your system, at least not in this regard ;)
I compared my findings on K directly with a live session of X on VB: on X I get the same directions of java's stdout and stderr to ~/.xsession-errors as you do. Why that is, however, I cannot tell so far. You might take a look at https://unix.stackexchange.com/question ... manager-go.


Return to “Software”

Who is online

Users browsing this forum: No registered users and 5 guests