Unable to login after killing gnome-session
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!!!).
Solution 1:
There is likely a .Xauthority file your home directory. Try removing it.