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
A base ubuntu install without x-server doesn't have a DISPLAY var set. So after manually installing Xvfb, Xephyr and pyvirtualdisplay I encountered this Key Error.
xephyr=Display(visible=1, size=(320, 240)).start() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.6/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 65, in start self.old_display_var = os.environ['DISPLAY'] File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__ raise KeyError(key) KeyError: 'DISPLAY'
Easily fixed by adding DISPLAY to the environment with
$: export DISPLAY=':0'
Could handle the exception with a message or needs some logic to handle if DISPLAY doesn't exist. How about:
The text was updated successfully, but these errors were encountered: