Section 6.4. Configuring GUI Workgroup Browsers


6.4. Configuring GUI Workgroup Browsers

If you're migrating desktop users from Windows to Linux, chances are your users will be familiar with the Windows Network Neighborhood or My Network Places network browsers. These browsers enable users to easily locate network resources in a friendly visual manner. The core Linux SMB/CIFS client tools, though, are purely textual, and hence decidedly unfriendly to users who aren't comfortable with text-mode commands. Fortunately, some tools exist that provide GUI frontends to the text-based tools or that integrate SMB/CIFS functionality into primarily GUI tools. Installing and configuring such tools can help make former Windows users feel at home on a Linux desktop system.

6.4.1. A Rundown of GUI Network Browsers

Fitting with the Unix tradition of creating small programs that work together, many SMB/CIFS network browsers serve as frontends to the text-mode tools. Others use functions that are now provided in Samba libraries to handle much of the grunt work of SMB/CIFS interactions. These tools differ in their levels of sophistication and precise feature sets. Examples include:


Konqueror

This program is the file manager and web browser in the K Desktop Environment (KDE; http://www.kde.org) package. It supports accessing SMB/CIFS shares when the user enters an SMB/CIFS URI, such as smb://MANDRAGORA/SHARED, in a window's path specification. Konqueror doesn't actually mount shares on the Linux filesystem.


Nautilus

The GNOME file manager, Nautilus, supports SMB/CIFS access. You may need to select the File Open Location option in the program and enter a URI for your share. Like Konqueror, Nautilus doesn't actually mount the SMB/CIFS share, but it does provide drag-and-drop access to files.


LinNeighborhood

This program provides a GUI frontend to several Samba and related utilities, the end result being a system that's similar to Network Neighborhood or My Network Places in overall capabilities. It uses smbclient to mount remote shares, so they're accessible to all programs. If LinNeighborhood doesn't ship with your distribution, you can obtain it from http://www.bnro.de/~schmidjo/.


Gnomba

Like LinNeighborhood, Gnomba is an SMB/CIFS network browser that supports mounting shares you discover in the Linux filesystem tree. You can obtain it from its home page, http://gnomba.sourceforge.net.


xSMBrowser

This program doesn't actually mount remote shares, but it enables easy browsing of the network. Check the project's home page, http://www.public.iastate.edu/~chadspen/, for more information.


SMB2WWW

This tool is unusual in that it's an interface between HTTP, which is used by web browsers, and SMB/CIFS. The program runs as a Common Gateway Interface (CGI) program from a web server, giving web browsers that access the server the ability to browse the local SMB/CIFS network. You can obtain more information and download the program from http://www.scintilla.utwente.nl/users/frank/smb2www/.

There are several more GUI tools for Linux SMB/CIFS interfacing, including some very specialized ones. Check http://www.samba.org/samba/GUI/ for brief descriptions and links to those tools that have been registered with the main Samba project.

6.4.2. Using LinNeighborhood

LinNeighborhood provides fairly typical network-browsing features, although its user interface isn't quite as polished as some users might expect. Still, it works with a variety of desktop environments, which can be a big plus. Before you can use it in any significant way, you must install and configure it:

  1. Check your distribution or the LinNeighborhood web site itself for the program. The web page includes binaries in several different formats, or you can download and install the source code.

  2. As an ordinary user, type LinNeighborhood in an xterm or similar window. The result is the main LinNeighborhood window.

  3. Click the Prefs button in the LinNeighborhood window. LinNeighborhood displays its main Preferences dialog box, as shown in Figure 6-1.

    Figure 6-1. LinNeighborhood configuration


  4. Enter the information in the Scan tab. The workgroup is particularly important, but you may want to enter the IP address of your NBNS system. LinNeighborhood should be able to find the primary master browser automatically, and because this can change unexpectedly, it's probably best to leave this field alone. Adjusting the various checkboxes can also help in some cases; for instance, you might want to perform scans as your logon user rather than anonymously.

  5. Click the Programs tab, and check the entries there; they relate to the programs LinNeighborhood uses to do the real work. Chances are you won't need to adjust these entries.

  6. Click the Miscellaneous tab, and check the items there. Particularly if you checked "Always scan as user" on the Scan tab, you may want to enter a default user. If you enter a default password, be aware that LinNeighborhood will store it in a plain-text file, ~/.LinNeighborhood/password, in your home directory. Be sure that file is readable only to you!

  7. Click the Post Mount tab, and adjust the items there. This tab enables you to launch a file manager on shares you mount, or conceivably perform other arbitrary actions.

  8. When you're done with the Preferences dialog box, click Save, followed by Close.

The LinNeighborhood configuration files are in the ~/.LinNeighborhood directory, and in particular, in the preferences file. You can configure LinNeighborhood as you like and then copy this file to all users' home directories. You may need to omit or customize the default_user line from this file, though.


LinNeighborhood should now be configured and ready to function. If you don't yet see a list of systems in the main window, as shown in Figure 6-2, try right-clicking the machine name, and select Rescan Groups from the resulting pop-up menu.

Figure 6-2. The main LinNeighborhood window provides point-and-click network browsing


You can browse the network in a way that should be familiar to those with GUI file manager or network browser experience: double-click machine names (such as HALRLOPRILLALAR and LOUISWU in Figure 6-2) to open them, or click the plus or minus symbol next to the name to open or close a machine that's already been visited. Depending on your settings, you may be asked to enter a username and password when you do this. Double-clicking a share's folder under a machine (such as CDRIVE or EDRIVE in Figure 6-2) brings up a mount dialog box in which you specify the mount point, username, password, and so on. LinNeighborhood then mounts the share and displays it in the bottom pane of its main window, along with other SMB/CIFS mounts. If you configured LinNeighborhood to launch a file manager after mounting a share, your file manager window should appear.

To mount shares, LinNeighborhood requires that you either enter the root password in the mount dialog box or set the SUID bit on the smbmount binary, as described in Section 6.2.2.


To unmount a share, right-click the share or its mount point in the bottom pane of the window, and select Unmount from the resulting pop-up menu. LinNeighborhood should unmount the shareif it can. If any programs have open files on the share, LinNeighborhood won't be able to comply.

On some systems, smbumount won't be able to unmount the filesystem, despite the fact that it was mounted with smbmount. This appears to be a bug in smbumount.


6.4.3. Using Konqueror

Konqueror, the primary web browser and file manager for KDE, also supports SMB/CIFS; however, this support is fairly recent and is still improving. Konqueror's support also doesn't actually mount the share in the Linux filesystem. This means that if you attempt to directly access a file (say, by double-clicking it), either Konqueror must copy the file to a temporary local location and then copy it back when you're through or the application used to access the file must implement its own SMB/CIFS support. Konqueror, like other GUI SMB/CIFS tools, also relies on other support libraries. For the most part, these are installed with your main Samba or Samba clients package.

To use Konqueror's SMB/CIFS features, you should first launch it. Most Linux distributions place a link for Konqueror in a menu or on the desktop, particularly when you run KDE rather than GNOME or some other desktop environment. If you can't find a link, type konqueror in an xterm or similar window.

Once Konqueror is running, type a URI (beginning with smb://) for the machine or share you want to access in the Location field. If you enter a complete share specification, Konqueror asks for a username and password, which you must enter correctly. (If you enter a machine name without a share name, Konqueror defers asking for a username and password until you try to access a share.) Konqueror should then present a list of file shares on a server or files and folders in a share. For instance, Figure 6-3 shows Konqueror's display of the shares on the SPEAKER server. You can browse your entire network by entering smb:/ as the device URI (the number of slashes is critically important: you must place one slash after smb:).

Figure 6-3. Konqueror displays shares and their files much as it displays local files


In theory, you should be able to use an SMB/CIFS share much as you'd use a local directory, by clicking folders to open them and clicking files to launch applications that will read the files. In practice, though, this sometimes doesn't work correctly. Konqueror may hang during file transfers to temporary locations, or programs may fail to load the files. These problems will likely diminish as Konqueror's SMB/CIFS support matures.



    Linux in a Windows World
    Linux in a Windows World
    ISBN: 0596007582
    EAN: 2147483647
    Year: 2005
    Pages: 152

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net