Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Linux with Firefox
In order to connect to a network share directly from you browser under Linux, you must configure Firefox to handle URL's starting with "smb://". This is done by typing "about:config" in the address line and hitting return. After that you must right-click the list of settings and choose "New -> Boolean" as shown below.

As name you must type: "network.protocol-handler.external.smb" with a value of "true".
After that you must do the same thing over again, but this time choose "New -> String", type the name: "network.protocol-handler.app.smb" with a value of the path to the application you wish to use for browsing network shares. If you use KDE, this will typically be "/usr/bin/konqueror".

I hope this is sufficient detail for someone to give me some ideas for how to solve this problem.

Firefox doesn't support SMB/CIFS. You'll need to use a different application to actually view the network shares. If you use one of the heavier-weight desktop managers (i.e. GNOME or KDE), your graphical file browser probably supports it. If not, there are dedicated applications for SMB browsing or you can mount the share directly.

The instructions you found are for setting up a protocol handler. Protocol handlers do not enable Firefox to display the content itself; instead they tell it what application to launch to handle a specific type of URL. Once you've found an SMB client you like, you can set up a protocol handler so that Firefox launches it when you give it an smb:// URL.

Firefox doesn't support SMB/CIFS. You'll need to use a different application to actually view the network shares. If you use one of the heavier-weight desktop managers (i.e. GNOME or KDE), your graphical file browser probably supports it. If not, there are dedicated applications for SMB browsing or you can mount the share directly.

The instructions you found are for setting up a protocol handler. Protocol handlers do not enable Firefox to display the content itself; instead they tell it what application to launch to handle a specific type of URL. Once you've found an SMB client you like, you can set up a protocol handler so that Firefox launches it when you give it an smb:// URL.

thanks for your reply.

i had the thought that nautilus *was* the smb browser. i am trying to launch nautilus from firefox to open folders on my network. under Windows IE, launching the file manager (explorer) was possible using activex. i want to do the same with Ubuntu using firefox. problem is, of course, firefox doesn't do activex, and there is no equivalent way of launching the native file manger (nautilus in this case) from an HTML anchor link.

which is why i was thinking of using smb shares instead.

anyway, if google desktop search can launch nautilus from firefox, then obviously there is a way of doing this!

Nautilus, the file manager included with GNOME, is the normal way to view SMB/CIFS shares in GNOME. It is not embeddable in Firefox, unlike the Windows file manager and IE. Firefox can, however, be persuaded to open a separate Nautilus window when you give it an smb:// URL, including from an HTML href anchor. This is what the protocol handlers mentioned in your first post are for.

To set up a protocol handler in Firefox, you need to change some settings in the configuration backend as they're not exposed in the normal UI. To open the configuration manager, type "about:config" into the address bar. Once the config manager loads, put "network.protocol-handler" into its "Filter" box to filter out all the properties irrelevant to protocol handlers. Change your settings to match those below. Forgive the manual table, LQ doesn't support HTML tables as far as I can tell.

As I don't have GNOME installed, I had to guess at the path to Nautilus. If it's wrong, Firefox will display an error saying "protocol smb isn't associated with any program" when you try to open an smb:// URL. If it does that, run "which nautilus" in a terminal and change the path to the one it prints.

As jschiwal and I both mentioned, it is also possible to mount SMB shares as a filesystem. Once it's mounted, it'll look just like any other directory. That way you can look at it with any program you like, whether or not it supports SMB. You seem to like the Firefox-launching-Nautilus solution, so I won't go into detail about mounting SMB shares. If you want me to, tell me.

i set these, but still no deal. i re-checked the nautilus path using "which nautilus", and it was already correct.

btw, the reason i'm 'fixated' on using the web browser to launch nautilus is because my intranet is organised around client records. clicking on a "folder" link takes users straight to the client's folder, where all there relevant files are stored (often quite a few of them). i've still got a few Windows hold-outs in my office, and this is an issue for them. and i must say, i can see their point.

i'm starting to think that it's just not possible to do! which is a little depressing for me and my office ...

This is exactly what Firefox's protocol handlers are for, so it should work. The documentation on protocol handlers is sparse at best so I think we're just missing something. I'll have access to my development box in a few hours, so I'll launch my Ubuntu VM and see if I can't get it working.

NOTE: What I'm writing here applies in my situation, to Firefox and Konqueror on Slackware, but it may well apply just as well for your situation.

This looks like the same situation as trying to get FF to launch Konqueror when it encounters a file:// link or when opening something from FF's sidebar..

By default, it doesn't work, for example in a case where I want to get at something I've downloaded, I want Konqueror to open up my downloads folder when I right-click the downloaded item in my FF downloads sidebar and select "Open Containing Folder". No go.

Putting the direct path to Konqueror, as you have done with Nautilus, does not work either for some reason, despite that appears the logical way to do things. Here's what I did (in about:config):

I think it's the right track too; it's unfortunate though that doing this sort of stuff seems to be implemented slightly differently from one version of FF to the next.. Keeps us on our toes I suppose :/

Now, I realize you've been all over the net searching (I found your problem posted elsewhere by you) but here's another link, just in case you haven't been to this one yet; it's a Mozilla KB article, describing what we're trying to do here: http://kb.mozillazine.org/Register_protocol#Linux

That's the "Linux" section of the page. You'll see 3 methods there: (1) for all FF versions and requires gnome libs; (2) FF3.5 specific..; and (3) FF up to 3.0 (not for us, too old.)

Now, method (2) shows setting network.protocol-handler.expose.foo to false, so that when FF encounters such a link (smb in your case) it should ASK you what app you want to open it with.

And method (1) shows some different way of, I guess, accomplishing the same thing, but it is Gnome-specific:

I think it's the right track too; it's unfortunate though that doing this sort of stuff seems to be implemented slightly differently from one version of FF to the next.. Keeps us on our toes I suppose :/

Now, I realize you've been all over the net searching (I found your problem posted elsewhere by you) but here's another link, just in case you haven't been to this one yet; it's a Mozilla KB article, describing what we're trying to do here: http://kb.mozillazine.org/Register_protocol#Linux

That's the "Linux" section of the page. You'll see 3 methods there: (1) for all FF versions and requires gnome libs; (2) FF3.5 specific..; and (3) FF up to 3.0 (not for us, too old.)

Now, method (2) shows setting network.protocol-handler.expose.foo to false, so that when FF encounters such a link (smb in your case) it should ASK you what app you want to open it with.

And method (1) shows some different way of, I guess, accomplishing the same thing, but it is Gnome-specific: