Linux

LinNeighborhood provides a GUI for Linux to browse a Windows network

See how to set up and use LinNeighborhood as a GUI front end for the smbmount and smbclient commands on Linux.

It's been a long time coming, but Linux finally has some sense of integration salvation on the horizon. Hans Schmid and Richard Stemmer have created LinNeighborhood, a lightweight front end for the smbmount and smbclient commands.

LinNeighborhood is an Xwindow graphical port of Network Neighborhood, running over Samba utilities and the Linux smbfs programs under kernels less than 2.1.70 and smbmount/smbmnt/smbumount under kernels greater than 2.1.70. LinNeighborhood permits the user to browse an SMB (CIFS) network consisting of Samba, Windows (Windows for Workgroups, 95, 98, NT), and probably (although these haven’t been tested) OS/2 and LANManager for DOS, among others. It also offers an interface for mounting the found shares.

I happened to come across this little gem while I was, surprisingly enough, writing the previous article on the Samba smbmount command. I knew I wanted to spotlight a GUI application, but I was concerned because there really wasn't a good one available. Sure, GNOME has Gnomba, but it’s pretty useless when you need to actually do WORK (like accessing a farm of Microsoft machines on a network). Then, along came an e-mail (on one of the many lists I frequent) about a little application called LinNeighborhood.

Installing LinNeighborhood
I went to the Web site and happily noticed that both sources and rpm packages were available. To expedite the process, I chose the rpm package (which is concurrent with the source release of 0.6.0) and installed it with this simple command:
rpm -ivh LinNeighborhood-0.6.0-1.i386.rpm

Installing with the source is just as simple. Once you've downloaded the file LinNeighborhood-0.6.0.tar.gz, you run this command:
tar xvzf LinuNeighborhood-0.6.0.tar.gz

followed by:
cd LinNeighborhood-0.6.0

and finally the following set of commands (run as root):
./configure
./make
./make install


Once you've run the above commands, the package should be successfully installed.

Starting and configuring LinNeighborhood
You can run the LinNeighborhood application in one of two ways:
  • Using the command LinNeighborhood
  • Selecting the LinNeighborhood command from the main menu (in GNOME, this command is on the Applications menu; in KDE, you have to add it to the menu)

Once you have the application open, you will see something like Figure A, which shows the LinNeighborhood interface with an open Microsoft share called nt2 (a user-configured name). But how do we get to this point? Good question. Let's get to work!

Figure A
Once you open LinNeighborhood, you’ll see this window.


Configuring LinNeighborhood is very easy. If you have a basic knowledge of your network environment and a correctly configured smb.conf file, the configuration process should take only seconds.

The first step in configuring the application is to open LinNeighborhood and choose Options | Preferences. In the resulting window, enter your network's workgroup information on the Scan tab, as shown in Figure B.

Figure B
Enter your network's workgroup information in the main configuration window.


On the Scan tab, you can choose to configure a primary master browser, configure a WINS server, and edit the master browser list. You also have these options:
  • Always Scan As User
  • Group Scan As User
  • Groups Scan As User
  • Ask User/Password Once
  • Use Group Name On Mount
  • Initial Browse On Startup
  • Quick Browse

Of the above configurations, Workgroup and Always Scan As User will most likely be the options that will get you going. With these options configured, when you open up the application you will only have to double-click the shares and then enter your username and password to silently mount the shares.

Next, click the Programs tab. This tab contains three check boxes:
  • Version <= 2.0.4
  • Version = 2.0.5
  • Version >= 2.0.6

Here you must specify your installed version of Samba and configure the options accordingly. To check which version of Samba you are running, issue the following command:
rpm -q samba

The most current version of Samba is 2.0.7-4, so select the option Version >= 2.0.6. This step is critical because some earlier versions deal with smbmount and smbclient differently.

At this point, select the Miscellaneous tab. Here you have the option of explicitly configuring the default mount point for the LinNeighborhood package. The nice thing about this (and a big kudos to the creators) is that, upon installation, this option creates the $USER/mnt directories, where all other subdirectories will be silently created. This eases the burden on the user. Less configuration = happier users (Microsoft train of thought, of course).

On the same tab (Miscellaneous), you’ll find the Memorize Mounted Shares/Remount On Next Startup option. You’ll want to enable this option if you’re constantly mounting the same shares. That way, you won’t have to remap a drive every time you run LinNeighborhood.

The Post Mount tab is an interesting option. Here you can configure which file manager you wish to use when opening up the various shares. What is interesting is the way it’s configured. The configuration window offers a drop-down box, a clickable button, and a text field. From the drop-down list you can choose one of these file managers:
  • Midnight Commander
  • KDE's kfmclient
  • GNOME's gmc
  • X-files
  • X Window Finder

Once you've chosen a file manager, you’d think that clicking Save and/or OK would set the configuration. This is not the case. Before clicking either Save or OK, you need to click the Press Button To Move From Combo Box To Edit Field button. By clicking this button, you actually send your configuration option to the proper field.

This illustrates one of the only limitations I've been able to find so far in LinNeighborhood. Many users prefer one file manager over another—so what happens when your preferred file manager is not listed among the above four? Out of luck you are! Fortunately, the available file managers cover a pretty sizable range (from the text-only Midnight Commander to the very capable GUI of gmc).

Using LinNeighborhood
Once you’ve configured LinNeighborhood, using it is a very simple process. In fact, it is one of the simplest Linux networking tools I've had the pleasure of using.

When the application opens, you will see icons in the upper window, representing the available shares on your network (see Figure A). If during the configuration you selected Always Scan As User, a double-click of the share's icon opens a username/password window for that share. Type your username and password, then press the [Enter] key, and the share will open to reveal its treasures.

Alternatively, you can right-click, which brings up a menu full of goodies. Among these options are:
  • Rescan Machine
  • Scan As User
  • Edit Machine
  • Remove Machine
  • Show Information

Of these commands, you will use Scan As User primarily. However, occasionally you'll want to change the information on a particular machine or even simply glean the machine's information. Both tricks are fairly easy.

Gleaning information on a share is as simple as right-clicking the icon and choosing Show Information. You will see the following:
  • Name
  • Domain
  • OS
  • Server
  • IP Address

Once you have mounted a share and expanded its contents, you’ll see the various subdirectories represented as files. Each of these represents a mounted share that you can then browse with the configured file manager. To open the directory, you must right-click the icon and select File Manager. The configured file manager will open, and you’ll browse that share as if it were on your local drive.

Note that the action on the upper window of the main screen is different than that of the lower window. Within the lower window, you’ll see explicit directory paths, such as //nt2/TPG, because you’re revealing all of the currently mounted share subdirectories within this window. For these directory paths, you right-click to access a Mount (or Unmount) or File Manager command. Although in the upper window you can double-click share subdirectories (to mount them), you cannot do so in the lower window.

Notable features
The LinNeighborhood application offers so many features that it would be nearly impossible to highlight all of them. Instead, I'll mention just a few:
  • Simplifies heterogeneous network setup.
  • Takes all of the complication out of using the smbmount, smbfs, and smbclient commands.
  • Moves the user away from the command-line interface.
  • Provides a simple and elegant GUI.
  • Features an intelligent design.
  • Integrates seamlessly with a Windows network.
  • Offers incredible stability (especially considering this release is pre-beta).

Conclusion
If you use Linux and you’re on a network with machines other than Linux, I cannot recommend strongly enough that you pick up this application. LinNeighborhood will make your Linux computing life much easier—you’ll have no idea how you survived without it.

Rarely do applications come across my desk that have such an impact as this little gem. It looks like the creators of LinNeighborhood have done Linux one heck of a favor by putting together a front end for a group of commands that many users don't even know exist—and they’ve done it with aplomb! I applaud the creators of this application with one of the highest recommendations I can give. LinNeighborhood has made my job easier, and for that, LinNeighborhood's parents deserve a big round of thanks.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

0 comments