Xorg misbehaves when user home directory is missing

Bug #516929 reported by PaulReiber
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
Triaged
Wishlist
Unassigned
Declined for Lucid by Sebastien Bacher
Declined for Maverick by Sebastien Bacher

Bug Description

This is more a case of unwieldy behavior than an actual bug. Steps to recreate: (1) create a user (2) rename their home directory (3) log in to X as that user.

After a number of error messages pop up, you're left with a semi-running X session. No panels are running so there's no top-bar menu. Also there's no right-button menu on the desktop.

So... There's NO CLEAN WAY TO LOG OUT. Even the two three-fingered-salutes (ctrl-alt-del and ctrl-alt-backspace) fail to shut down X. An experienced end user will switch to tty1 or some other virtual terminal and kill the X server from the command line. However, a less experienced end user will probably end up powering down the computer to recover from this.

I understand that the steps-to-recreate are a process that won't happen very often, if at all, during normal use, but there are situations such as migrating a user from one machine to another machine where this sort of thing can and will happen.

I can think of a dozen or more ways that a solution could be put in place, but I'm not sure which of them would be preferable so I'll leave that to the experts.

ProblemType: Bug
Architecture: amd64
Date: Thu Feb 4 00:59:19 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/Xorg
MachineType: Dell Inc. Latitude E6500
Package: xserver-xorg-core 2:1.6.4-2ubuntu4.1
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: root=UUID=64193dcd-8a8f-4115-9ba0-cf31eeb7f02f ro quiet splash
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu10
 libgl1-mesa-glx 7.6.0-1ubuntu4
 libdrm2 2.4.14-1ubuntu1
 xserver-xorg-video-intel 2:2.9.0-1ubuntu2.1
 xserver-xorg-video-ati 1:6.12.99+git20090929.7968e1fb-0ubuntu1
SourcePackage: xorg-server
Uname: Linux 2.6.31-17-generic x86_64
dmi.bios.date: 07/31/2009
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A14
dmi.board.asset.tag: RSTOPS-PBR
dmi.board.name: 0W612R
dmi.board.vendor: Dell Inc.
dmi.chassis.asset.tag: RSTOPS-PBR
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA14:bd07/31/2009:svnDellInc.:pnLatitudeE6500:pvr:rvnDellInc.:rn0W612R:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E6500
dmi.sys.vendor: Dell Inc.
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.31-17-generic

Tags: apport-bug
Revision history for this message
PaulReiber (paulreiber) wrote :
summary: - Xorg misbehaves when user home directory is missing
+ Xorg misbehaves when user home directory is missingFya6bri
Changed in xorg-server (Ubuntu):
status: New → Confirmed
summary: - Xorg misbehaves when user home directory is missingFya6bri
+ Xorg misbehaves when user home directory is missing
Revision history for this message
Andreas Noteng (andreas-noteng) wrote :

Thanks for reporting this bug and any supporting documentation. This bug seems to be unrelated to Xorg, not sure exactly which component, but it is at least Gnome related. Changing to gnome-session. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

affects: xorg-server (Ubuntu) → gnome-session (Ubuntu)
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

What do you expect gnome-session to do about this in this case then? There are multiple components in your desktop session which won't work properly if there is no home directory (eg, dbus, gconf etc will all fail). It's not entirely clear what you expect to happen

Changed in gnome-session (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Andreas Noteng (andreas-noteng) wrote :

As a sidenote: ctrl+alt+backspace isn't supposed to work anymore. al least not by default, se: https://wiki.ubuntu.com/X/Config/DontZap

Revision history for this message
PaulReiber (paulreiber) wrote : Re: [Bug 516929] Re: Xorg misbehaves when user home directory is missing

Wow... well I was trying to stay away from designing a solution, and
stick with describing the problem.

But, since you asked, I'll take a stab at it. How about this:

A small component named maybe home_dir_check could be added, which would
see if the home directory existed or not. If it exists, it can simply
exit. If it doesn't exist, it would pop up a dialog box saying so.

That dialog box could have two buttons, "proceed anyway" and
"logout". If the user chooses "proceed anyway" it might say "Are you
sure? You will probably have to kill Xorg from a virtual terminal if
you proceed". That second dialog box would have choices "really
proceed anyway" and "logout", which would do exactly what they say they
would do.

Sure there are a lot more fancy things that could be done, but the most
useful things (like creating a directory for the user using the same
functionality that happens during user creation) would require getting
root privs, which might require some capabilities from one of those
components that aren't running... yuck... better to stick with something
simple.

Hope this helps; I'll be happy to work through the details of other
options and ideas if anyone has them.

Kind regards,
-Paul

Chris Coulson wrote:
> What do you expect gnome-session to do about this in this case then?
> There are multiple components in your desktop session which won't work
> properly if there is no home directory (eg, dbus, gconf etc will all
> fail). It's not entirely clear what you expect to happen
>
> ** Changed in: gnome-session (Ubuntu)
> Importance: Undecided => Low
>
> ** Changed in: gnome-session (Ubuntu)
> Status: Confirmed => Incomplete
>
> ** Changed in: gnome-session (Ubuntu)
> Assignee: (unassigned) => Ubuntu Desktop Bugs (desktop-bugs)
>
>

Revision history for this message
PaulReiber (paulreiber) wrote :

Andreas Noteng wrote:
> As a sidenote: ctrl+alt+backspace isn't supposed to work anymore. al
> least not by default, se: https://wiki.ubuntu.com/X/Config/DontZap
>
>
So I just read this, after penning a response for how we might work
around the bug. If the note at the very end of the page is correct,
Alt-SysRq-K is the new "Ctrl-Alt-Backspace"... which I did not know, and
which most end-users will not know.

So that leads me to a somewhat simpler solution that could be
implemented more easily:

We might have a program that checks for the existence of the users home
directory. If the directory does not exist, the program would simply
put up a dialog box with the message:

"No user home directory; X will not function correctly. You can press
Alt-SysRq-K to kill your session."

It could have an "ok" button but even that's not needed, since there's
really nothing else to be done other than to give the user a way to get
out of the mess they've gotten themselves into.

Simpler is better!
-Paul

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Well, someone is welcome to work on the implementation they think is best, but there are probably more useful ways of investing time. I don't think this isn't something the desktop team will be spending any time on.

Changed in gnome-session (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
importance: Low → Wishlist
status: Incomplete → New
Revision history for this message
PaulReiber (paulreiber) wrote :

How about this instead:

    Well, I'm sure there are a lot of novice programmers out there who
    would love to learn the process of how to integrate a new component
    into gnome-session, and this is an awesome opportunity for someone
    new to get their hands dirty.

    The desktop team's pretty busy, but we'll ask them if they know any
    programmers who might want to get a chance to contribute something
    useful to the project, without being part of the critical path.

    Thanks for taking the time to help make gnome-session a truly
    bulletproof infrastructure!

...here's hoping...
-pbr

Chris Coulson wrote:
> Well, someone is welcome to work on the implementation they think is
> best, but there are probably more useful ways of investing time. I don't
> think this isn't something the desktop team will be spending any time
> on.
>
> ** Changed in: gnome-session (Ubuntu)
> Importance: Low => Wishlist
>
> ** Changed in: gnome-session (Ubuntu)
> Status: Incomplete => New
>
> ** Changed in: gnome-session (Ubuntu)
> Assignee: Ubuntu Desktop Bugs (desktop-bugs) => (unassigned)
>
>

Revision history for this message
Geir Ove Myhr (gomyhr) wrote :

I've run Hardy on a few computers where the home directories were NFS-mounted. Because of some NFS-problems they would sometimes lose the connection, and thus the users would have no home directory. In that case, there would always be a notification box right after login which said something like "I cannot find the home directory /home/username. This is llikely to break things, but you may try to log in if you wish. Click OK to log in or Cancel to cancel." (in a much better wording).

I'm not sure if it was gdm or some other component that did this. The computers had gdm, but otherwise both ubuntu-desktop and kubuntu-desktop was installed and I would usually log in to KDE, but I guess without the home directory there was no way for gdm to know that. So is it the new, fast, and feature stripped gdm that shipped with Karmic that turned this into a problem?

Revision history for this message
PaulReiber (paulreiber) wrote : Re: [Bug 516929] Re: Xorg misbehaves when user home directory is missing

Good question. In fact, that's part of why I think a simpler, tighter
"Here's the keystrokes to abort your session" style message might be
preferable to something which recommended the user log out - users
home directories might be on NFS, or might be on a USB stick, or who
knows where... so how to word things generically, and how to code
things which accommodate all of the scenarios, makes this a much more
subtle and interesting problem than it appears on the surface.

Kind regards,
-Paul Reiber
Mobile: (210)854-8253
Home: (210)545-2487
Email: <email address hidden>
Web: http://bit.ly/reiber

On Fri, Feb 5, 2010 at 8:34 AM, Geir Ove Myhr <email address hidden> wrote:
> I've run Hardy on a few computers where the home directories were NFS-
> mounted. Because of some NFS-problems they would sometimes lose the
> connection, and thus the users would have no home directory. In that
> case, there would always be a notification box right after login which
> said something like "I cannot find the home directory /home/username.
> This is llikely to break things, but you may try to log in if you wish.
> Click OK to log in or Cancel to cancel." (in a much better wording).
>
> I'm not sure if it was gdm or some other component that did this. The
> computers had gdm, but otherwise both ubuntu-desktop and kubuntu-desktop
> was installed and I would usually log in to KDE, but I guess without the
> home directory there was no way for gdm to know that. So is it the new,
> fast, and feature stripped gdm that shipped with Karmic that turned this
> into a problem?
>
> --
> Xorg misbehaves when user home directory is missing
> https://bugs.launchpad.net/bugs/516929
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Changed in gnome-session (Ubuntu):
status: New → Confirmed
Revision history for this message
Roman A. Taycher (rtaycher) wrote :

(Lucid) When no home directories are present because of NFS problems it automatically logs out for me, giving no message.

It might be a decent amount of work but it would be really nice if in case of no home directory Gnome would make a temporary home directory in /tmp, set home to $HOME variable to say /tmp/temphome/$USER and delete it when logging out(or on next login in case of crash/poweroff) and thow up a warning about nothing being saved permenenatly because your home directory could not be found.

Changed in gnome-session (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
PaulReiber (paulreiber) wrote : Invitation to connect on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Paul

Paul Reiber
Linux Specialist at Rackspace Hosting
San Antonio, Texas Area

Confirm that you know Paul Reiber:
https://www.linkedin.com/e/r7oize-gzm0t1f8-37/isd/6236734999/ru5cB4dI/?hs=false&tok=2j5y3MnDYBB581

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/r7oize-gzm0t1f8-37/hj3buCiK7GXjnLzmVVsROEyKKArKVmIkLP59LzV/goo/516929%40bugs%2Elaunchpad%2Enet/20061/I2167185030_1/?hs=false&tok=0ujwnjDb4BB581

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

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.