GNOME Bugzilla – Bug 509600
Need network: backend implementation
Last modified: 2008-12-10 02:09: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/
*** Bug 504834 has been marked as a duplicate of this bug. ***
gicmo is likely to work on this bug, but extra hands are always welcome! marking as a gnome showstopper.
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).
I do get also problems with obex:// could this be related?
no, obex missing is bug 509621
Created attachment 105628 [details] [review] somewhat better Here's a somewhat cleaned up version of the patch with comments from Alex in IRC.
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
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)
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.
+ /* "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).
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?
(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?
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.
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.
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)?
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.