[Spice-devel] connection-URL for spice

Tiziano Müller tiziano.mueller at stepping-stone.ch
Wed Dec 29 07:51:36 PST 2010


Am Sonntag, den 26.12.2010, 09:55 +0200 schrieb Alon Levy:
> On Fri, Dec 24, 2010 at 01:22:38PM +0100, Tiziano Müller wrote:
> > Hi everyone
> > 
> > What do you think about having a spice URL (scheme)?
> > The idea behind this is that we would like to register a protocol
> > handler in the browser (or in the OS) to automatically start the spice
> > client based on a certain URL.
> > 
> > examples:
> >   spice://somehost:port/?password=sekrit&fullscreen=true
> >   spices://somehost:sport/?password=sekrit&fullscreen=true
> > 
> > Unfortunately I did not find a way to have the browser or the OS parse
> > the arguments before calling the registered protocol handler. Thus I
> > either have to code a wrapper around the spice client to do that job or
> > extend the spice client argument parser to accept an url as a parameter.
> > Since I prefer latter, I started by extending the Application class by a
> > url parser method and added a new command line flag '--url''.
> > 
> > examples:
> >   spicec --url "spice://somehost:port/"
> > 
> > Opinions? Would this be useful for others as well or should I rather
> > write a wrapper?
> 
> I like the --url parameter. Just another command line argument, I don't know
> if the length restrictions (i.e. argument list length maximum - I think 64k on
> linux, not sure on windows, but I think less) will be a problem. Or charset.
Length is probably not a problem unless you try to pass complete
certificate chains in the uri (which is probably not what you ever
want).

Charset actually may be a problem as soon as we pass passwords along.
Following RFC3986 we should expect certain chars to be Percent-Encoded.

> Our current solution is based on around a separate protocol over a pipe between
> a plugin to the browser and the spicec executable. Since there is some duplication
> here I would suggest you try to reuse the code from the controller class.

You would add another connect method then?

> 
> Also, the controller protocol solves the problem of continued interaction between
> the spice client and the browser. But I think it's usable to also have a url scheme
> where you just launch and forget.
That's my first goal, yes.

Cheers,
Tiziano

-- 
stepping stone GmbH
Neufeldstrasse 9
CH-3012 Bern

Telefon: +41 31 332 53 63
www.stepping-stone.ch
tiziano.mueller at stepping-stone.ch



More information about the Spice-devel mailing list