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)
However, I encounter contradicting information:
When running
ps ax | grep X, I get2149 tty1 Sl+ 0:03 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/121/gdm/Xauthority -background none -noreset -keeptty -verbose 3This means indeed X server is running (because of the Xorg executable). Running
ps -C Xorgalso shows PID 2149 (reference).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 establisThis 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.