Red Hat Bugzilla – Bug 1021482
virt-manager silently fails when no X display available
Last modified: 2013-11-17 17:11:28 EST
Description of problem:
When starting virt-manager there is no feedback when no X display is available, which can be confusing.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. unset DISPLAY
2. start virt-manager
3. return to the prompt without neither a working virtmanager nor an error message
neither a working virt-manager nor an error message
either a working virt-manager or an error message
virt-manager by default forks to background, so you are not able to get its stdout/stderr output.
I am not sure if it is possible to move the Gtk/Gdk initialization before virt-manager is forked (or by using the initial stdout/stderr files) and be able to get this kind of errors.
For now, you can troubleshoot such kind of problems with the --no-fork argument to virt-manager, or even get a more verbose log with --debug (which internally implies --no-fork).
As a suggestion: make the default "--no-fork" and add an option "--fork" to have virt-manager fork to the background. In this case users will get X-errors by default, and silent failure when they request "--fork". This may be less confusing.
--no-fork is needed to force ssh to actually show us the askpass dialog, if people are connecting to a remote libvirt using ssh without keys (the default). it sucks but we are stuck with it.
I've pushed a patch upstream now that fixes things for me:
Author: Cole Robinson <firstname.lastname@example.org>
Date: Fri Nov 1 09:44:14 2013 -0400
virt-manager: Yet more fixes for DISPLAY unset error
This is in F20 now, F19 will get it on the next bugfix update when there are more impactful bugs that make it worth pushing an update. Deferring till then