Actually my touchpad was not working, so I installed and uninstalled some packages and I did not know what they were. Now I am now getting a login screen and after typing password, it is coming back to the login screen again and again. Help me to solve this problem.
I had a similar issue Ubuntu 12.04 login screen finite loop and keep end my session.
Can you check if you're using any PPA xorg-edgers packages like Version: 2:2.21.0+git20130204.9640640a-0ubuntu0ricotz~precise at xserver-xorg-video-intel?
$ apt-cache show xserver-xorg-video-intel | grep "Version" Version: 2:2.21.0+git20130204.9640640a-0ubuntu0ricotz~precise Version: 2:2.19.0-0ubuntu1~xup1 Version: 2:2.17.0-1ubuntu4.2 Version: 2:2.17.0-1ubuntu4 $ apt-cache show xserver-xorg-core | grep "Version"
I had a similar problem running Kubuntu 12.04 for a long time: The login screen appeared as normal, but logging in would not take me to a plasma desktop, but rather back to the login screen. I assume the problem works about the same way for Ubuntu with gdm as it did for me using kdm.
As a temporary solution, I was able to get to a proper desktop environment by entering:
sudo service kdm stop startx
from a tty console, which I escaped to with ctrl+alt+f3 from the login screen.
Suspecting a permissions issue with
.Xauthority and or my
/tmp/ directory (as per many other answers to this same question), I ran:
ls -la ~/.Xauthority
and verified its owners were set to
username username and not
root root, and ran
ls -ld /tmp
and ensured its permissions read as
drwxrwxrwt. I also tried removing the
.Xauthority file altogether, hoping it would be regenerated properly upon next login, but this didn't work for me (others seem to have had success trying this, however).
Next I checked my
~/.profile for extraneous lines, and read through my
.xsession-errors file for clues to no avail.
What eventually worked for me was removing my
"The .dmrc is an initialization file which the system checks during session login. Specifically, gnome checks the file for any specific language or session information it hasn't located elsewhere. While often the file is blank except for the basic header data, it may contain a specific language to use at session startup."
This file must have 644 permissions to work properly (EDIT: The above link actually gives a few other permissions that will work besides 644, but 644 is the explicitly given permission to set), so before removing it verify that
ls -la ~/.dmrc
yields the permissions
drwxr-xr-x 143 user user, and if not try using
chmod 644 /home/username/.dmrc
If none of the above solutions worked, try backing up and removing this file with:
cp /home/username/.dmrc /home/username/.dmrc.backup rm /home/username/.dmrc
Upon next login, a new
.dmrc file will be generated and configured correctly, and in my case I was finally able to log in properly without escaping to tty, killing kdm, and starting x manually.
NOTE: I suspect the root cause of this came when the partition my home folder was on filled up during a session, which caused a whole slew of other issues with configuration files not being written that needed to be written. The infinite login loop problem started immediately after that, and I noticed that the
.dmrc file had a size of 0, rather than containing:
as it does now in the fully functioning condition. It seems from the above quote that this file is read on login, and maybe my login loop occurred because Kubuntu didn't know how to handle an empty
.dmrc file, but I'm only speculating.