How to enable .xsession-errors file/log?

Google gives me loads of people wanting to how to limit size, disable it, but I cannot find anything on how to get one. So I can check it when I need to.
 
Maybe this helps:
/usr/local/etc/X11/xdm/Xsession

Code:
# redirect errors to a file in user's home directory if we can
errfile="$HOME/.xsession-errors"
if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null )
then
        exec > "$errfile" 2>&1
else
...
 
Maybe this helps:
/usr/local/etc/X11/xdm/Xsession

Code:
# redirect errors to a file in user's home directory if we can
errfile="$HOME/.xsession-errors"
if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null )
then
        exec > "$errfile" 2>&1
else
...
humm.. that is in here, but I'm not doing xdm.

this is as far as my X11 goes.
Code:
$ ls /usr/local/etc/X11/
xinit       xorg.conf.d
[code]
 
I might doubt if the .xsession-errors is being written without running an xsession (which is, according to the manpage, what xdm does).
 
even so, after I looked at your first post, a thought came to mind, I do not even think I installed the full xorg this time around. just min and its xfonts-pkg. I was thinking I could maybe use it for this one error I'm getting.
Code:
XIO:  fatal IO error 0 (No error: 0) on X server "unix:0.0"
      after 86 requests (85 known processed) with 0 events remaining.
I fixed this one program I wrote for Linux that now works in FreeBSD, but then I got that error and it killed my program after about 6 images being set to desktop.
 
With minimal X and no X login manager, this is what I use to get the Xserver running with the i3 window manager:
Code:
startx ~/.xinitrc i3 >& ~/.xsession.log
My .xinitrc does nothing more than set some font paths and finally does an exec $1.
 
With minimal X and no X login manager, this is what I use to get the Xserver running with the i3 window manager:
Code:
startx ~/.xinitrc i3 >& ~/.xsession.log
My .xinitrc does nothing more than set some font paths and finally does an exec $1.
I'm using slim, this is what I put in .xinitrc
Code:
[userx@FreeBSD64ssd ~]$ cat .xinitrc
#!/usr/bin/env bash

echo "$(date) :-: $1" >> ~/started

errfile="$HOME/.xsession-errors"
if [ -z "$HOSTNAME" ]; then
    errfile="$HOME/.xsession-errors"
else
    errfile="$HOME/.xsession-errors-$HOSTNAME"
fi
exec $1

I do not know if it is working or not because I do not know if I get errors or not to check it. There is no .xsession-errors file though.
 
You probably want to change the last line from
Code:
exec $1
to
Code:
exec $1 &>> ${errfile}
it's something
Code:
[userx@FreeBSD64ssd ~]$ cat .xsession-errors
/usr/local/bin/startxfce4: X server already running on display unix:0.0
console.log: WebExtensions: new intermediate certificate added
console.log: WebExtensions: signatures re-verified
Log warning: The log 'Services.Common.RESTRequest' is configured to use the preference 'services.common.log.logger.rest.request' - you must adjust the level by setting this preference, not by using the level setter

oh yeah no & after $1 . that puts it in the background....
 
Back
Top