GNOME Bugzilla – Bug 309201
gnome-terminal doesn't match nntp or file URLs.
Last modified: 2006-01-27 00:36:21 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/show_bug.cgi?id=12285 "gnome-terminal 2.10.0-0ubuntu doesn't match URLs with a scheme of `nntp' or `file' making it tedious to open said links in a browser. I think this is because $ grep 'define SCHEME' gnome-terminal-2.10.0/src/terminal-screen.c #define SCHEME "(news|telnet|nttp|file|https?|ftps?|webcal)" `nttp' is probably meant to be `nntp' and `file' is omitted."
I see file there right in the middle, is that not working somehow?
Hmm, it seems this is beacuse a file:/// uri uses three slashes. It works if you type file://some/path/to/a/file
terminal
right, same comment on the ubuntu bug: "Oops. You're right, `file' isn't missing from SCHEME's definition. The problem is the regular expression that uses SCHEME. #define USERCHARS "-A-Za-z0-9" #define PASSCHARS "-A-Za-z0-9,?;.:/!%$^*&~\"#'" #define HOSTCHARS "-A-Za-z0-9" #define SCHEME "(news|telnet|nttp|file|https?|ftps?|webcal)" #define USER "[" USERCHARS "]+(:["PASSCHARS "]+)?" terminal_widget_match_add (screen->priv->term, "\\<(" SCHEME "://(" USER "@)?)[" HOSTCHARS ".]+(:[0-9]+)?" "(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\\\"])?\\>", FLAVOR_AS_IS); It insists on there being one or more of [HOSTCHARS.] after the first two slashes so it fails to match `file:///etc/passwd'. I don't know if any other of the listed schemes can also have `///'."
opening file://path doesn't use nautilus though, but that's probably an another bug
Commited the nntp part.
Fixed in CVS HEAD just now. Thanks.
Using gnome-terminal 2.13.2 from Ubuntu Dapper I get the following warning when I start a gnome-terminal: * (gnome-terminal:5471): WARNING **: Error compiling regular expression "\<(file:///(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) Checking terminal-screen.c I found the following: terminal_widget_match_add (screen->priv->term, "\\<file:///(" URLPATH ")?", FLAVOR_AS_IS); Shouldn't it be: "\\<file:///(" URLPATH ")?\\>" /torkel
2.13.2 is old, it's fixed in CVS HEAD.