GNOME Bugzilla – Bug 498748
Typing a web address in the location entry should open it in the browser.
Last modified: 2010-12-01 10:22:31 UTC
As described in summary, it would be nice if you could write a web address in the location entry (Ctrl+L) and activating it would open the default browser to the address you typed. Patch following.
Created attachment 99437 [details] [review] proposed patch I do not know if this is the right approach for this, but "gnome-open" really does what I want, i.e. opening the default browser (as specified in System->Preferences->Prefered Applications (or how that's called in English :)) at the right address. Also, if the patch is accepted, I can make a GIO-version too.
Not sure this patch compile once merged, i did not try it but +location_is_web_link (const char *location) +{ + return (g_str_has_prefix (location, "http"); +} seem's like there is a missing ) at the end or an extra ( at the start to the return statement. For the record there is also xdg-open that also do the exact same job as gnome-open but in a cross-desktop way. It's may not be what the nautilus dev would like but still it's interesting to know.
@Steve: the missing ")" is a typo, it's easy to fix ;) I did not know about xdg-open, and it seem to work just like gnome-open...I do not know if Nautilus maintainers want to pick up a dep on xdg-utils though...gnome-open is part of libgnome and Nautilus already depends on that.
from my pov, an #ifdef construction would be cool. cosimo, can you bring this up to the nautilus-list mailing list? patch review in bugzilla for nautilus does not really exist due to lack of manpower.
Hi Andre, I already posted to the nautilus m-l for this. What should be #ifdef'd in your opinion? Anyway, I'll update my patch with a GIO version soon.
In my opinion, if nautilus should support this feature (I have no strong opinion), the patch shouldn't use gnome-open but rather gtk_show_uri. cheers
Yeah, I definitely agree...will try to find some time and update the patch soon(-ish).
*** Bug 615812 has been marked as a duplicate of this bug. ***
Do we really want this behavior in nautilus? Isn't nautilus a file manager? http:// *could* be confused with the webdav protocol that's supported in nautilus (via gvfs). Also note that nautilus doesn't even handle entering a filename in the location bar to open it. If we're supporting this, should it be possible to open urls via "nautilus http://example.com" as well? I'd say we should keep "magic" things like this out of nautilus and let it handle files, do it well and let the browsers do the web thingy.
This proposal makes sense as a way to gracefully handle essentially invalid paths, but there are probably better ways to do this (see bug 494313).
(In reply to comment #9) > Do we really want this behavior in nautilus? Isn't nautilus a file manager? > I'd say we should keep "magic" things like this out of nautilus and let it > handle files, do it well and let the browsers do the web thingy. From another perspective: why shouldn't nautilus be able to handle anything gnome-open can handle from the command line?
Reinout, well, there are lot of uris out there and if we start supporting one, should we support the other as well? mailto: (evolution), mms: (video - totem), callto:, etc etc. Not sure if gnome-open already handles those, but I think a user could be confused what nautilus handles and what not.
Consider the Alt+F2 Run dialog, it handles all the protocols you mention. From a user perspective, is there a clear difference between entering something in the file manager location bar (not even visible by default, so you have to know how to enable it) and entering something in the Run dialog?
(In reply to comment #13) > Consider the Alt+F2 Run dialog, it handles all the protocols you mention. > From a user perspective, is there a clear difference between entering something > in the file manager location bar (not even visible by default, so you have to > know how to enable it) and entering something in the Run dialog? But the dialog says "Run application" and the user expect an application to start. Entering something in "Location:" doesn't. IMHO.
(In reply to comment #14) > But the dialog says "Run application" and the user expect an application to > start. Entering something in "Location:" doesn't. IMHO. So, you are saying that when Alice enters an mms:// URL in the Run dialog, she expects an application like Totem to start,correct? And when she does the same in the Nautilus location bar it would be confusing to her when the result would be that Totem loads it? I find that rather hard to believe.
There haven't been any arguments here as to why this feature would benefit users. Is the location bar a more convenient place for this this functionality than in a generic desktop location, like a panel applet, GNOME Do, or GNOME Shell? (I don't think so.) (In reply to comment #15) <snip> > So, you are saying that when Alice enters an mms:// URL in the Run dialog, she > expects an application like Totem to start,correct? And when she does the same > in the Nautilus location bar it would be confusing to her when the result would > be that Totem loads it? I find that rather hard to believe. </snip> Why would Alice do this in the first place? What would lead her to believe that this is a valid place to enter a URL? I haven't heard any reports of users expecting this behaviour. The issue here seems to be the role of the file manager. This feature would turn the location bar into a magic 'this will open anything' facility, which would make it more of a desktop shell and less of a file manager. That seems to be the opposite of where Nautilus is aiming right now.
(In reply to comment #16) > The issue here seems to be the role of the file manager. This feature would > turn the location bar into a magic 'this will open anything' facility, which > would make it more of a desktop shell and less of a file manager. That seems to > be the opposite of where Nautilus is aiming right now. Agreed, closing this old bug as WONTFIX.