0

Ubuntu: X: user not authorized to run the X server, aborting.

Here’s a simple fix to a common problem.

You’re trying to launch X the same way you always have, but today of all days, you’re getting the following error: X: user not authorized to run the X server, aborting.

The first thing to check is your /etc/X11/Xwrapper.config.

sudo nano /etc/X11/Xwrapper.config

Make sure the line allowed_users is set to allowed_users=console. This means that anybody who is actively logged in to the terminal can start an X session. Don’t set it to anybody unless you have a good reason to– you’d be allowing anybody to start X with root privileges, and for security’s sake we don’t want to do that (at least without a good reason).

The second thing to check is to make sure you are not currently in an attached screen session!

screen -ls

You may or may not see active screens in the list, but none of them should say “attached!” If it does, you’re currently in a screen session, and cannot start an X session from it. Either detach your current session (screen -d) or exit out of it completely (Ctrl+A, D).

The second one is what trips me up every now and then, hence this article…

Leave a Reply