2

To accomplish the task of opening a CIFS/Samba folder from a browser you can make a .URL "internet shortcut" file that Windows downloads and opens. On linux, xdg-open will handle smb:// anchor links. Is there a way to accomplish the same task on a Mac?

On Windows

<a href="http://a.co/file.url">This is a link.</a>
<!-- contents of file.url:
[InternetShortcut]
URL="file:////10.0.1.202/myShare/my Folder"
-->

On Linux:

<a href="smb://10.0.1.202/myShare/my Folder">This link works on glorious Linux</a>
<!-- the protocol gets handled by xdg-open -->

On MacOS?

<a href="[???]">A link that works on the BSD based MacOS.</a>
Ray Foss
  • 1,864

1 Answers1

2

I don't have a SMB server to test any of this, but Safari accepts this in a .html file:

<a href="smb://10.0.1.202/myShare/myFolder">This link works with Safari</a>
<!-- the protocol gets handled by NetAuthSysAgent -->

For Firefox, assign Finder to handle the smb content type.

Finder will open a Drag Clipping file, e.g., myFolder.inetloc:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>URL</key>
   <string>smb://10.0.1.202/myShare/myFolder</string>
</dict>
</plist>
creidhne
  • 1,960