After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 498748 - Typing a web address in the location entry should open it in the browser.
Typing a web address in the location entry should open it in the browser.
Status: RESOLVED WONTFIX
Product: nautilus
Classification: Core
Component: Location Bar
0.x.x [obsolete]
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 615812 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-11-21 13:37 UTC by Cosimo Cecchi
Modified: 2010-12-01 10:22 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
proposed patch (1.18 KB, patch)
2007-11-21 13:40 UTC, Cosimo Cecchi
none Details | Review

Description Cosimo Cecchi 2007-11-21 13:37:44 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.
Comment 1 Cosimo Cecchi 2007-11-21 13:40:54 UTC
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.
Comment 2 Steve Tousignant 2007-11-28 16:31:16 UTC
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.
Comment 3 Cosimo Cecchi 2007-11-28 17:05:24 UTC
@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.
Comment 4 André Klapper 2007-12-12 02:51:10 UTC
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.
Comment 5 Cosimo Cecchi 2007-12-12 09:10:29 UTC
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.
Comment 6 Baptiste Mille-Mathias 2008-07-18 11:24:39 UTC
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
Comment 7 Cosimo Cecchi 2008-07-18 12:02:44 UTC
Yeah, I definitely agree...will try to find some time and update the patch soon(-ish).
Comment 8 Cosimo Cecchi 2010-04-15 09:32:12 UTC
*** Bug 615812 has been marked as a duplicate of this bug. ***
Comment 9 Marcus Carlson 2010-07-09 19:44:21 UTC
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.
Comment 10 Allan Day 2010-07-10 10:19:59 UTC
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).
Comment 11 Reinout van Schouwen 2010-07-10 17:27:36 UTC
(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?
Comment 12 Marcus Carlson 2010-07-10 20:06:40 UTC
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.
Comment 13 Reinout van Schouwen 2010-07-10 22:55:44 UTC
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?
Comment 14 Marcus Carlson 2010-07-10 22:59:42 UTC
(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.
Comment 15 Reinout van Schouwen 2010-07-10 23:26:13 UTC
(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.
Comment 16 Allan Day 2010-07-13 15:45:22 UTC
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.
Comment 17 Cosimo Cecchi 2010-12-01 10:22:31 UTC
(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.