Error when trying to use Xorg: Only console users are allowed to run the X server?

John P

So when i try to use the Xorg command as a normal user, this is the error that it gives me :

/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server

but i don't understand, what are the "console users"? and when i switch to root it gives me another error :

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

So what is going on and what are the reason for each of these errors?

UPDATE: and the output of the command netstat -ln | grep -E '[.]X|:6[0-9][0-9][0-9] is :

unix  2      [ ACC ]     STREAM     LISTENING     18044    @/tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     47610    @/tmp/.X11-unix/X1
unix  2      [ ACC ]     STREAM     LISTENING     18045    /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     47611    /tmp/.X11-unix/X1
sourcejedi
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server

but i don't understand, what are the "console users"?

It means you need to be running from the Linux text console, it actually does not matter what user you are. (Except that root is always allowed). Confusing :).

There are two different examples of switching to the Linux text console (and back) here, depending on exactly how your system is configured:

Switch to a text console in Fedora

The details can vary, as to which numbered consoles (Ctrl+Alt+F1, Ctrl+Alt+F2, etc) allow a text login, and which ones are used for graphical sessions (or not used at all).


I keep getting the message: "Cannot establish any listening sockets..."

You get an error message like:

_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running

This problem is very similar to the previous one. You will get this message possibly because the lock file was removed somehow or some other program which doesn't create a lock file is already listening on this port. You can check this by doing a netstat -ln. Xservers usually listen at tcp port 6000+, therefore if you have started your Xserver with the command line option :1 it will be listening on port 6001. Please check the article above for further information.

As this says, there is more information about what :0, :1, :2 mean, immediately above the quoted section:

https://www.x.org/wiki/FAQErrorMessages/#index5h2

(Note that you are using a more modern X server config, which does not listen on any TCP ports. This is why your error happens in _XSERVTransSocketUNIXCreateListener, instead of _XSERVTransSocketInetCreateListener. But the principle is exactly the same).

When i tried Xorg :2 in my virtual machine with Kali, the screen went black, why did this happen?

A-ha, yes :-D. Xorg is a graphics server. If you want to show some graphics on it, you need to run some client programs.

Xorg also starts up with an empty cursor nowadays. It's deliberately featureless, to avoid flashes / inconsistencies when starting your graphical stuff. This has changed - when I first used Xorg, the default background and cursor were quite obtrusive. If you want to see what that looked like, you can pass the -retro option :-).

Traditionally - and I think this is the behaviour with Xwrapper - Xorg would grab an unused console and switch to it. In this case you can switch back to your previous console (see above). Of course you can switch back again to the Xorg server, once you find which number console it grabbed :-).

If you are running a virtual machine on Linux, your VM will provide some method to inject the key combination Ctrl+Alt+F1 or whatever, because pressing that key combination probably switches consoles on your real machine.

I would tell you to compare startx -- :2, which (hopefully) launches some clients as well as an X server :-). However, the most popular modern GUIs now explicitly do not support multiple sessions. So you must make sure to logout your existing GUI session, before you run startx. Otherwise, it might look like it works, but then go wrong in weird ways that you don't understand.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SSH login shows Only console users are allowed to run the X server

From Dev

Error when trying to run bokeh-server

From Dev

Odd Errors Displayed Only in Console When Trying to Run Program

From Dev

Error 1004 when trying to use .SaveAs into C:\Users\Me\ProjectOutput

From Dev

Error 1004 when trying to use .SaveAs into C:\Users\Me\ProjectOutput

From Dev

Error when trying to run carthage

From Dev

500 Internal Server Error when trying to use ErrorDocument to handle request

From Dev

Getting Internal Server Error when trying to use Gviz's IdeogramTrack

From Dev

"Undefined variable: users" when trying to use @foreach

From Dev

How to run xorg on virtual console 7 and not 1

From Dev

Undefined index error while trying to run $_SERVER['HTTP_X_FORWARDED_FOR']

From Dev

Xorg works only when bbswitch is ON?

From Dev

error when trying to use webrtcvad

From Dev

error trying to run any simple r3-gui Rebol script but only when pre-downloaded

From Dev

"Null correlation not allowed" when trying to use bean with @CorrelationStrategy annotation

From Dev

pip error: Bad interpreter when trying to run 'pip install ...' on OS X

From Dev

pip error: Bad interpreter when trying to run 'pip install ...' on OS X

From Dev

Whoops, looks like something went wrong. error in Laravel 5 when trying to run on built in server

From Dev

when trying to run struts2 with eclipse juno server,getting HTTP Status 404 error

From Dev

Session 'app': error when trying to run app

From Dev

Error when trying to run a simple mojolicious program

From Dev

Confusing error when trying to run Python script

From Dev

Error when trying to run Create Extension postgis

From Dev

showing syntax error when trying to run in pycharm

From Dev

Android Studio error when trying to run app

From Dev

Oozie error when trying to run a workflow in Hue

From Dev

Compile error when trying to run make

From Dev

Compiler error when trying to run the below program

From Dev

Confusing error when trying to run Python script

Related Related

  1. 1

    SSH login shows Only console users are allowed to run the X server

  2. 2

    Error when trying to run bokeh-server

  3. 3

    Odd Errors Displayed Only in Console When Trying to Run Program

  4. 4

    Error 1004 when trying to use .SaveAs into C:\Users\Me\ProjectOutput

  5. 5

    Error 1004 when trying to use .SaveAs into C:\Users\Me\ProjectOutput

  6. 6

    Error when trying to run carthage

  7. 7

    500 Internal Server Error when trying to use ErrorDocument to handle request

  8. 8

    Getting Internal Server Error when trying to use Gviz's IdeogramTrack

  9. 9

    "Undefined variable: users" when trying to use @foreach

  10. 10

    How to run xorg on virtual console 7 and not 1

  11. 11

    Undefined index error while trying to run $_SERVER['HTTP_X_FORWARDED_FOR']

  12. 12

    Xorg works only when bbswitch is ON?

  13. 13

    error when trying to use webrtcvad

  14. 14

    error trying to run any simple r3-gui Rebol script but only when pre-downloaded

  15. 15

    "Null correlation not allowed" when trying to use bean with @CorrelationStrategy annotation

  16. 16

    pip error: Bad interpreter when trying to run 'pip install ...' on OS X

  17. 17

    pip error: Bad interpreter when trying to run 'pip install ...' on OS X

  18. 18

    Whoops, looks like something went wrong. error in Laravel 5 when trying to run on built in server

  19. 19

    when trying to run struts2 with eclipse juno server,getting HTTP Status 404 error

  20. 20

    Session 'app': error when trying to run app

  21. 21

    Error when trying to run a simple mojolicious program

  22. 22

    Confusing error when trying to run Python script

  23. 23

    Error when trying to run Create Extension postgis

  24. 24

    showing syntax error when trying to run in pycharm

  25. 25

    Android Studio error when trying to run app

  26. 26

    Oozie error when trying to run a workflow in Hue

  27. 27

    Compile error when trying to run make

  28. 28

    Compiler error when trying to run the below program

  29. 29

    Confusing error when trying to run Python script

HotTag

Archive