Ubuntu 和 OS X 中 Windows 共享的浏览器链接

Ada*_*m S 5 linux samba network-shares macos

在 Windows 中,我可以在任何浏览器中为网络共享上的文件创建书签,如下所示:

file://network/path/to/file/example.htm
Run Code Online (Sandbox Code Playgroud)

这在 Windows 中运行良好,因为它避免了需要复杂的内容服务器来提供基本页面。更大的原因是它是一个公司网络,我们不能拥有 Web 服务器。

有没有办法在 Linux 和 OS X 中类似地做到这一点?Samba 已安装,但如何将 URL 格式化为指向 Windows 共享上的文件?

har*_*ymc 1

Windows 共享使用SMB 协议进行文件共享。

要在 Linux 中使用此类共享,您必须安装软件包 sambe-client。要从您的计算机公开此类共享,您需要 sambe-server。

共享文件的语法是smb://computer/sharename/....

并非所有浏览器都允许在其初始配置中使用 SMB 协议。

例如,Firefox smb woes主题中的最后一个答案说:

该解决方案特定于 GNOME 下的 Firefox 3.5 及更高版本。

第 1 步:Firefox 关于:配置

network.protocol-handler.expose.smb : false
network.protocol-handler.external.smb : true
Run Code Online (Sandbox Code Playgroud)

步骤 2:在命令行中:

gconftool-2 -s /desktop/gnome/url-handlers/smb/command '/usr/bin/nautilus %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/smb/enabled --type Boolean true
Run Code Online (Sandbox Code Playgroud)

第 3 步:运行 Firefox 并在地址栏中输入您的 smb URL,例如:

smb://myserver/myfolder
Run Code Online (Sandbox Code Playgroud)

将弹出一个菜单,询问您要使用哪个应用程序。选择 nautilus,单击“始终使用”复选框。