Recently I have started using Ubuntu. I was installing recent version of Gromacs (MD simulations software). During recommended installation, it prompted me that cuda toolkit was missing. So, I was trying install CUDA driver in my Ubuntu 14.04 OS. During installation got an error message that " The file./tmp/.X0-lock exists and appears to contain the process ID '1062' of a >running server. You appear to be running an X-server; please exit X before installing".
Then I tried to log out from the server by pressing CTRL+ALT+F1 to kill the current X server by typing "sudo service lightdm stop" followed by "init 3" command and then I installed CUDA using "sudo sh cuda_7.5.18_linux.run". After installation I again typed "sudo service lightdm start" and came back to GUI login page. When I typed by login password it was not opening the ubuntu dashboard and instead the login page appears again and again.
I tried with the every solution available in the internet.
1. Reset the password: from the Grub menu pressed 'E' to edit and in the line starting with linux i typed "rw init = /bin/bash" at the end of the line and pressed Ctrl+X to boot. Then typed "passwd myusername" and set new password. The new password worked when I login in the ligtdm and not in the GUI and login page reappears again and again as before.
2. At Grub menu I chosen Advanced Options and boot Recovery mode and dropped to root shell prompt. There I type "mount -n -o remount/rw /" and "passwd myusername", entered new password and rebooted in normal boot mode. The new password worked when I login in the lightdm but not in the GUI and login page reappeared again and again as before.
3. Pressed Ctrl+Alt+F3 to go to TTYs and logged in with credentials (here the password works in lightdm) and typed "sudo mv .profile .profile.backup" and followed by "sudo reboot". Now also the login page keep on reappearing and not going to the dashboard.
4. Checked the .xsession-errors file in the home directory by typing "~/.xsession-errors". It said no such file found
5. Pressed Ctrl+Alt+F1, logged in with credentials and entered "sudo mv ~/. Xauthority ~/. Xauthority.backup " and "sudo service lightdm restart". Now also the problem dint solved. The Login screen reappeared repeatedly as before.
6.Pressed Ctrl+Alt+F1, logged in with credentials and typed "sudo -s" then typed "adduser newusername" and chosen a password and confirmed it to get a newuser and go to GUI login scree to get login by the newuser and set it as administrator account type from the system settings. It created an account and even I login with the newuser credentials also the problem is the same it repeatedly brings back the login screen and not the dashboard.
I really frustrated with this and I really havent used linux before. Please anyone can help me in sorting out this problem.