12

All, I was trying to get VNC working, making lots of changes that I don't recall now when I discovered after a restart that I could not login to Ubuntu 14.04. I believe I authenticate ok, but get returned to the login screen. I can log in as Guest and via Alt-F1 console.

I Googled the errors and tried lots of things but without success and am now clueless. see the output below. Note that XFCE does load ok, but I want to get back my lightdm.

I could really do with some advice and explanation as to what is going on here. Regards Martin

-rwxr-xr-x 1 martin martin 50 Mar 14 22:13 .Xauthority* (I went a little overboard granting permissions for this file - just in case.)

martin@thrio:~$ cat .xsession-errors
Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
init: gnome-session (Unity) main process (2745) terminated with status 1
init: Disconnected from notified D-Bus bus
init: logrotate main process (2596) killed by TERM signal
init: update-notifier-crash (/var/crash/_usr_lib_ibus_ibus-ui-gtk3.1000.crash) main process > (2645) killed by TERM signal
init: update-notifier-crash (/var/crash/_usr_lib_unity_unity-panel-service.1000.crash) main > process (2646) killed by TERM signal
init: upstart-dbus-session-bridge main process (2697) terminated with status 1
init: xsession-init main process (2705) killed by TERM signal
init: hud main process (2715) killed by TERM signal
init: unity-panel-service main process (2753) killed by TERM signal
init: window-stack-bridge main process (2620) killed by KILL signal

martin@thrio:~$ unity --replace
stop: Unknown job: unity-panel-service
start: Unknown job: unity-panel-service
compiz (core) - Info: Loading plugin: core
compiz (core) - Info: Starting plugin: core
Invalid MIT-MAGIC-COOKIE-1 keycompiz (core) - Fatal: Couldn't open display :0
compiz (core) - Info: Stopping plugin: core
compiz (core) - Info: Unloading plugin: core

It may be related to the display setting: I was originally trying to get VNC to work and trying to turn of the default encryption which appears not to work and some of the instructions I was trying to follow related to the display

From /var/log/lightdm/lightdm.log

[+522.72s] DEBUG: Session pid=2785: Authenticate result for user martin: Success  
[+522.72s] DEBUG: Session pid=2785: User martin authorized  
[+522.72s] DEBUG: Session pid=2785: Greeter requests session Ubuntu  
522.72s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session  
[+522.72s] DEBUG: Session pid=2785: Sending SIGTERM  
[+522.73s] DEBUG: Session pid=2785: Exited with return value 0  
[+522.73s] DEBUG: Seat: Session stopped  
[+522.73s] DEBUG: Seat: Greeter stopped, running session  
[+522.73s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1  
[+522.73s] DEBUG: Session pid=2845: Running command /usr/sbin/lightdm-session gnome-session   --session=Ubuntu  
[+522.73s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martin  
[+522.73s] DEBUG: Session pid=2845: Logging to .xsession-errors  
[+522.74s] DEBUG: Activating VT 7  
[+522.74s] DEBUG: Activating login1 session c4  
[+524.24s] DEBUG: User /org/freedesktop/Accounts/User1000 changed  
[+528.25s] DEBUG: Session pid=2845: Exited with return value 0  
[+528.25s] DEBUG: Seat: Session stopped  
[+528.25s] DEBUG: Seat: Stopping display server, no sessions require it  
[+528.25s] DEBUG: Sending signal 15 to process 2778  
[+528.36s] DEBUG: Process 2778 exited with return value 0  
[+528.36s] DEBUG: DisplayServer x-0: X server stopped  
[+528.36s] DEBUG: Releasing VT 7  
[+528.36s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0  
[+528.36s] DEBUG: Seat: Display server stopped  
[+528.36s] DEBUG: Seat: Active display server stopped, starting greeter  
[+528.36s] DEBUG: Seat: Creating greeter session  
[+528.36s] DEBUG: Seat: Creating display server of type x  
[+528.36s] DEBUG: Using VT 7  
[+528.36s] DEBUG: Seat: Starting local X display on VT 7  
[+528.36s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log  
[+528.36s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0  
[+528.36s] DEBUG: DisplayServer x-0: Launching X Server  
[+528.36s] DEBUG: Launching process 3516: /usr/bin/X -core :0 -seat seat0   -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch  
[+528.36s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0  
[+528.43s] DEBUG: Got signal 10 from process 3516  
[+528.43s] DEBUG: DisplayServer x-0: Got signal from X server :0  
[+528.43s] DEBUG: DisplayServer x-0: Connecting to XServer :0  
[+528.43s] DEBUG: Seat: Display server ready, starting session authentication  
[+528.43s] DEBUG: Session pid=3523: Started with service 'lightdm-greeter', username 'lightdm'  
[+528.44s] DEBUG: Session pid=3523: Authentication complete with return value 0: Success  
[+528.44s] DEBUG: Seat: Session authenticated, running command  
[+528.44s] DEBUG: Session pid=3523: Running command /usr/lib/lightdm/lightdm-greeter-  session /usr/sbin/unity-greeter  
[+528.44s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm  
[+528.44s] DEBUG: Session pid=3523: Logging to /var/log/lightdm/x-0-greeter.log  
[+528.45s] DEBUG: Activating VT 7  
[+528.45s] DEBUG: Activating login1 session c5  
[+528.57s] DEBUG: Session pid=3523: Greeter connected version=1.10.4  
[+528.69s] DEBUG: Session pid=3523: Greeter start authentication for martin  
[+528.69s] DEBUG: Session pid=3583: Started with service 'lightdm', username 'martin'  
[+528.70s] DEBUG: Session pid=3583: Got 1 message(s) from PAM  
[+528.70s] DEBUG: Session pid=3523: Prompt greeter with 1 message(s)  
[+529.73s] DEBUG: User /org/freedesktop/Accounts/User1000 changed  

martin@thrio:~$ uname -r  
3.13.0-46-generic  
martin@thrio:~$ lsmod|grep fglrx  
martin@thrio:~$   

martin@thrio:/var/log$ lshw -c video  
WARNING: you should run this program as super-user.  
  *-display              
       description: VGA compatible controller  
       product: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller  
       vendor: Intel Corporation  
       physical id: 2  
       bus info: pci@0000:00:02.0  
       version: 06  
       width: 64 bits  
       clock: 33MHz  
       capabilities: vga_controller bus_master cap_list rom  
       configuration: driver=i915 latency=0  
       resources: irq:48 memory:f7400000-f77fffff memory:e0000000-efffffff ioport:f000  (size=64)  
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.  
martin@thrio:/var/log$ modinfo  
modinfo: ERROR: missing module or filename.  

Additional info following review of

"Have you installed drivers some? Could you connect from some TTY (Ctrl+Alt+F1..F6) with any user?" No drivers - yes to TTY login

"Moved all files there to my /home dir (to have a copy) and tried to login using kdm (I use Kubuntu). To select kdm as login screen, I executed sudo dpkg-reconfigure lightdm and selected kdm. With kdm you can select a previous session or a default one. This was the way to go."

installed KDM (sudo apt-get install KDM) - during install I had an option to choose KDM or lightDM, chose lightDM. Rebooted - no change
moved home dir /home/martin to /home/martinbak and rebooted - no change

martin@thrio:~$ sudo dpkg-reconfigure kdm and rebooted - entered KDM shell - error "cannot enter home directory. using /." - still would not log in .  
martin@thrio:~$ sudo dpkg-reconfigure lightdm and switched back to lightdm - rebooted - same login loop  
martin@thrio:/home$ sudo mv martinbak martin and rebooted.  

Chown .Xauthority - This was checked previously and is correct
Chown /tmp - This was checked previously and is correct
" If not both, I'd recommend you either
1.dpkg-reconfigure lightdm
2.or uninstall, reinstall it."

dpkg-reconfigure has been tried
martin@thrio:~$ sudo apt-get purge lightdm
"Removing lightdm (1.10.4-0ubuntu2) ...
Purging configuration files for lightdm (1.10.4-0ubuntu2) ...
Removing user lightdm' ...
Warning: group
lightdm' has no more members.
**userdel: user lightdm is currently used by process 2092
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing package lightdm (--purge):
subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)" ** martin@thrio:~$ sudo apt-get install lightdm

It does not look like a clean removal and re-install.

"After almost giving up I looked at the .xsession-errors and noticed I had a typo in my .profile"

I have not edited this file but if there was a problem I would not know what I was looking for.

`martin@thrio:~$ cat .profile  
# ~/.profile: executed by the command interpreter for login shells.  
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login  
# exists.  
# see /usr/share/doc/bash/examples/startup-files for examples.  
# the files are located in the bash-doc package.  

# the default umask is set in /etc/profile; for setting the umask  
# for ssh logins, install and configure the libpam-umask package.  
#umask 022  

# if running bash  
if [ -n "$BASH_VERSION" ]; then  
    # include .bashrc if it exists  
    if [ -f "$HOME/.bashrc" ]; then  
        . "$HOME/.bashrc"  
    fi  
fi  

# set PATH so it includes user's private bin if it exists  
if [ -d "$HOME/bin" ] ; then  
    PATH="$HOME/bin:$PATH"  
fi  
martin@thrio:~$ ` 

_sudo mv ~/.Xauthority ~/.Xauthority.backup  
sudo service lightdm restart_  

martin@thrio:~$ mv ~/.Xauthority ~/.Xauthority.bak  
martin@thrio:~$ sudo service lightdm restart  
[sudo] password for martin:  
lightdm stop/waiting  
lightdm start/running, process 3032  
martin@thrio:~$  

still stuck in login loop

"Reinstalled xubuntu-desktop and it's fixed now"

martin@thrio:~$ sudo apt-get purge xubuntu-desktop  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
Package 'xubuntu-desktop' is not installed, so not removed  
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.  
martin@thrio:~$  

_"Then, type sudo apt-get install gdm . Let it install and type sudo dpkg-reconfigure gdm and follow the prompts to set it as your login manager.
Press Ctrl + Alt+ F7 to get back to the login screen which should now look different. Does logging in work? If it does, your problem is solved!

If it doesn't, go back to the fullscreen terminal and type sudo dpkg-reconfigure lightdm to set LigthDM as you login manager again. Now you know that this is a problem with your graphics drivers for sure."_

sudo apt-get install gdm and restarted - login loop. (So this suggests a problem with graphics driver - recall that I had

martin@thrio:~$ lsmod|grep fglrx  
martin@thrio:~$  

Should I get some output for this search?

3
  • Possible duplicate of Ubuntu gets stuck in login loop . I suggest you replace lightdm with gdm, or reinstall it. The procedure is described in the linked question Mar 15, 2015 at 7:45
  • 1
    Thanks for the link Serg - I had not found that particular article. I have tried all of the suggestions in the link however without success. There are some comments that suggest perhaps the problem is related to the graphics driver (other shells also have the same login loop issue) I'll edit my question with some more output from testing some of the suggestions in that link
    – Martin
    Mar 17, 2015 at 7:26
  • did you find a solution ?
    – bicepjai
    Oct 11, 2017 at 4:19

3 Answers 3

2

Though you have given answer in your question, writing this for the record. Type ctrl + alt + F1 and login with your username at command prompt.

user@dell$ ls -l ~/.ICEauthority
-rw------- root root 3668 May 28 09:28 /home/user/.ICEauthority
user@dell$ sudo chmod 777 ~/.ICEauthority
password:
user@dell$ ls -l ~/.ICEauthority
-rwxrwxrwx root root 3668 May 28 09:28 /home/user/.ICEauthority

ctrl + alt + F7 and login worked.

2
  • 1
    I had the same problem and this saved my evening, I can't thank you enough! Dec 16, 2015 at 18:58
  • changing ownership would be more logical Apr 6, 2016 at 18:12
0

My .xsession-errors has similar errors as that listed in the original question. I too had tried pretty much everything that @Martin had tried.

Finally what worked for me was the answer from the link lightdm doesn't start, which basically involves stopping lightdm, reconfiguring xserver, starting lightdm and then rebooting the machine. After this I was able to login to my original user account.

FYI: I have a Lenovo T530 machine running Ubuntu 14.04 LTS (using lightdm) and I have nvidia drivers installed for Cuda 6.5 use.

0

you have alot of broken packages. You gonna have to track packages. Try doing a force install, running this command will 'usually' give you feed back on broken packages to let you know why the dpkg sub-process [1] is taking place. Your lightdm data probably wasnt removed either, and the lightdm group id probably still exists, you cat check by running cat on /etc/group

:~$ cat /etc/group

:~$ sudo apt-get -f install -y

You also have a problem with your display variable, and your /tmp/.x0-lock key is different than it once was, this is keeping you locked out. Once you corrupt the magic cookie your in a deep bind. You might end up having to uninstall ubuntu-desktop and whole lot more. For now install GDM and openbox.

ctl-alt-F6

:~$ sudo apt-get install openbox -y

:~$ sudo apt-get install gdm -y

Select the option to to make gdm your display manager and openbox your window manager. This may be the simplest solution to your problems.

Write back with feed back if you would??!!

1
  • Its happened to me a few times I kid you not , one night it happen to me and I took the system down to the kernel and some utilities in tty6 (ctl-alt-F6), i purged and removed everything, even removed xorg temporarily. I finally was able to get up and going by opening xhost, setting a display variable, and created a conditional statement in my .bashrc that ran /usr/bin/xinit && startx. I was able to recover all my data. Then I did reinstall.
    – oOpSgEo
    Jun 7, 2015 at 7:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .