Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been tinkering with fingerprint-gui as well as X/xrandr resolution settings.

When I start my machine, it boots up normally. As soon as X and gnome have finished starting, it logs me off automatically and brings me back to the gdm login prompt with the user list. Then I am, however, able to log in using "Ubuntu Desktop Fail-safe".

I've checked the list of start-up applications, but everything seems fine there.

I can't yet put my finger on what exactly might be responsible for this: X, gnome or some messed up pam.d settings. So far I've checked /var/logs/X11/xorg.0.log, /var/logs/auth.log and ~/.xsession-errors. In addition, I don't quite seem to understand the "interplay" between X, GDM, GNOME, GNOME-policykit, PAM.d and all that.

Are there any other relevant log files that could point me to what's broken?


  • Ubuntu 10.10 Maverick Meerkat
  • IBM/Lenovo Thinkpad R60, ATI Radeon x1400 Mobility
  • all updates installed
  • Linux User 1 year+,
share|improve this question

For posterity - I'll leave a solution here...

This can happen if you try and run an X server under root privilege while logged in to your account... so you could have typed:

sudo startx

or were messing with xauth as root.

This will create a file in your home directory ~/.Xauthority which is owned by root.

When you try to login the system will try to read this file but will not have permission and log you back out.

The solution is to

  • go out to a terminal Ctrl+Alt+F1
  • log in to your account
  • type: sudo mv ~/.Xauthority ~/old.Xauthority
  • now log out by typing "logout"
  • get back to dm with Ctrl+Atl+F7
  • you should be able to log in now!

If you don't have sudo privilege, you have to get someone who does on your system

share|improve this answer
Thanks! This saved me. – VF1 Jul 23 '13 at 8:06
Awesome. If I had as much rep as I have on other SE sites, you would get instantly a bounty on this answer! I just spend several hours; re-installing all gnome packages, reconfiguring everything to default, removing caches and settings, playing around with lightdm, and so on and so on and so on... I was banging my head why a guest-sessions worked and I couldn't log in properly. Thank you, thank you, thank you! And of course +1 – halirutan Dec 18 '14 at 20:47

I know this is an ancient question but it just happened to me. It turned out that the last line of my ~/.profile was returning a non-zero exit code. Since the bash 'source' command returns as its exit code the last exit code of the script sourced, I imagine this upset the xsession init.

You may see evidence of this in ~/.xsession-errors (I did), but then you might not if your last profile command returns an error code without printing any output.

So take a look at the bottom of each of your login scripts. Worked for me.

share|improve this answer

Without seeing the log files it's difficult to say where the bug comes(use or report a new bug to Launchpad by running ubuntu-bug xorg-server, but try look gdm's logs at /var/log/gdm/ (that folder may not be accessible without root access).

share|improve this answer

This happened to me recently. I solved my issue by looking in the lightdm logs (/usr/log/lightdm/*). In my case, it was trying to load a session called gnome-shell when none existed. I copied /usr/share/xsession/gnome.session to /usr/share/xsession/gnome-shell.session and things worked out fine.

(Note, I realize that this probably would not work for the asker, as Ubuntu wasn't using LightDM in 10.10. However, if the question had been asked today, or if someone searches today, this is a likely answer.)

share|improve this answer

it might happen that your PATH variable is messed up. To fix the issue:

Press Alt+Ctrl+F5 in login screen

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Now log back in to the front screen and try to login.

share|improve this answer

This happened to me (on Xfce) after copying a .mov file to the Desktop. Using ssh to remote login and deleting the file resolved the issue

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.