Description of problem:
If there is no DISPLAY variable set, virt-manager will throw the following stack
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 35, in ?
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 90, in ?
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 78, in _init
RuntimeError: could not open display
It should probably catch this error and display some sort of error messageg
instead of the stack trace.
The Python GTK bindings don't provide any easy way to trap & handle the error of
missing display, since they try to connect the moment you import the gtk module.
We could trap any errors occuring during import, but that would be catching much
more than we want - so while we'd improve clarity of the the missing $DISPLAY
use case, we'd make other errors much harder to debug. Since the stack trace
does end with a fairly clear description of the problem I don't thing its worth
trying to get any cleverer handling this.