Is X server running? xdpyinfo: unable to open display "" on Ubuntu 18.04 server
1
vote
0
answers
10396
views
I'm attempting to start a program that requires rendering a window (Unity Game) on a remote server that doesn't have a display attached to it. I wouldn't want to use
ssh -X
to forward rendering commands to my local machine. I'm trying to run the program in headless mode but still making use of the remote server's GPU, or use Xvfb
, but I cannot
get it to work.
In the first step of this process, I try to **determine whether X server is already running**.
Upon sshing into the remote server, I ran
echo $DISPLAY
and it returns empty string. I thought that this means the X server is not running ([reference](https://stackoverflow.com/questions/637005/how-to-check-if-x-server-is-running))
However, I encounter contradicting information:
* When running ps ax | grep X
, I get
2149 tty1 Sl+ 0:03 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/121/gdm/Xauthority -background none -noreset -keeptty -verbose 3
This means indeed X server is running (because of the Xorg executable). Running ps -C Xorg
also shows PID 2149 ([reference](https://unix.stackexchange.com/questions/122067/make-sure-x-server-isnt-already-running)) .
* Also, when I run Xvfb :0.0
, I get
$ Xvfb :0.0
_XSERVTransSocketUNIXCreateListener:
...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already
running
(EE)
Fatal server error:
(EE) Cannot establis
This again seems to indicate that an X server is already running on :0.0
.
However (again), when I run xdpyinfo
, the utility for displaying information about an X server, I get
$ xdpyinfo
xdpyinfo: unable to open display "".
and
$ xdpyinfo -display :0.0
No protocol specified
xdpyinfo: unable to open display ":0.0".
This seems to tell me again that the X server is not running.
What is going on? Is the X server running?
As you may be able to tell I'm a newbie to X-server related issues. Please feel free point out any problem with my steps above, and suggest ways to resolve this. Thanks! There's a lot to learn.
Asked by zkytony
(111 rep)
Apr 26, 2021, 12:05 PM