Ubuntu stuck at black login screen; problem with .X11-unix file
I have an Acer Aspire One with the latest version of Ubuntu installed with the GNOME UI. Everything has been running fine on the computer until recently, when I hit a snag that I can't solve by myself.
I'm not sure what might have caused the error, other than a possible update glitch from Update Manager, as that is the last thing I did before I shut down the laptop when it was working last. The updates installed fine, but they might have bored the system somehow.
One day, out of the blue, I turned on my laptop and I was confronted with the black terminal login screen. After entering my credentials, I tried the "startx" command, but I received the following error, "/usr/.X11-unix has 7111 bad permissions," or something like that.
So I searched around online, and there were a few suggestions to use "chmod -7111 /usr/.X11-unix". So I used that, and then ran "startx" and I was able to boot into the GUI without a problem.
However, I had to perform this permission modification every time I started up. I had to change the .X11-unix file permissions before I could run startx. I tried deleting and recreating the file, deleting and rebooting so Linux could automatically create the file, and I attempted to modify it from within the Nautilus file manager, all with no luck. When I checked the file properties in Nautilus, the status was that it belonged to root and I couldn't make any changes, even if I ran the chmod command while I was logged into the GUI.
Finally, I went to Users and Groups, and added a new group, calling it root, and adding myself to it. I rebooted, and was once again confronted with the black login screen. Only this time, when I used the chmod command, I was confronted with the following output (verbatim):
X: /tmp/.X11-unix has suspicious ownership (not root:root) aborting.
xinit: No such file or directory (errno 2): unable to connect to X server
xinit: No such process (errno 3): Server error.
I really don't know what to make of this. I tried changing the permissions from root and to root on the .X11-unix file, but it hasn't helped at all. I do have a live iso of Ubuntu on USB, so I can always reinstall if I have to. Naturally, I want to avoid this if at all practicable.
Any advice would be most appreciated; I'm totally at a loss!
The file is commented. Read the comments, add your user. The vi editor is a bit of a challenge, so you may need to read a little before you attempt to edit this file.
You will need to delete this user:group you added. That will not work.
Thanks a lot camorri for your help! Apparently it was some sort of permissions issue, although how on Earth that happened I have no idea. Anyway, I followed your advice and used the sudo visudo command to give me permissions to access the startx and .X11-unix files, and everything works now! Two big thumbs up!
You are welcome, glad to help.
|All times are GMT -5. The time now is 05:50 AM.|