gdm should not hardcode name of ~/.xsession-errors

Bug #382879 reported by Jonathan Reed
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gdm
Fix Released
Wishlist
gdm (Ubuntu)
Fix Released
Wishlist
Ubuntu Desktop Bugs

Bug Description

When an error occurs during login, the gdm slave will redirect errors to ~/.xsession-errors. The gdm daemon will then attempt to display the contents of the file to the user. If the user's home directory is on a networked filesystem that the daemon process does not normally have permission to read (NFS, AFS, etc), the user will never get to see the errors.

The user then has to find a way to login (perhaps in a tty session) and read their .xsession-errors file simply to be able to see what failed. This makes it extremely difficult to troubleshoot login problems in a network filesystem environment.

Ideally, gdm should allow the administrator to define the path of the errors file. In the traditional Xsession script (/etc/X11/Xsession), this is accomplished by changing the value of $ERRFILE. It's unfortunate that gdm lacks this functionality.

Relevant information:

jdreed@infinite-loop:/etc/X11$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
jdreed@infinite-loop:/etc/X11$ apt-cache policy gdm
gdm:
  Installed: 2.20.10-0ubuntu2
  Candidate: 2.20.10-0ubuntu2
  Version table:
 *** 2.20.10-0ubuntu2 0
        500 http://ubuntu.media.mit.edu jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

 * Is this reproducible?
 * If so, what specific steps should we take to recreate this bug?

 This will help us to find and resolve the problem.

Changed in gdm (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you also try the new gdm codebase on karmic?

Revision history for this message
Jonathan Reed (jdreed) wrote :

To reproduce:

1) Set up an AFS infrastucture with Kerberos authentication, or an NFS infrastructure where the local gdm daemon (running as root) does not have permission to read a user's remote home directory.
2) Ensure that the login process fails (perhaps by setting the user's shell to tcsh and referencing a nonexistent variable).
3) Verify that the GDM error dialog complains about being unable to read $HOME/.xsession-errors due to lack of permissions.

The primary problem is that GDM assumes that as root, it will always have access to the user's home directory. This is patently false, particularly if the user's home directory is not located on the local system.

If it would be simpler to mark this as a wishlist bug, please do so.

I will attempt to test Karmic.

Revision history for this message
Sebastien Bacher (seb128) wrote :

did you have any change to try on karmic?

Revision history for this message
Evan Broder (broder) wrote :

It looks like GDM still hard-codes the ~/.xsession-errors path (see GDM_SESSION_DEFAULT_PATH in daemon/gdm-session-worker.c).

There is, of course, a slightly different problem. As of gdm 2.80, it seems that GDM no longer displays a popup if your login session lasts less than 10 seconds. "Now we have two problems"

Changed in gdm (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in gdm (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Low → Wishlist
Revision history for this message
Sebastien Bacher (seb128) wrote :

Not sure why would anybody want to change the log names but if whoever feel strongly about that should argue upstream too

Revision history for this message
Jonathan Reed (jdreed) wrote :

>Not sure why would anybody want to change the log names

If you re-read my original bug report, you'll see that we're more interested in changing the path of the file than its name. GDM, like most GNOME products, assumes that all home directories are stored on local disk and that processes running as root will have full access to user's home directories. This is of course not true in any environment that uses network filesystems for home directories. As a result, GDM tries to display the ~/.xsession-errors to a user, and can't. If the path of the file could be changed to, e.g., /tmp, then GDM would have no problem displaying it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Right, not sure if allowing changing the log file is the right way though, the gdm user code should perhaps just copy this log somewhere else in such cases, to discuss upstream in any case since the bug is not ubuntu specific

Revision history for this message
David Biesack (david-biesack-sas) wrote :

also, for those of us who have a shared network home directory, logging onto two machines causes them
to stomp on the same .xsession-errors file. It would be nice to have a per-host .xsession-errors file.

Someone suggested we "argue upstream" so I've done that: https://bugzilla.gnome.org/show_bug.cgi?id=704879

Revision history for this message
Jeremy Bicha (jbicha) wrote :

This was fixed in gdm 3.6 which saves user logs to $XDG_CACHE_HOME/gdm/session.log by default.

Changed in gdm (Ubuntu):
status: Confirmed → Fix Released
Changed in gdm:
importance: Undecided → Unknown
status: New → Unknown
Changed in gdm:
importance: Unknown → Wishlist
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.