Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was explaining to a friend that the graphical interface in Linux is a separate program that can be killed like any other. To demonstrate that I switched to tty1 and tried to kill the GUI (as a real-life scenario of when the GUI freezes or crashes). I wasn't sure what process exactly should I kill so I picked randomly to kill gnome-session (wasn't sure what exactly to kill: gnome, unity, X11?):

sudo killall gnome-session

immediately after execution, the session was automatically switched to tty7 in the login screen, as it seemed to restarted the GUI (and my friend was so impressed at this point!).

The problem is, when I tried to login, I couldn't! After entering the password the login screen disappears for a moment and then reloads again. I can login normally from any other tty, and can successfully login from the login screen as any other user and I can start a guest session. It is that only specific user that cannot login via the login screen. I tried to start gnome-session from any other tty but it fails (cannot open display), and I did reboot the machine several times. What is the error and how can I trace it and fix it?

I am running Ubuntu 12.04.1 LTS, kernel 3.2.0-32-generic.

EDIT: Tried unity --replace in tty1:

WARNING: no DISPLAY variable set, setting it to :0
No protocol specified
No protocol specified
compiz (core) - Fatal: Couldn't open display :0

And nothing changed, still can't login via that user.

EDIT: I did reinstall gdm, lightdm, gnome-session, and unity... Nothing changed!

EDIT: And went all the way down of reinstalling gnome. Still nothing changed (except the grup splash image of Debian!!!).

share|improve this question
    
Try unity --replace in tty –  Tachyons Nov 11 '12 at 5:22
    
Just did, still can't login. I've updated the question. –  amyassin Nov 11 '12 at 10:31
    
Reinstall lightdm, If it wont work install gdm It might work :) –  Tachyons Nov 11 '12 at 10:49
    
I did.. Still nothing changed! –  amyassin Nov 11 '12 at 11:24
    
And unity too... –  amyassin Nov 11 '12 at 11:32

1 Answer 1

up vote 7 down vote accepted

There is likely a .Xauthority file your home directory. Try removing it.

share|improve this answer
    
Yeah! It worked.. So all that was because it is locked and the original process didn't remove the lock? Or am I missing something??? –  amyassin Nov 11 '12 at 13:34
2  
The removal of lock files is part of the shutdown or terminate functions. If however X or the Desktop or the computer crashes and these processes are not terminated correctly then the files do not get removed. This is the same for other things such mysql (Oh the fun I had one morning with left over socket files) and even Firefox back in the early days. –  TonyJ Nov 11 '12 at 14:07

Your Answer

 
discard

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.