In current version the Xsession
script will use tempfile
if ~/.xsession-errors
was inaccessible for any reason or is a symlink to /dev/null and thus litter in /tmp
if you try to block writing to the default filename.
Changing the line to exec >> /dev/null 2>&1
as you did almost worked: the file was still created by the code above but wasn't written to. Changing a line higher in the script where ERRFILE
is set should've been good unless the target is a symlink (pay attention to all the checks that are performed with that variable).
I've written a patch for the upstream of /etc/X11/Xsession
:
https://salsa.debian.org/xorg-team/xorg/-/merge_requests/7
If you apply the patch and set NOXSESSIONERRORS
environment variable either for your user or system-wide all stderr will be redirected to /dev/null
. You will have to re-apply the patch after every x11-common
package update until it is merged and published.
More info: https://askubuntu.com/a/212311/20275