On Wed, Dec 29, 2010 at 04:51:36PM +0100, Tiziano Müller wrote: > 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?
I guess this depends if you plan to use the existing spicec or the upcoming spice-gtk. Haven't looked if spice-gtk implements the control pipe. But if you plan to use spicec then I see there is in client/controller.h a Controller interface, already implemented by Application, so I guess just calling the same methods? nothing radical :) I probably shouldn't have even mentioned it since it looks pretty obvious. Just add stuff to Application I guess. But notice the comments from Marc about the url scheme - better not end up having two schemes.. > > > > > 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.muel...@stepping-stone.ch > _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel