* [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user
@ 2016-05-31 7:03 Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Robert Ho @ 2016-05-31 7:03 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, robert.hu
(If you received this patch set several times, I appologize, I met some
problem in the smtp setting.)
I find that '-vnc' option actually has a parameter 'to', implicitly;
while actually is there and can be used but not be public.
Don't know why but this may probably confuse user, especially when used in
some default situation implicitly.
So shall I?
1. Add its description in QEMU manual info
2. Expilicitly print out when it's used with non-default value
Robert Ho (2):
Reveal 'to' param of '-vnc' option in qemu man page
Explicitly print out default vnc option in use
qemu-options.hx | 7 +++++++
vl.c | 5 ++++-
2 files changed, 11 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page
2016-05-31 7:03 [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Robert Ho
@ 2016-05-31 7:03 ` Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use Robert Ho
2016-05-31 12:59 ` [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Paolo Bonzini
2 siblings, 0 replies; 6+ messages in thread
From: Robert Ho @ 2016-05-31 7:03 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, robert.hu
Add the descrption of the 'to' param of 'vnc' option in QEMU man page.
Signed-off-by: Robert Ho <robert.hu@intel.com>
---
qemu-options.hx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 6106520..68b4cf2 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1241,6 +1241,13 @@ syntax for the @var{display} is
@table @option
+@item to=@var{L}
+
+With this option, QEMU will try next available VNC @var{display}s, until the
+number @var{L}, if the origianlly defined "-vnc @var{display}" is not
+available, e.g. port 5900+@var{display} is already used by another
+application. By default, to=0.
+
@item @var{host}:@var{d}
TCP connections will only be allowed from @var{host} on display @var{d}.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use
2016-05-31 7:03 [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
@ 2016-05-31 7:03 ` Robert Ho
2016-05-31 12:59 ` [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Paolo Bonzini
2 siblings, 0 replies; 6+ messages in thread
From: Robert Ho @ 2016-05-31 7:03 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, robert.hu
If no display option defined in QEMU command line, and SDL is not
available, then it by default uses '-vnc localhost:0,to=99,id=default'.
This patch simply print out the default option parameters out, so that
user is aware of that.
Signed-off-by: Robert Ho <robert.hu@intel.com>
---
vl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 18d1423..8617a68 100644
--- a/vl.c
+++ b/vl.c
@@ -4213,7 +4213,10 @@ int main(int argc, char **argv, char **envp)
#elif defined(CONFIG_COCOA)
display_type = DT_COCOA;
#elif defined(CONFIG_VNC)
- vnc_parse("localhost:0,to=99,id=default", &error_abort);
+ #define DEFAULT_VNC_DISPLAY_OPTION "localhost:0,to=99,id=default"
+ vnc_parse(DEFAULT_VNC_DISPLAY_OPTION, &error_abort);
+ printf("No display option defined, using '-vnc %s' by default \
+\n", DEFAULT_VNC_DISPLAY_OPTION);
show_vnc_port = 1;
#else
display_type = DT_NONE;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user
2016-05-31 7:03 [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use Robert Ho
@ 2016-05-31 12:59 ` Paolo Bonzini
2016-06-05 13:08 ` Robert Hu
2 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2016-05-31 12:59 UTC (permalink / raw)
To: Robert Ho, qemu-devel
On 31/05/2016 09:03, Robert Ho wrote:
> I find that '-vnc' option actually has a parameter 'to', implicitly;
> while actually is there and can be used but not be public.
> Don't know why but this may probably confuse user, especially when used in
> some default situation implicitly.
>
> So shall I?
> 1. Add its description in QEMU manual info
> 2. Expilicitly print out when it's used with non-default value
I think patch 1 is okay.
For patch 2, I am not sure I see the point of printing the VNC options;
the VNC port is printed immediately after.
However, I think it is useful to print the VNC port whenever the user
specifies "-vnc to=XX". Perhaps you could move show_vnc_port (the
variable, the assignments and the "if (show_vnc_port)") from vl.c to
vnc_display_open?
Thanks,
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user
2016-05-31 12:59 ` [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Paolo Bonzini
@ 2016-06-05 13:08 ` Robert Hu
0 siblings, 0 replies; 6+ messages in thread
From: Robert Hu @ 2016-06-05 13:08 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Robert Ho, qemu-devel
On Tue, 2016-05-31 at 14:59 +0200, Paolo Bonzini wrote:
>
> On 31/05/2016 09:03, Robert Ho wrote:
> > I find that '-vnc' option actually has a parameter 'to', implicitly;
> > while actually is there and can be used but not be public.
> > Don't know why but this may probably confuse user, especially when used in
> > some default situation implicitly.
> >
> > So shall I?
> > 1. Add its description in QEMU manual info
> > 2. Expilicitly print out when it's used with non-default value
>
> I think patch 1 is okay.
Thanks Paolo. Sorry for late reply, since I just part-time work on this.
>
> For patch 2, I am not sure I see the point of printing the VNC options;
> the VNC port is printed immediately after.
I agree it is not significantly meaningful to print out the options. I
just disliked the implicitly be-on-behalf-chose a value without
notification; especially we don't know there is a 'to' option. So when I
did the density test of huge quantity of guests, always failed on 99th,
made me quizzical. :(
In most ordinary cases, the final 'VNC server running on ...' printf is
sufficient.
Now my that emotion gradually die out, I agree abandon patch 2. :)
>
> However, I think it is useful to print the VNC port whenever the user
> specifies "-vnc to=XX". Perhaps you could move show_vnc_port (the
> variable, the assignments and the "if (show_vnc_port)") from vl.c to
> vnc_display_open?
And 2nd reason I abandon patch 2: I grepped in vnc.c, no bare 'printf'.
Any nice wrapper for such info purpose? I don't want to be first 'bad
guy' to break the elegant code. ;)
So do I need to send out v2 patch? which simply contains single patch 1.
>
> Thanks,
>
> Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user
@ 2016-05-31 6:42 Robert Ho
2016-05-31 6:42 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
0 siblings, 1 reply; 6+ messages in thread
From: Robert Ho @ 2016-05-31 6:42 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, robert.hu
I find that '-vnc' option actually has a parameter 'to', implicitly;
while actually is there and can be used but not be public.
Don't know why but this may probably confuse user, especially when used in
some default situation implicitly.
So shall I?
1. Add its description in QEMU manual info
2. Expilicitly print out when it's used with non-default value
Robert Ho (2):
Reveal 'to' param of '-vnc' option in qemu man page
Explicitly print out default vnc option in use
qemu-options.hx | 7 +++++++
vl.c | 5 ++++-
2 files changed, 11 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page
2016-05-31 6:42 Robert Ho
@ 2016-05-31 6:42 ` Robert Ho
0 siblings, 0 replies; 6+ messages in thread
From: Robert Ho @ 2016-05-31 6:42 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, robert.hu
Add the descrption of the 'to' param of 'vnc' option in QEMU man page.
Signed-off-by: Robert Ho <robert.hu@intel.com>
---
qemu-options.hx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 6106520..68b4cf2 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1241,6 +1241,13 @@ syntax for the @var{display} is
@table @option
+@item to=@var{L}
+
+With this option, QEMU will try next available VNC @var{display}s, until the
+number @var{L}, if the origianlly defined "-vnc @var{display}" is not
+available, e.g. port 5900+@var{display} is already used by another
+application. By default, to=0.
+
@item @var{host}:@var{d}
TCP connections will only be allowed from @var{host} on display @var{d}.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-05 13:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 7:03 [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
2016-05-31 7:03 ` [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use Robert Ho
2016-05-31 12:59 ` [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user Paolo Bonzini
2016-06-05 13:08 ` Robert Hu
-- strict thread matches above, loose matches on Subject: below --
2016-05-31 6:42 Robert Ho
2016-05-31 6:42 ` [Qemu-devel] [PATCH 1/2] Reveal 'to' param of '-vnc' option in qemu man page Robert Ho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).