0

So I have the following script that I'm running in a Docker container:

#!/bin/bash

# silencing matplotlib warning
MPLCONFIGDIR="/tmp"
export MPLCONFIGDIR

# Virtual display
export DISPLAY=:0
Xvfb :0 -screen 0 1024x768x24

# my python module is called at this point

The first time I run the script, there seems to be a process that gets stuck: I don't know what's happening behind the terminal, I just have a blank line waiting forever. If I do ctrl+x the process seems to exit and the rest of the script (my python module) is executed just fine.

The second time I run the same script, I get the following 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) 

Then everything seems to run fine, but I would like to get rid of this warning/error and this weird ctrl+x. Any idea how to proceed?

WaterFox
  • 850
  • 6
  • 18
  • 1
    There may be an issue with `/tmp/.X11-unix` directory or anywhere near (funny `/tmp`, stale socket file, whatever). Also, you can instruct your X server to only use TCP on localhost and avoid using unix domain sockets altogether. – oakad Mar 22 '22 at 02:08
  • @oakad thank you so much for your comment! But also I understand only half of the words you're using (sorry!). Could you elaborate a little bit so I can get a better sense of what to do? In the meantime I will look what stale socket, TCP, domain sockets mean! :D – WaterFox Mar 22 '22 at 02:11

0 Answers0