4 ms·
I also get file://hostname/path urls, but opening them works fine. xdg-open 1.1.3 Ctrl-clicking opens the link, but is anything supposed to happen when I click
by morsch 4y ago
I also get file://hostname/path urls, but opening them works fine. xdg-open 1.1.3
Ctrl-clicking opens the link, but is anything supposed to happen when I click on the link (in Gnome Terminal). I thought it might copy the link, but nope.
- chrismorgan 4y agoPerhaps Gnome Terminal is using gio open instead of xdg-open. Running `gio open file://something-else/home` opens /home, apparently just completely ignoring the authority part. Theoretically including the host name is good because you can handle remote machines, but in practice I’m not sold on it because here we have one major tool ignoring it (actively bad!) and another major tool not supporting it (less bad, but less convenient), and there’s no standard accepted way of interpreting/opening a file: URL with an authority anyway. (Windows treats it as SMB and can do something provided it actually is that, but it won’t be, so it can’t. I don’t know of any other OS having any convention at all. Just tried it in a couple of browsers under Linux, Firefox actively discards the authority part, Chromium keeps it and works if it’s localhost or 127.0.0.1 or such, but says ERR_INVALID_URL if it’s something else.)
- morsch 4y agoLike I said, xdg-open file://hostname/path works for me. Dunno what the terminal uses, but I tried it directly.
- chrismorgan 4y agoAh, I did indeed misinterpret you. On further investigation, I have found one authority that works in xdg-open: localhost. Not the host name, not 127.0.0.1, not ::1 or [::1], not anything else present in /etc/hosts, just localhost. I’m baffled, but not quite invested enough to delve into the source to figure out what could be going on.