On Wed, Dec 19, 2018 at 11:44:07AM +0400, Marc-André Lureau wrote: > On Wed, Dec 19, 2018 at 11:13 AM Gerd Hoffmann <kra...@redhat.com> wrote: > > > > Hi, > > > > > > Also: remote-viewer accepts config files. I'd suggest to write one, so > > > > it is easy to restart remote-viewer. Also I would not use a temp dir > > > > > > Where should it be written? > > > > /run/user/$uid/qemu/$vmname/remote-viewer.vv ? > > > > > What should be the content of > > > the .vv file? > > > > Everything needed, so launching remote-viewer is > > just "remote-viewer /path/to/config.vv". > > If it's just what is needed to launch the viewer, why not stick to the > url syntax?
First, the info needed to launch is located on a fixed & well known place on disk then, so it is easy to restart remote-viewer. Second, with a vv file you can do a bit more, for example setting "ca" in case TLS is configured, or set enable-{smartcard,usbredir} depending on guest configuration. > .vv files are quite specific to virt-viewer/remote-viewer. The same is true for the URL syntax. Trying to pass a URL to vncviewer doesn't work ... > > > Should it use a template to avoid proxying all the > > > options? > > > > Is this needed? virt-viewer has a user settings file, > > shouldn't user preferences go there instead? > > User settings files are quite limited at this point. Afaik, it's only > used for the "ask-quit" preference, and "monitor-mapping". Other > options are either from command line or .vv files. Ok. I think it is more useful to extend that instead of passing through options from the qemu command line to virt-viewer. cheers, Gerd