eth-ait / aitviewer

A set of tools to visualize and interact with sequences of 3D data.
MIT License
497 stars 46 forks source link

Real headless rendering #10

Closed Arthur151 closed 1 year ago

Arthur151 commented 1 year ago

Awesome project! The rendering works great on the desktop. But on the remote server, we may need a real headless rendering to avoid the error like: (standalone) XOpenDistplay: cannot open display

kaufManu commented 1 year ago

The following should fix this problem (it essentially fakes the existence of a display device):

export DISPLAY=:0.0
Xvfb :0 -screen 0 640x480x24 &

This is usually sufficient for us. Did you have any other strategies for "real headless rendering" in mind? Would be curious to hear!

kaufManu commented 1 year ago

Closing this since this hasn't been active in a while. Feel free to re-open it again in the future if required.

kunkun0w0 commented 3 months ago

Hi! Thanks for providing this solution for headless rendering. But I meet an error message like this:

_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) 

I try to change the display id like this:

Xvfb :1 -screen 0 640x480x24 &
export DISPLAY=:1.0

Then I meet this problem:

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Would you like to help me with this? Do you have any other strategy for headless rendering?

kaufManu commented 3 months ago

This seems to be a configuration issue with your system's X server, so unfortunately I cannot offer too much help, as this highly depends on your setup (e.g. searching for your last error message suggests that Xvfb might want root access).

MontaEllis commented 3 weeks ago

Hi! Thanks for providing this solution for headless rendering. But I meet an error message like this:

_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) 

I try to change the display id like this:

Xvfb :1 -screen 0 640x480x24 &
export DISPLAY=:1.0

Then I meet this problem:

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Would you like to help me with this? Do you have any other strategy for headless rendering?

same issue