1

When I try to login to my ubuntu 12.04 it accepts my account info and password but then a black terminal page appears and disappears very fast and it goes back to login page.
I killed lightdm and then used this command:

sudo lightdm

then tried to login (while terminal keeps the log). this is the error I receive:

Warning **error reading existing Xauthority: Error opening file : Permission denied Error writing X authority:Error opening file ,/home/sam/.Xauthority': Permission denied

All of this started when I pressed M in answer to this question during boot.
The Disk Drive for /tmp is not ready yet. S to skip mount or M for manual recovery

Here is the result to sudo df /etc/fstab

Here the result for sudo cat /etc/fstab

ask for more info if needed

girardengo
  • 4,965
  • 1
  • 26
  • 31
Sam
  • 119
  • @Simptnon I tried that didnt solve my problem still cannot login – Sam May 07 '14 at 23:12
  • I post my lightdm link again seems like there was something wrong with last one. http://paste.ubuntu.com/7413054/ I made a new user with this command now I can use my pc but wish I could recover last one – Sam May 07 '14 at 23:19
  • @Xubu-Tur well it was asking me for reputation to post the answer yesterday. Now it doesn't not sure what changed!!! – Sam May 08 '14 at 21:48
  • @Xubu-Tur my graphic seems lower since I fixed this problem. maybe a graphic driver is also root permission and isn't running?? any fix to that?? I don't really know what is my ubuntu graphic driver otherwise I would reinstall it – Sam May 08 '14 at 21:53
  • some of hight definition videos that I could view easily before break and view large pixels. http://paste.ubuntu.com/7418886/ – Sam May 09 '14 at 00:18

1 Answers1

9

Thanks to a friend on #ubuntu freenode channel I fixed this problem.
First run this command to make sure your problem is same as mine:

ls -l .Xauthority 

I got root:root as owner of .Xauthority which is the reason for me not being able to login from gui.
The owner should be like username:username.
Run this in Alt+Ctrl+F2 as root:

sudo chown user:user /home/user/.Xauthority

now you can login.

The reason for this error is that you probably run graphical programs through sudo like I used this command sudo gedit /etc/apt/sources.list should have used gksudo gedit /etc/apt/sources.list

girardengo
  • 4,965
  • 1
  • 26
  • 31
Sam
  • 119