One issue that come up from time to time, is that verbose programs
like The Gimp is filling up ~/.xsession-errors with garbage, and
leading to full disks in the worst case, or filling a users disk quote
in the slightly less bad case.

One proposal to solve this is to edit /etc/X11/Xsession to not create
the file.  A problem with this approach is that it give upgrade
problems when a new version of the file is provided in an upgraded
package.  It also make it impossible to get the xsession errors when
needed.

I gave the problem some thought this morning, and a better idea seem
to me to provide a Xsession.d fragment to do this instead.  By adding
/etc/Xsession.d/05debian-edu-noerrfile with content like this

  # This is a -*- shell-script -*- fragment called by /etc/X11/Xsession

  # Redirect all errors to /dev/null instead of $ERRFILE
  # (~/.xsession-errors by default), to avoid filling up users home
  # directory with error messages.  Allow the user to disable this by
  # creating ~/.xsession-errors-enable
  if [ ! -f "$HOME/.xsession-errors-enable" ] ; then
      # Report the change to the log file before switching
      echo "info: Redirecting xsession messages to /dev/null."
      echo "info: touch '$HOME/.xsession-errors-enable' to disable this."
      exec >> /dev/null 2>&1
  fi

It should have a low number to keep the content in ~/.xsession-errors short.

Do others believe this is a good idea to include by default in Debian
Edu (debian-edu-config, I guess)?  Or perhaps it should go into
x11-common instead, with a mechanism to enable or disable this for all
users at install time?

Happy hacking,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to