Bug 456746 - Dolphin don't use fqdn for sharing smb network
Summary: Dolphin don't use fqdn for sharing smb network
Status: RESOLVED NOT A BUG
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.04.3
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-15 09:13 UTC by Marc
Modified: 2022-07-18 12:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
First screenshoot (46.09 KB, image/png)
2022-07-15 17:42 UTC, Marc
Details
Second Screenshot (51.62 KB, image/png)
2022-07-15 17:43 UTC, Marc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc 2022-07-15 09:13:23 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

I have a home workgroup called Atlantis.

The fqdn for my destop is : 
marc@Midgard:~$ hostname --fqdn
Midgard.Atlantis

The fqdn for my server is :
marc@gallifrey:~$ hostname --fqdn
gallifrey.Atlantis

STEPS TO REPRODUCE
1. In the left panel of Dolphin click on "network"
2. Click on Shared Folder (SMB)
3. It show me all shared machine on my network (eg : Gallifrey, Kodi and Midgard)
4. Click on Gallifrey

OBSERVED RESULT
After step 4 Dolphin try to connect on gallifrey.local instead off gallifrey and an error message "Impossible to connect"

If I enter smb://gallifrey in the address bar, that work. 
If I enter smb://gallifrey.atlantis no error message appears, but dolphin can't show any shared folder.

EXPECTED RESULT
Dolphin should search gallifrey.Atlantis instead of gallifrey.local and show shared folder

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Debian SID
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Kernel : 5.18
Graphic : X11
Comment 1 Harald Sitter 2022-07-15 10:07:29 UTC
How did you set up your domain? Ideally exact steps to reproduce the setup.

Also, https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Debugging_IOSlaves/Debugging_kio_smb#Reporting_Bugs
Comment 2 Marc 2022-07-15 17:42:00 UTC
Hi Harald,

"How did you set up your domain?"

On my desktop :

marc@Midgard:~$ cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       Midgard.Atlantis        Midgard

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

marc@Midgard:~$ cat /etc/samba/smb.conf
# Sample configuration file for the Samba suite for Debian GNU/Linux.
[...]
[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = Atlantis
[...]

On my server :

marc@gallifrey:~$ cat /etc/hosts
127.0.0.1       localhost
127.0.0.1       gallifrey.Atlantis      Gallifrey

::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

marc@gallifrey:~$ cat /etc/samba/smb.conf
# Sample configuration file for the Samba suite for Debian GNU/Linux.
[...]
[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = Atlantis
[...]

The rest of the smb.conf are the default file from the Debian installation.

marc@Midgard:~$ export KDE_FORK_SLAVES=1
marc@Midgard:~$ export QT_MESSAGE_PATTERN='[%{time process}](%{pid})/(%{category}) %{function}: %{message}'
marc@Midgard:~$ export QT_LOGGING_RULES='log_kio_smb=true'
marc@Midgard:~$ dolphin --new-window smb://gallifrey.local
[     0.000](28419)/(kf.kio.core) unknown: "Impossible de se connecter à l'hôte « smb://gallifrey.local/ »"
marc@Midgard:~$ dolphin --new-window smb://gallifrey.atlantis
marc@Midgard:~$ dolphin --new-window smb://gallifrey

dolphin --new-window smb://gallifrey.atlantis -> No error with this command, but no shared folder found
dolphin --new-window smb://gallifrey -> Work perfectly
dolphin --new-window smb://gallifrey.local -> this is the folder, that dolphin want to explore on the GUI by clicking on the network icon
Comment 3 Marc 2022-07-15 17:42:33 UTC
Created attachment 150648 [details]
First screenshoot
Comment 4 Marc 2022-07-15 17:43:09 UTC
Created attachment 150649 [details]
Second Screenshot
Comment 5 Harald Sitter 2022-07-18 12:28:41 UTC
I think you are suffering from a setup problem. Workgroup does more or less nothing these days so it's configuration is moot.

The reason dolphin wants to access gallifrey.local is because the Samba on it probably has multicast enabled (or rather, you haven't disabled it as per your instructions) and we prefer DNS-SD multicast addresses over any other option. Why that fails to resolve I couldn't possibly say but supposedly either your client or server has a bad/incomplete mdns/dns-sd configuration.

gallifrey works because we will still resolve based on netbios names when possible/requested and that would be the netbios name of your configuration (assuming nmbd is running on the server anyway).

gallifrey.atlantis not erroring but also not showing anything is a bit odd and I don't really have an explanation, it's a bit besides the point anyway because as per your instructions you haven't really set up name resolution properly it seems.

What I would suggest is not trying to use adhoc domains like you are trying to. Either get a proper name server. Or just use the .local multicast domain. Or drive your custom domain using mdns (https://wiki.archlinux.org/title/avahi#Configuring_mDNS_for_custom_TLD). Alternatively you could set up your server as proper samba DC but that is a whole lot of work. I would very much suggest you simply rely on .local for name resolution (or use a different suffix as in the arch wiki explanation), it's supported on all Linuxes, OSX and Windows 10+