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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content