We are unable to launch virt-manager application and I am getting "RuntimeError: could not open display" error on Red Hat Enterprise Linux 4.5 and 5. How do I fix this?

Solution Verified - Updated -

Issue

The traceback error listed below indicates that the localhost entry in /etc/hosts file is missing or incorrect.

_X11TransSocketINETConnect() can't get address for localhost:6010: Name
or service not known
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 59, in ?
import gtk
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line
76, in ?
_init()
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line
64, in _init
_gtk.init_check()
RuntimeError: could not open display

Environment

  • Red Hat Enterprise Linux 4.5
  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.