Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Ubuntu server 11.10 I am trying to install a virtual machine using virt-manager. I believe that I have everything right, but when I go and run the command virt-manager I get the following error message:

File "/usr/share/virt-manager/", line 383, in <module>
File "/usr/share/virt-manager/", line 285, in main
  raise RuntimeError(_("Unable to initialize GTK: %s") % gtk_error)
RuntimeError: Unable to initialize GTK: could not open display

I want to use virt-manager so that I can quickly and efficiently create multiple (6) virtual machines, but is there any other alternative that does not take hours per host system, and is still lightweight?

My machine is as follows:

  • Ubuntu Server 11.10
  • 8 cores @ 2.5ghz
  • 64 gb ram
  • Packages:
    • qemu-kvm
    • libvirt-bin
    • virt-manager
    • bridge-utils
    • gnome-core
share|improve this question
up vote 5 down vote accepted

Are you running X on the server ? If not, you can run it from a second machine over ssh

ssh -X user@server

Or you can run a light weight X session on the server, run a web interface (convirt or similar), or run virsh (command line interface).

share|improve this answer
how do I install it? on my mac when I try to do ssh like that I get /usr/bin/xauth: file /home/rkersey/.Xauthority does not exist – Reid Jan 5 '12 at 22:50
Try installing xauth sudo apt-get install xauth – bodhi.zazen Jan 5 '12 at 22:56

Have an ubuntu laptop/desktop in the same network as your server. Install virt-manager on it. Use: virt-manager -c qemu+ssh://root@your-server-ip-or-name/system as command.

Alternatively, read on at

share|improve this answer

Sorry to revive this old question, but I've encountered the same problem trying to run virt-manager via ssh+X11 with Putty from a Windows client machine.

For me, the following steps solved the problem:

  • Have xauth and xterm installed on the server
  • Have XMing running on the windows (client) machine
  • Run Putty with X11 forwarding (on client, connecting to server)
  • Log in as root, or other privileged user (using Putty from client)
  • Execute virt-manager on the server. It should bring up a separate dialog in Xming on the client showing virt-manager

So I think you were missing the X server on Windows, which is what Xming is providing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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