Browser link to Windows share in Ubuntu and OS X

5

0

In Windows, I am able to create a bookmark in any browser to a file on a network share, like so:

file://network/path/to/file/example.htm

This works well in Windows because it avoids needing a complicated content server to serve up basic pages. The bigger reason is that it's a corporate network and we can't have a web server.

Is there a way this can be done similarly in Linux and OS X? Samba is installed, but how could the URL be formatted to point to the file on the Windows share?

Adam S

Posted 2011-10-14T22:34:14.140

Reputation: 738

Answers

1

Windows shares use the SMB protocol for file sharing.

To use such shares in Linux, you must have installed the package sambe-client. To expose such shares from your computer, you need sambe-server.

The syntax for a shared file is smb://computer/sharename/....

Not all browsers allow the SMB protocol in their initial configuration.

For example, the last answer in the thread Firefox smb woes says :

this solution is specific to firefox 3.5 and higher under GNOME.

Step 1: Firefox about:config

network.protocol-handler.expose.smb : false
network.protocol-handler.external.smb : true

Step 2: At the command line:

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

Step 3: Run firefox and enter your smb URL into the address bar, eg:

smb://myserver/myfolder

a menu will pop up asking you which application to use. select nautilus, click the "always use" checkbox.

harrymc

Posted 2011-10-14T22:34:14.140

Reputation: 306 093

For OS X, you should be able to ommit step 2 as smb:// is already bound to Finder. – Jens Erat – 2011-10-25T18:03:39.893

0

On OS X, a connected SMB share will be mounted as /Volumes/<share name> (with spaces in the share name being replaced by %20 – see this Apple Support article on SMB share connection). The URL to your file would thus be:

file:///Volumes/share/path/to/file.html

As to Ubuntu, I am no expert, but this Ubuntu Documentation article indicates how to permanently connect to a SMB share, and once you have done that, the file URL should be constructed in a way analogous to the OS X one, starting with the mount point chosen in fstab.

kopischke

Posted 2011-10-14T22:34:14.140

Reputation: 2 056

-2

On OS X, smb://myserver/myfolder works out-of-the-box in Safari browser.

dmitriy

Posted 2011-10-14T22:34:14.140

Reputation: 1