Discovering SMB shares in GNOME

Available SMB shares can be found using the Other Locations view in the Files application in addition to other network shares and devices that also appear there. This internally uses several backends and volume monitors provided by the GVfs project, as I explained in my previous blog post.

Just a note that there are plans to replace the Other Locations view with a Network view.

mDNS/DNS Service Discovery

Services that appear there are most likely published via the mDNS/DNS-SD protocols these days. The SAMBA shares on Linux systems are automatically published to the network via this protocol if the Avahi daemon is installed and running. It is also natively supported on Apple systems. The problem is with Windows systems. As far as I can tell, Windows still supports the mDNS protocol for resolving .local hostnames only, but shares are not automatically published or discovered. It is only supported by some third-party applications (e.g. from Apple).

SMB1/NetBIOS Service Discovery

The NetBIOS Service Discovery had been used for years to discover Windows shares. It is available over the SMB1 protocol, also called NT1 in the SAMBA project. Unfortunately, this protocol is now disabled by default because it is outdated and vulnerable. If I’m not mistaken, the latest Windows systems don’t even allow it to be enabled. This is why Windows shares are not available in the “Other Locations” view and why the Windows Network folder is empty in most cases.

Web Service Device Discovery

Windows systems rely primarily on the WS-Discovery protocol instead. It is quite easy to publish SMB shares from Linux to make them visible to Windows systems. There are wsdd and other similar projects for this purpose. But the discovery of these shares in Linux in general is not ideal. As far as I can tell, only the KDE environment provides graphical file managers that support this protocol. This is possible thanks to its implementation in the KIO extras project. GNOME doesn’t support it yet.


The big news is that I recently proposed a WS-Discovery backend for the GVfs project. It doesn’t implement the protocol itself, but uses the wsdd project’s API. There are still some small things that would be nice to improve, but I hope this will be part of GNOME 46 to make Windows shares visible again!

Join the Conversation

2 Comments

  1. I will be very happy when you fix this, it’s been an annoyance for years.
    Once I looked into it, I realised that it was indeed Windows fault changing things back in SMB2 times, but wow it seems like a hard problem and nothing quite works.

    KODI has a similar problem.

    Please test with both IPV4 and IPV6 – I see if this is working from time to time in Nautilus and KODI, back in KODI land the IPV4 vs IPV6 thing seemed to confuse things (i.e. I might be in one mode but the share only advertises and address in the other).

Leave a comment

Your email address will not be published. Required fields are marked *