I can't log in to my ubuntu 12.04. Once I login I got returned back to the original screen after a trial to enable X11 Forwarding.
Can you help me with this.
I can't log in to my ubuntu 12.04. Once I login I got returned back to the original screen after a trial to enable X11 Forwarding.
Can you help me with this.
I haven't tried to enable X11Forwarding, but I used to have the same problem. You can fix this in a few steps:
sudo apt-get install gdm
and hit enter, give your password and wait to get a line ending with a dollar sign again.sudo dpkg-reconfigure gdm
.gdm
in the list you get in the second screen with the arrow keys.sudo reboot
and hit enter. You'll get another graphical login screen, but you'll be able to log in!P.S.:
If you are used to running some programs like ifconfig
or others which are administrative ones from a terminal emulator (e.g. gnome-terminal) you'd better add a line like PATH="$PATH:/sbin:/usr/sbin"
at the end of the .bashrc
file in your home directory. You can do it with echo 'PATH="$PATH:/sbin:/usr/sbin"' >> ~/.bashrc
.
If you want to change back to the other graphical login screen from time to time and see if it was bug-fixed and it works again you can run sudo dpkg-reconfigure gdm
and select lightdm
and reboot (doesn't look like it works if you just run sudo pkill X
).
I encountered the same issue after installing package vnc4server
in Ubuntu 12.10. (Maybe it sets up X11 forwarding, not sure.) I found that in my home directory, files .Xauthority
, .bash_history
and folder .vnc
were all owned by user root
and group root
. Changing them (and all files underneath .vnc
) to be owned by my own user with the chown
command allowed me to login (I rebooted first).
To make these corrections, either ssh into the box from elsewhere or switch to text console with Ctrl+Alt+F2.
I found out my problem was related to a messy package repository. I updated my repositories and reinstalled ubuntu-desktop:
Log in to bash, (Ctrl+Alt+F1)
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
Solved.
This can happen if there is an error in your .bashrc or .profile file. From the graphical login screen hit Ctrl+Alt+F2 and login from there. Fix any errors that you see printed to the console. Type: sudo reboot
Had the same problem when I accidentally used:
sudo apt-get autoremove
I found that it had removed ubuntu-desktop for some reason. You can try Ctrl+Alt+F1 and use the following command:
sudo apt-get install ubuntu-desktop
After it has finished, press Ctrl+Alt+F7 and login as usual. Mine was still lacking the Restart and User accounts buttons on the panel; for that, go to terminal and use:
unity --reset
Solved my problem.
Check your .xsession-errors file in the home dir for any errors after logging in via CTRL+ALT+F1
In my case, .xsession-errors showed an error saying I had bad characters in my .profile file from my git installation(human error.. my bad)
After I fixed the error in my .profile file, I was able to login via the login GUI
Comment #18 at the below link helped me. https://answers.launchpad.net/ubuntu/+source/lightdm/+question/197479
My problem was that somehow due to manipulations with SSD, permissions of /tmp were messed up and I found on some Ubuntu forum this solution which helped me:
chmod 777 /tmp
chmod +t /tmp
sudo chown root:root /tmp
It has happened to me a couple of times and each time I restarted the Display Manager and could log in.
Drop to tty1 with Ctrl-Alt-F1.
sudo service lightdm restart
Log in to bash, (Ctrl+Alt+F1)
$passwd
$newpasswd
$newpasswd
You are good to go now! that's what solved my issue.