Identifying the real display server

Mattias Andrée maandree at member.fsf.org
Mon Apr 13 16:51:12 PDT 2015


On Mon, 13 Apr 2015 16:41:12 -0700
Thiago Macieira <thiago at kde.org> wrote:

> On Monday 13 April 2015 23:31:26 Mattias Andrée wrote:
> > > As for x11, it is covered just fine with x11::0.
> > 
> > But that is not convered by the generic syntax for
> > URL:s.
> 
> Yes it is. RFC 3986, Appendix A has the ABNF for URIs.
> 
> Decoding (only the relevant parts):
>    URI           = scheme ":" hier-part [ "?" query ]
> [ "#" fragment ] scheme        = ALPHA *( ALPHA / DIGIT /
> "+" / "-" / "." )
> 
>    hier-part     = "//" authority path-abempty
>                  / path-absolute
>                  / path-rootless
>                  / path-empty
> 
>    path-rootless = segment-nz *( "/" segment )
> 
>    segment-nz    = 1*pchar
>    pchar         = unreserved / pct-encoded /
> sub-delims / ":" / "@" unreserved    = ALPHA / DIGIT /
> "-" / "." / "_" / "~"
> 
> So it decodes to
> 	scheme 	"x11"
> 	":"		":"
> 	hier-part	":0"
> 	path-rootless	":0"
> 	segment-nz	":0"
> 
> This is the same expansion that allows for
> mailto:xdg at lists.freedesktop.org.
> 
> > It would have to be x11:///0 for :0 and x11:///0/1
> > or (less preferable) x11:///0.1 for :0.1.
> > And x11://localhost/0.1 or x11://localhost/0/1
> > for localhost:0.1
> > The generic syntax is
> > scheme://[[username[:password]@]host[:port]][/[path][?query][#fragment]]
> > And we must assume that libraries will parse <port> as
> > an
> 
> Your syntax is incorrect. The authority and the double
> slash are optional. And even when they are present, the
> expansion for authority → host → reg-name allows for it
> to be empty too:
> 
>    reg-name      = *( unreserved / pct-encoded /
> sub-delims )
> 
> If that weren't the case, file:///etc/passwd wouldn't be
> valid.
> 

As I wrote it, the only thing that was mandatory was
scheme://, of course the absolute minimum was scheme:
But arguing whether it is covered or not is uninteresting;
it was just an example.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20150414/d213851c/attachment.sig>


More information about the xdg mailing list