LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Ubuntu stuck at black login screen; problem with .X11-unix file (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/ubuntu-stuck-at-black-login-screen%3B-problem-with-x11-unix-file-932255/)

Diogones 03-01-2012 07:51 PM

Ubuntu stuck at black login screen; problem with .X11-unix file
 
Hey all,

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.
giving up.
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!

camorri 03-02-2012 03:53 PM

Quote:

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.
Any file in the / ( root ) directory should be owned by root. The way to get your user to have access to run the file is by adding your user to the sudoers file. This is done with the command 'visudo' and requires root permissions. To get that, here is the command. 'sudo visudo' ( the command is typed without the quotes, just what is between them). You will be prompted for the users password, enter it, it should allow you to edit this file. Once you are in the sudoers file, 'sudo startx' will work after you enter your password.

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.

Diogones 03-17-2012 12:43 AM

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!

camorri 03-17-2012 08:08 AM

You are welcome, glad to help.


All times are GMT -5. The time now is 01:54 PM.