Closed ymd-h closed 4 years ago
I never used screen number. AFAIK it is only needed when you want to have multiple screens in a display. Is this what you need? Screen is always 0 in PyVirtualDisplay. Environment is aleready set in start() like this:
os.environ["DISPLAY"] = f":{display}"
https://linux.die.net/man/1/xvfb "By default, only screen 0 exists .." "Xvfb :1 -screen 1 1600x1200x16 The server will listen for connections as server number 1, will have the default screen configuration (one screen, 1280x1024x8), and screen 1 will be depth 16 1600x1200. "
Hi, @ponty
Thanks for your answer!
Actually, I misunderstood detail of DISPLAY environment. I could confirm by myself that the screen number is not necessary in this case.
Thank you for your useful package.
I uses PyVirtualDisplay to visualize reinforcement learning environment (OpenAI Gym) on Google Corab, so that I need display number and screen number to set
os.environ["DISPLAY"] = f":{display}.{screen}"
Display.screen
Display._obj.screen
Display._obj._screen
Are there any stable method to take screen number? (or is it guaranteed that the screen number is always 0?)