Bug#596634: x11-common: /etc/X11/Xsession always appends to .xsession-errors
Package: x11-common
Version: 1:7.5+6
Severity: important
Is there any reason why /etc/X11/Xsession appends to the logfile
instead of creating it:
exec >>"$ERRFILE" 2>&1
If the argument is that you want to be able to see what errors
happened in the last session, so you don't want to clear them out
before the user gets to review them, they can always log into the
console and review the errors before they restart X.
Meanwhile, the non-priveleged user has no opportunity to make sure
their .xsession-errors file is emptied when their session starts,
because if they empty it unconditionally in their own ~/.xsession
file, then they'll lose any error message output before ~/.xsession
executes.
This is particularly insidious when the disk is full because something
was writing lots of crap to ~/.xsession-errors. That crap is not
cleared out when the user's session restarts, and so that user can't
log in because their Xauthority file can't be modified, should they
opt for Xauthority to be created in their home directory (or their
desktop manager will get stuck when it tries to read-write-modify
its dotfiles).
All of this talk for the past 5 years that maybe we should have a
mechanism for limiting the size of logfiles is just skirting around
the issue. The logfile never shrinks if it is never truncated at X
startup! Fix that one line, and the whole issue goes away! Disk full
because of too much crap emitted to ~/.xsession-errors? Well, just
let the unsophisticated user log out and log back in again.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages x11-common depends on:
ii debconf [debconf-2.0] 1.5.35 Debian configuration management sy
ii debianutils 3.4 Miscellaneous utilities specific t
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
x11-common recommends no packages.
x11-common suggests no packages.
-- debconf information:
x11-common/xwrapper/actual_allowed_users: console
x11-common/xwrapper/allowed_users: Console Users Only
Reply to: