proposal for file: uri standard

Thomas Leonard tal00r at
Mon Mar 29 15:59:29 EEST 2004

On Mon, Mar 29, 2004 at 02:35:33PM +0200, Alexander Larsson wrote:
> On Mon, 2004-03-29 at 14:16, Waldo Bastian wrote:
> > Apart from that I have the suspicion that the hostname part is
> > under-specified. E.g. what does an empty hostname mean, should
> > "localhost" be handled differently, should the hostname be a FQDN?
> Yeah.
> I'm not actually aware of any app that uses the hostname part, but the
> XDnD spec says its an error to not pass it [1]. The most basic use of
> the hostname would be to check if it was the same as the current
> machine, to do that it would be nice if the hostname was of some
> canonical form, and its evident that localhost and empty hostname needs
> to be handled specially (not with a strcmp).

Should we even allow "localhost"? An empty hostname is already considered
an error (because DnD between machines wouldn't work), and localhost is
just as bad for this.

The ROX applications all assume a FQDN in the host part. Most just do a
strcmp to find out if the file's local (on the assumption that any other
process on the same machine will have gnerated an identical hostname
string), although I notice that ROX-Filer itself does gethostbyname() on
the host part, so I guess we had problems with that at some point. If the
file is not local, ROX-Filer currently fetches the data via the X server,
but we'd like to support scp, etc in future.

However, hostnames are disabled in ROX-Filer by default, because we found
that including them broke many non-ROX applications, which required the
hostname part to be missing. However, I haven't looked at the situation
for a while, so that might not be an issue anymore. But this means that
the hostname-handling code isn't as well tested or widely used as it
should be.

Anyway, once the new document is up, I'll add a link from the DnD warts
page, which already has some tips on creating file: URIs for DnD:

Thomas Leonard
tal00r at	tal197 at
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1

More information about the xdg mailing list