virt-manager can't open the display

23,466

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.

Share:
23,466

Related videos on Youtube

Paul Wilson
Author by

Paul Wilson

Updated on September 18, 2022

Comments

  • Paul Wilson
    Paul Wilson almost 2 years

    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
    localhost:10.0
    
    [root@rakcal ~]# virt-manager 
    Traceback (most recent call last):
      File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
        main()
      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!!

    • David Corsalini
      David Corsalini about 12 years
      Did you run this in a remote ssh shell, without X forwarding? does the server have X installed?
    • David Corsalini
      David Corsalini about 12 years
      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
    • user2751502
      user2751502 about 12 years
      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.