1

There are files in /tmp created on each user login that look like .xsession-errors or some other log. Current name for example is /tmp/filercrEUk. I don't see them getiting erased after logout and I don't need them.

Example head content

Xsession: X session started for user at п'ятниця, 5 липня 2019 14:34:41 +0300
localuser:user being added to access control list
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
startkde: Starting up...
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher'
kdeinit5: Launched KLauncher, pid = 498, result = 0
kdeinit5: opened connection to :0
kdeinit5: preparing to launch 'libkdeinit5_kded5'
kdeinit5: Launched KDED, pid = 503 result = 0
int_ua
  • 8,892

1 Answers1

0

These files are created by /etc/X11/Xsession:

ERRFILE=$HOME/.xsession-errors

# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
  [ ! -L "$ERRFILE" ]; then
  chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
  if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
    message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
             "\"$ERRFILE\"; look for session log/errors in" \
             "\"$TMPDIR/xsession-$USER\"."
  fi
else
  errormsg "unable to create X session log/error file; aborting."
fi

And the only way is to patch it. It spefically includes check for ~/.xsession-errors being symlink. I've made a patch that adds checking for env var $NOXSESSIONERRORS. You can define it in /etc/environment.

int_ua
  • 8,892