You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as u can see that i used :99 as display number
but i failed to set it using this script
from pyvirtualdisplay import Display
import os
print(os.environ.get("DISPLAY"))
os.environ["DISPLAY"] = ":99"
print(os.environ.get("DISPLAY"))
with Display() as disp:
# display is active
print(disp.is_alive()) # True
print(os.environ.get("DISPLAY"))
# display is stopped
print(disp.is_alive())
result
None
:99
True
:0 ==> failed
False
my question is: how to set display number?
because i want to use display that created from outside of this library
The text was updated successfully, but these errors were encountered:
or, if there is no available method for my case.
at least, how can i find my previous display?
something like this
def run(action):
disp = Display() #idk how to attach old display
if(disp.is_alive):
if(action=='start'):
print('continue existing display')
return disp
else:
disp.stop()
print('stop existing display')
return None
else:
if(action=='start'):
print('create new display')
return disp #return something that i can use 1 hour later
else:
print('display not found. Cannot stop the display')
return None
What's the point? The whole idea behind this library is starting and managing an Xvfb process. If you already have one, there's nothing left for it to do?
Hi, there
i have this service:
as u can see that i used
:99
as display numberbut i failed to set it using this script
result
my question is: how to set display number?
because i want to use display that created from outside of this library
The text was updated successfully, but these errors were encountered: