Subject: Bug#923: .xsession-x2go-errors improvements

From: Orion Poplawski <[email-masked]>
Date: Tue, 18 Aug 2015 09:46:04 -0600

Package: x2goserver
Version: 4.0.1.19

First issue is that ~/.xsession-x2go-errors is always appended to so it grows
forever.  It should at least get rotated to .old file.

Second is with shared NFS home directories, multiple X2Go sessions get logged
to the same file which is confusing.  I would suggest putting the host name
into the log file name.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       [email-masked]
Boulder, CO 80301                   http://www.nwra.com

---

From: Mike DePaulo <[email-masked]>
Date: Tue, 18 Aug 2015 23:25:52 -0400

> forever.  It should at least get rotated to .old file.

I wholeheartedly agree. Plus there are weird instances where a command will
make it grow to GB in size quickly.

In general, I believe in following what the local X.org server sessions do.
However, since I am often debugging issues with why apps are not working
properly with X2Go, I would rather rotate than delete.

> to the same file which is confusing.  I would suggest putting the host name

I wholeheartedly agree. Gluster (for HA home dirs) is affected too.

-Mike

---

From: Mihai Moldovan <[email-masked]>
Date: Sun, 23 Aug 2015 17:56:17 +0200

> forever.  It should at least get rotated to .old file.

I'm not sure that's an issue per se. Isn't that normal behavior for DEs/Login
Managers?

It's inconvenient, but I remember other software doing exactly the same thing,
so it's at least "consistent". But maybe I'm wrong. I see ~/.xsession-errors and
~/.xsession-errors.old on my system using LightDM. So you're probably right. But
that's for LightDM, not sure how other LMs or systems without a LM handle this?

> to the same file which is confusing.  I would suggest putting the host name

Okay, but that will break for systems with misconfigured/unset hostnames or
environments where every system has the same hostname. Additionally, multiple
sessions also get logged to the same file, so merely going for one file per host
name feels half-baked.

Mihai

---

From: Orion Poplawski <[email-masked]>
Date: Mon, 24 Aug 2015 09:16:29 -0600

> that's for LightDM, not sure how other LMs or systems without a LM handle this?

On Fedora, /etc/X11/xinit/Xsession does:

    errfile="$HOME/.xsession-errors"
    if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null ); then
        chmod 600 "$errfile"
        [ -x /sbin/restorecon ] && /sbin/restorecon $errfile
        exec > "$errfile" 2>&1

So it overwrites it without backup.  I would prefer a backup.  Perhaps I'll
file a bug...

> sessions also get logged to the same file, so merely going for one file per host

I'm happy to have a suggestion for another key.  My one worry would be to not
use a key that is completely unique so we end up with a proliferation of
xsession error files like we already have with x2go session dirs.