Gnome3 Samba/Windows Shares Browsing

I’m using Gnome 3 since NixOS 19.09 (now 20.03) on my laptop and everything works great. There is one minor exception and that is that Gnome Files is not able to show Windows/SAMBA shares in the network:

Manually connecting to a Samba server by typing in the address works fine.

In the same network, my Fedora system has no problems showing available Samba shares in Gnome Files. The firewall is disabled, is there anything else that could prevent this from working?

@blitz Maybe you miss the “cifs-utils” package? (Works fine for me on 19.09).

Mmh. Wouldn’t that mean that I can’t mount Samba shares at all? The problem is only about seeing them automatically pop up in Gnome Files instead of having to manually mount them via “Connect to Server”.

Well I have both samba and cifs-utils packages installed and I can browse the cifs paths without the need of manually mounts. Cannot quit remember, but think I did get that feature after also install the cifs-utils package.

So it seems Gnome Files needs avahi to work, but the avahi daemon fails:

Apr 21 18:35:25 canaan.localhost systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Apr 21 18:35:25 canaan.localhost avahi-daemon[876]: Found user 'avahi' (UID 497) and group 'avahi' (GID 499).
Apr 21 18:35:25 canaan.localhost avahi-daemon[876]: Successfully dropped root privileges.
Apr 21 18:35:25 canaan.localhost avahi-daemon[876]: avahi-daemon 0.7 starting up.
Apr 21 18:35:25 canaan.localhost systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Apr 21 18:35:25 canaan.localhost avahi-daemon[876]: Failed to read /etc/avahi/services.
Apr 21 18:35:25 canaan.localhost avahi-daemon[876]: Failed to create server: Invalid host name
Apr 21 18:35:25 canaan.localhost avahi-daemon[876]: avahi-daemon 0.7 exiting.
Apr 21 18:35:25 canaan.localhost systemd[1]: avahi-daemon.service: Main process exited, code=exited, status=255/EXCEPTION
Apr 21 18:35:25 canaan.localhost systemd[1]: avahi-daemon.service: Failed with result 'exit-code'.

After manually setting a hostname with services.avahi.hostName the avahi daemon comes up and everything seems to be working!

After digging deeper it turns out the underlying problem is that networking.hostName contained a domain. This is of course BS, because that should go into networking.domain. I wonder why this hasn’t caused other problems. Anyway, with the hostname fixed in the network config, everything works out of the box.

3 Likes