Login loop with gdm and lightdm, startx works

7,179

The ~/.xsession-errors.old reveals errors found on your ~/.profile file. You should check the syntax and fix the offending line.

Share:
7,179
Lobe
Author by

Lobe

Updated on September 18, 2022

Comments

  • Lobe
    Lobe over 1 year

    I am running 12.10. Attempting to login via gdm lands me back at the login page. The behaviour is the same for when I switched to lightdm. Logging in with guest is fine, and logging in with a test account I created is fine.

    If I access tty1, login with my account and then startx, I get to my desktop fine.

    Any ideas? I have tried chowning Xauthority and then removing it but to no success. The problem appears to be a setting in my account, although I have no idea what as when I last used my computer before the problem occurred I didn't do anything abnormal (i.e. system updates or changing any user settings).

    UPDATE: SOLVED

    Solved thanks to help from Braiam. My ~/.xsession-errors.old file had the following:

    /usr/sbin/lightdm-session: 34: /home/*username*/.profile: source: not found
    /usr/sbin/lightdm-session: 42: /home/*username*/.profile: Syntax error: "(" unexpected
    

    I had recently added some lines to my .profile to provide useful git information in my prompt. It worked fine when logging in via tty1 and then running startx, however it seems it was stopping me from logging in via gdm / lightdm

    • Lobe
      Lobe over 10 years
      Thanks for the tip. xsession errors pointed me to ~/.profile. Turns out I had recently updated my .profile and had completely forgotten disregarded it (as the additions I made were functional when operating on tty1. Commenting out the offending lines solved the problem. Thanks again