On Thu, Oct 17, 2024 at 09:53:03PM +0000, Roque Arcudia Hernandez wrote: > From: Andrew Keesler <ankees...@google.com> > > Thanks to 72d277a7, 1ed2cb32, and others, EDID (Extended Display > Identification > Data) is propagated by QEMU such that a virtual display presents legitimate > metadata (e.g., name, serial number, preferred resolutions, etc.) to its > connected guest. > > This change propagates an optional user-provided display name to > QemuConsole. Future changes will update downstream devices to leverage this > display name for various uses, the primary one being providing a custom EDID > name to guests. Future changes will also update other displays (e.g., spice) > with a similar option to propagate a display name to downstream devices. > > Currently, every virtio-gpu virtual display has the same name: "QEMU > Monitor". We hope to be able to inject the EDID name of virtual displays in > order to test guest behavior that is specific to display names. We provide the > ability to inject the display name from the display configuration as that most > closely resembles how real displays work (hardware displays contain static > EDID > information that is provided to every connected host). > > It should also be noted that EDID names longer than 12 bytes will be truncated > per spec (I think?). > > Signed-off-by: Andrew Keesler <ankees...@google.com> > Signed-off-by: Roque Arcudia Hernandez <roq...@google.com> > --- > include/ui/console.h | 1 + > ui/console-priv.h | 1 + > ui/console.c | 8 ++++++++ > ui/vnc.c | 8 +++++++- > 4 files changed, 17 insertions(+), 1 deletion(-) > diff --git a/ui/vnc.c b/ui/vnc.c > index 93a8dbd253..7d6acc5c2e 100644 > --- a/ui/vnc.c > +++ b/ui/vnc.c > @@ -3595,6 +3595,9 @@ static QemuOptsList qemu_vnc_opts = { > },{ > .name = "power-control", > .type = QEMU_OPT_BOOL, > + },{ > + .name = "name", > + .type = QEMU_OPT_STRING, > }, > { /* end of list */ } > }, > @@ -4016,7 +4019,7 @@ void vnc_display_open(const char *id, Error **errp) > QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id); > g_autoptr(SocketAddressList) saddr_list = NULL; > g_autoptr(SocketAddressList) wsaddr_list = NULL; > - const char *share, *device_id; > + const char *share, *device_id, *name; > QemuConsole *con; > bool password = false; > bool reverse = false; > @@ -4217,6 +4220,9 @@ void vnc_display_open(const char *id, Error **errp) > } > qkbd_state_set_delay(vd->kbd, key_delay_ms); > > + name = qemu_opt_get(opts, "name"); > + qemu_console_set_name(vd->dcl.con, name); > + > if (saddr_list == NULL) { > return; > }
The VNC protocol has a display name field that is sent to the client, and which they would typically display in the Window titlebar. As a user, I would expect this 'name' setting to be controlling that. It is currently set in the 'protocol_client_init' method. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|