Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perhaps 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.)


Like I said, xdg-open file://hostname/path works for me. Dunno what the terminal uses, but I tried it directly.


Ah, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: