XDG Desktop files with smb:// URI

Mikhail Novosyolov m.novosyolov at rosalinux.ru
Tue Feb 11 19:50:36 UTC 2020


11.02.2020 19:25, Igor Chudov via samba-technical пишет:
> Hello, colleagues!
>
> Does anyone know how to create .desktop file with smb:// URI so it will be possible to open Samba share via file manager like Thunar or Nautilus?
>
> I've created .desktop file like:
>
> [Desktop Entry]
> Type=Link
> Version=1.0
> Name=Docs
> GenericName=Link to CIFS disk
> Comment=Link to Samba share
> URL=smb://10.x.x.x/doc/
>
> And file managers saying "Incorrect .desktop file smb://..." despite the fact that copypasting link "smb://10.x.x.x/" into address field allows me to query the resource.
>
> ---
> With best regards, Igor Chudov.
>
I solved it like this for sftp://, the same will work for smb://:

Exec="xdg-open sftp://10.x.x.x/doc"

Or try to add: "MimeType=x-scheme-handler/smb;" - to the desktop file of the FM.

Note that xdg-open will ignore KDE mimetypes associations which do not follow Freedesktop standards.

But I have just tried the following desktop file:

> [Desktop Entry]
> Version=1.0
> Type=Link
> Name=Расписание
> Comment=
> Icon=gnome-fs-bookmark
> URL=smb://test/
It worked as expected in XFCE with KDE Dolphin as the default file manager.




More information about the samba-technical mailing list