1

I have a strange situation. These are my commands and their outputs:

user@machine:~/Temp$ Xvfb :10 -screen 0 1024x768x16
_XSERVTransSocketINETCreateListener: ...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) 

user@machine:~/Temp$ Xvfb :11 -screen 0 1024x768x16
_XSERVTransSocketINETCreateListener: ...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) 

user@machine:~/Temp$ Xvfb :12 -screen 0 1024x768x16
started...

As you see dipslay:10 and display:11 are not free. However, in /tmp there are not files .x10-lock and .x11-lock. Besides, there are not =x10 and =x11 files in /tmp/.X11-unix.

How can I found out why displays 10 and 11 are not free?

  • Perhaps the ports are in use. What does your Xorg.0.log say? – jayson Feb 15 '17 at 16:42
  • 4
    Are you using X forwarding with ssh? That would use displays 10 and upwards (listening on ports 6010, 6011, ...). – Kusalananda Feb 15 '17 at 16:44
1

You can find out with

lsof -i TCP:6010

As root, this will show any TCP listeners using the X11 display :10; change 6010 to 6011 for display :11, and so on; or use a range such as TCP:6000-6020.

You can similarly check for file socket listeners, if that is also a problem for you (you're only getting an error for the INET listener above, so it isn't - yet). For example, if you run your Xorg with -nolisten tcp, you'll see it in the results of lsof /tmp/.X11-unix/*.

You can combine both:

lsof -iTCP:6000-6020 /tmp/.X11-unix/*
  • lsof -i doesn't seem to work for local connections to an Xorg server...? At least I can't find any hint in the output. – Murphy Feb 16 '17 at 14:22
  • 1
    Hence my last paragraph - if your Xorg is running with the -nolisten tcp option, you'll want to check for processes listening on the UNIX-domain sockets, too - lsof /tmp/.X11-unix/*. – Toby Speight Feb 16 '17 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.