My virt-manager was working just fine and all of a sudden stopped working, throwing in error: RuntimeError: could not open display

root@rakcal ~]# echo $DISPLAY

[root@rakcal ~]# virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
  File "/usr/share/virt-manager/virt-manager.py", line 286, in main
    raise gtk_error
RuntimeError: could not open display

Has anyone seen this before? the same thing happen to "virt-viewer" as well:

[root@rakcal ~]# virt-viewer winxp1
Cannot open display: 
Run 'virt-viewer --help' to see a full list of available command line options

Does anyone know what might be the problem or if I'm missing anything? Reinstalling "virt-manager" didn't bring any good. Any help would be appreciated. Cheers!!

  • 1
    Did you run this in a remote ssh shell, without X forwarding? does the server have X installed? – dyasny Mar 30 '12 at 17:39
  • 1
    I certainly didn't do it without X forwarding; otherwise echo $DISPLAY wouldn't return anything. There is no need to install full X on the server, only xauth (with associated dependencies installed) will work just fine. In fact, it worked just fine for for 4/5 days until yesterday morning; since then it started giving trouble. Cheers!! – MacUsers Mar 30 '12 at 19:26
  • then I'd start looking at the logs for libvirt (libvirt.log and libvirtd.log) and track back the changes recently made to the system – dyasny Mar 31 '12 at 5:28
  • 3
    Do any X programs work? Absent a full X install, maybe you can install something like xeyes or xdpyinfo. The idea here is to figure out if this is a problem with virt-viewer or with the underlying X forwarding. – larsks Mar 31 '12 at 13:20

If you use ssh X forwarding try:

ssh -Y user@remotehost virt-manager

From SSH manpage:

-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.