Bug 843103

Summary: remote-viewer fails to start when --full-screen or -f precedes spice:// uri
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: virt-viewerAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: acathrow, areis, cfergeau, codong, cwei, dallan, dblechte, desktop-qa-list, dyuan, lcui, lnovich, marcandre.lureau, mjenner, mzhan, tzheng
Target Milestone: beta   
Target Release: 6.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-viewer-0.5.6-1.el6 Doc Type: Enhancement
Doc Text:
no doc required
Story Points: ---
Clone Of:
: 977237 (view as bug list) Environment:
Last Closed: 2013-11-21 08:01:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 845645, 977237    

Description David Jaša 2012-07-25 15:28:08 UTC
Description of problem:
remote-viewer fails to start when --full-screen or -f precedes spice:// uri

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-9.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. run:
remote-viewer <other_options> -f spice://host:port
OR
remote-viewer <other_options> --full-screen spice://host:port

  
Actual results:
remote-viewer fails to start with error:
Invalid full-screen argument: spice://127.0.0.1:3000

Expected results:
remote-viewer starts in full-screen

Additional info:
the bug occurs only when the --full-screen/-f option is followed by spice:// uri right away. When any other option is put between -f and uri or the -f is after the uri, the bug is not triggered.

Comment 1 Christophe Fergeau 2012-08-10 12:34:13 UTC
This happens because -f/--full-screen takes an optional 'autoconf' argument, so if -f is followed by a non-parameter string (ie one not starting with -), it expects it to be 'autoconf', and fails if it's something else (for example spice://yyyy).
I don't see an easy way to handle both the optional argument, and the '-f spice://yyyy" case using the GOption API :-/ For what it's worth, 'remote-viewer -f -- spice://yyyy' works

Comment 5 Marc-Andre Lureau 2013-05-08 13:23:47 UTC
imho, comment #1 is the right solution. should we close that bug?

Comment 6 David Jaša 2013-05-09 13:41:09 UTC
Please add the "-f --" hint to --help output / man page.

Comment 7 Marc-Andre Lureau 2013-05-09 14:08:17 UTC
(In reply to comment #6)
> Please add the "-f --" hint to --help output / man page.

sent patch to ML:
https://www.redhat.com/archives/virt-tools-list/2013-May/msg00020.html

Comment 14 tingting zheng 2013-07-04 05:51:51 UTC
I can reproduce this issue with:
virt-viewer-0.5.2-18.el6_4.2.x86_64 

# remote-viewer -f spice://localhost:5901
Invalid full-screen argument: spice://localhost:5901
Run 'remote-viewer --help' to see a full list of available command line options

# man remote-viewer

       -f, --full-screen
           Start with the window maximised to fullscreen


Tested with:
virt-viewer-0.5.6-1.el6.x86_64

# man remote-viewer
       -f, --full-screen=<auto-conf>
           Start with the windows maximized to fullscreen.

           If the argument ’auto-conf’ is given, the remote display will be reconfigured to match at
           best the client physical monitor configuration on initialization, by enabling or disabling
           extra monitors as necessary. This is currently implemented by the Spice backend only.

# remote-viewer --full-screen=auto-conf spice://localhost:5902

# remote-viewer -f -- spice://localhost:5902

The above 2 commands work well,so move the bug to VERIFIED.

Comment 15 errata-xmlrpc 2013-11-21 08:01:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1578.html