0

I am developing an application on one of the servers of webfaction. I have a python class with two functions defined in it. Each function uses a spynner.Browser() object, which requires an X server running. I am running Xvfb for this purpose.

Both functions run as expected on their owns. The problem arises when I try to run them both simultaneously in different threads. None of them works when I do that. My current Xvfb setup is as follows:

I run Xvfb externally for display number 99, then at the beginning of each function, I set the DISPLAY variable to 99 as follows:

os.environ["DISPLAY"] = ":99"

I can't see any output from neither of the functions. I have also tried running two different Xvfb instances with different display numbers, and then connecting each function to a different display, this didn't work either. I am getting a segmentation fault from one of the threads according to the logs.

Is there something else I need to do or am I doing something wrong?

Ozgur Akcali
  • 5,264
  • 2
  • 31
  • 49

1 Answers1

0

Have you tried setting the display as an environment variable?

os.environ["DISPLAY"] = ":99"

Werner Smit
  • 1,951
  • 1
  • 13
  • 9