Bug 1021482 - virt-manager silently fails when no X display available
Summary: virt-manager silently fails when no X display available
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-21 11:38 UTC by Rolf Fokkens
Modified: 2013-11-17 22:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-17 22:11:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rolf Fokkens 2013-10-21 11:38:53 UTC
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):
virt-manager-0.10.0-4.fc19.noarch

How reproducible:
100%

Steps to Reproduce:
1. unset DISPLAY
2. start virt-manager
3. return to the prompt without neither a working virtmanager nor an error message

Actual results:
neither a working virt-manager nor an error message

Expected results:
either a working virt-manager or an error message

Additional info:

Comment 1 Giuseppe Scrivano 2013-10-31 17:36:38 UTC
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).

Comment 2 Rolf Fokkens 2013-11-01 08:35:35 UTC
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.

Comment 3 Cole Robinson 2013-11-01 13:50:28 UTC
--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:

commit 395a20edd82f1072d23e80ecbb25dbeed9359304
Author: Cole Robinson <crobinso>
Date:   Fri Nov 1 09:44:14 2013 -0400

    virt-manager: Yet more fixes for DISPLAY unset error

Comment 4 Cole Robinson 2013-11-17 22:11:28 UTC
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


Note You need to log in before you can comment on or make changes to this bug.