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 509600 - Need network: backend implementation
Need network: backend implementation
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
unspecified
Other Linux
: High major
: ---
Assigned To: gvfs-maint
gvfs-maint
: 504834 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-01-15 11:28 UTC by Alexander Larsson
Modified: 2008-12-10 02:09 UTC
See Also:
GNOME target: 2.22.x
GNOME version: ---


Attachments
network.firstpass.diff (23.07 KB, patch)
2008-02-14 15:57 UTC, A. Walton
none Details | Review
somewhat better (17.11 KB, patch)
2008-02-20 10:34 UTC, A. Walton
committed Details | Review
Screenshot with possible bug (22.82 KB, image/png)
2008-02-20 16:54 UTC, Michael Monreal
  Details
big cleanup (23.31 KB, patch)
2008-02-21 18:49 UTC, A. Walton
committed Details | Review
self explanatory (10.88 KB, patch)
2008-02-23 05:02 UTC, A. Walton
none Details | Review

Description Alexander Larsson 2008-01-15 11:28:56 UTC
We need to implement network: as it is a regression from gnome-vfs and visible in the user interface.

In gnome-vfs network: is just a merger of various other backends (mainly dns-sd:// and smb://). Here is what it contains:

* The smb servers in the current workgroup.
If /system/smb/workgroup is set in gconf it is used to create smb://$workgroup, otherwise smb://X-GNOME-DEFAULT-WORKGROUP/ is used which the smb backend knows means the default workgroup specified in the samba config files.

* A link to "smb:///" named "Windows Network"

Depending on the gconf setting "/system/dns_sd/display_local":
 "separate":
  * A link to dns-sd://local/ 
 "merged":
  * All the contents from dns-sd://local/
 other or not set:
  * No local dns-sd shares

If gconf setting "/system/dns_sd/extra_domains" is set to a list of domains:
 * links to dns-sd://$domain/
Comment 1 Alexander Larsson 2008-01-15 14:11:37 UTC
*** Bug 504834 has been marked as a duplicate of this bug. ***
Comment 2 André Klapper 2008-02-08 13:58:52 UTC
gicmo is likely to work on this bug, but extra hands are always welcome!
marking as a gnome showstopper.
Comment 3 A. Walton 2008-02-14 15:57:28 UTC
Created attachment 105249 [details] [review]
network.firstpass.diff

Here's a (very, very) rough first pass at implementing network:// by hi-jacking both computer:// and GnomeVFS network://. There's a lot left to be done (implementing dns-sd, as commented in several places), and a lot of bulletproofing, but it's functional for getting to Samba (on my machine).
Comment 4 Bastiaan Wakkie 2008-02-19 10:17:14 UTC
I do get also problems with obex:// could this be related?
Comment 5 Alexander Larsson 2008-02-19 13:35:14 UTC
no, obex missing is bug 509621
Comment 6 A. Walton 2008-02-20 10:34:16 UTC
Created attachment 105628 [details] [review]
somewhat better

Here's a somewhat cleaned up version of the patch with comments from Alex in IRC.
Comment 7 Alexander Larsson 2008-02-20 12:40:21 UTC
I commited this so that we have something to work from.

However, there is a bunch of work left to do:

* Support for inline displaying of things in network (not just shortcuts)
* Support for X-GNOME-DEFAULT-WORKGROUP in the smb browsing code
* dns-sd support
Comment 8 Michael Monreal 2008-02-20 16:54:41 UTC
Created attachment 105651 [details]
Screenshot with possible bug

With r1312, I can get to my samba share when I navigate through Windows Network->WORKGROUP->...

"WORKGROUP" is also shown on the network:/// top level, but pressing it does not work (screenshot)
Comment 9 A. Walton 2008-02-21 18:49:40 UTC
Created attachment 105715 [details] [review]
big cleanup

This cleans up all of the outlined to-do issues (adding DNS-SD support even though there isn't a backend so this code might change a bit), adding the workgroup links directly to network:// and removes the "default workgroup" link that was previously in its place. 

Before it's committed: it adds one translatable string, and it's kind of lame (I'm not sure what it should be instead though), "DNS-SD Local", which is an issue being in string freeze right now.
Comment 10 André Klapper 2008-02-21 20:23:59 UTC
+          /* "separate": a link to dns-sd://local/ */
+          /* TODO: display name, something better? */
+          file = network_file_new ("dnssd-local", _("DNS-SD Local"), 

can you add a comment for the translators here instead of the "TODO:"?
/me (non-coder/non-technical) can't find out what it actually means and how to translate it properly to another language). a wikipedia link to http://en.wikipedia.org/wiki/DNS-SD could help, for example (but it still does not explain the "local" behind it).
Comment 11 Wouter Bolsterlee (uws) 2008-02-21 22:15:19 UTC
The gnome i18n coordinators have decided to be a bit less strict for the nautilus/gio/gvfs-related string freeze breaks. Is this one string the only one you need or is it likely that you need additional ones later on?
Comment 12 Wouter Bolsterlee (uws) 2008-02-21 22:17:39 UTC
(In reply to comment #9)
> Before it's committed: it adds one translatable string, and it's kind of lame
> (I'm not sure what it should be instead though), "DNS-SD Local", [...]

"DNS-SD Local" is jargon not useful as a display name for users. What about "Local network" instead? What exactly do you display? DNS-SD workstations? Announced FTP/SFTP/WebDAV shares?
Comment 13 Alexander Larsson 2008-02-22 09:41:55 UTC
I'm going with "Local network" for now. Its kinda unclear what it does to people who know what dns-sd is, but for normal people i think it gives the right idea and avoids scary language.

commited.
Comment 14 Alexander Larsson 2008-02-22 15:17:19 UTC
I just landed dns-sd support and some fixes to network:// to make it work with dns-sd. This means we're almost done with this. 

Missing is imho only monitoring of inlined folders so we proxy changes from the dns-sd: directory.
Comment 15 A. Walton 2008-02-23 05:02:35 UTC
Created attachment 105804 [details] [review]
self explanatory

Adds monitors for SMB and DNS-SD even though SMB doesn't support monitoring yet and adds some polish. 

Two more little things: 

I'm unsure how/if it is possible to query GVFS if a backend has been added or has left other than checking g_vfs_get_supported_uri_schemes at an interval, or even if we need to that. Right now it just checks them when the backend is mounted. 

And number two, should DNS-SD extra domains be added if the GConf key is set disabled, or are those two key unrelated and it adds them anyways (like the code does now)?
Comment 16 Alexander Larsson 2008-02-25 08:48:07 UTC
I commited the patch with some minor changes.

For your questions:
1) there is no better way, in fact the result of g_vfs_get_supported_uri_schemes() is cached on startup, so even polling won't work

2) they are unrelated, you may want to show some extra domain but disable local browsing (maybe for security reasons for instance).

With this commit i consider network: done for an initial version. Further details can be discussed in separate bug reports.