Tux Knows It's Nice to Share, Part 7
Hello, everyone, and welcome back to the "SysAdmin's Corner". Yes, I know, it has been awful quiet in the neighborhood in the last three weeks or so. I could give you the standard excuse about alien abductions or mud-wrestling tours of Europe and Asia, but instead I've decided to tell you the truth. I've been busy wrapping up the final touches on my new book (in stores Summer/Fall 2001). And yes, it is a Linux system administration book (details at the end of this article).
Although it was forever ago, we were talking about using Samba so that Tux could be part of that Windows action on your network. We also talked about how you can even use Samba exported shares on a Linux system to create mounts on other Linux systems. Yes, true believers, Samba doesn't just serve up Windows. It can be part of your whole network file sharing scheme with or without Windows in the picture.
One of the things your Windows friends will point out, however, is the friendliness with which they can mount shares or network drives in their Network Neighborhood. Never mind that the server they are connecting to is a Linux server running Samba, they still have to rub it in. With that in mind, I decided to go looking for ways to become part of the neighborhood in a similar, graphical fashion. That's how I came across LinNeighborhood, from Hans Schmid and Richard Stemmer.
To get your copy of LinNeighborhood, surf on over to this address:
Then, extract the source, compile and build. You do need to have GTK installed for this, but most of the major distributions should already have it.
tar -xzvf LinNeighborhood-0.6.2.tar.gz cd LinNeighborhood-0.6.2 ./configure make make install
To start the program, type this command (this is mixed case, so be be careful when typing it):
Of course, if you have a PATH to /usr/local/bin, you can certainly save yourself a few keystrokes.
Now, what's great about this program is that aside from the nice, graphical view of your neighborhood, you can also mount a share with a click. A dialogue window pops up with options for SMB user name and password, and asks whether or not you want to run a file manager (midnight commander) upon connecting. All this, and it looks good too.
A couple of words of warning (they mention it in the BUGS file included with the program). The program looks for the smbmnt executable in your $PATH, so you may need to create a symbolic link to it.
ln -s /usr/sbin/smbmnt /usr/local/bin/smbmnt
The second thing is that the same smbmnt program must be SUID root for the program to be able to mount a share.
# chmod 4755 /usr/sbin/smbmnt
This isn't your only option. Another such package is xSMBrowser from chadspen. The look is different but also quite attractive. Like the LinNeighborhood package we just talked about, it also allows you to browse, mount shares and so on. Look for it at this URL:
Seeing as xSMBrowser is essentially just a script, there isn't much to compile. Extract it into a temporary directory; you can even start the program from there.
tar -xzvf xsmbrowser-3.4.0.tar.gz cd xsmbrowser-3.4.0 ./xsmbrowser
What is fascinating about this program can be best demonstrated by starting it from a terminal window and keeping that window open and nearby. Whenever you ask xSMBrowser to do something, like mount a directory or look into a shared directory, you can see all the Samba commands being executed in the open window.
For those trying to learn what can be done with Samba, or how to do something from the command line, this is a great learning tool. Click on a folder, watch the X display as it generates your list of files, but also keep an eye on the open terminal window.
Using our example from the last column of the ROCKGROUP workgroup, I click on a share called "win95". Inside is another folder called "camera", and I watch the result. Since I can see the command it executed, I can just cut, paste and run the same from the command line.
smbclient //SCIGA/win95 -I 192.168.22.100 -D camera -W ROCKGROUP -c dir
You may have used it yourself or watched your coworkers fire those little one- or two-line messages around the office; a little program called Winpopup.exe beeps at them and pops up a little window with their message. Of course, you know you can send them a message with the smbclient program on your system. Let's pretend I have a PC whose network neighborhood name is "speedy".
smbclient -M pcname added interface ip=192.168.22.100 bcast=192.168.22.255 nmask=255.255.255.0 Connected. Type your message, ending it with a Control-D
You type your message, press Ctrl-D at the end, and they get a message.
Still, that's not the same as having a cute little pop-up window. Besides, they try replying to you and you get, well, nothing. Fear not! You too can get in on the silly-little-message action. Looking around, I found a neat little program that does essentially the same thing for Linux, only more so. It's called LinPopUp (written by a guy named Jean-Marc), and you can get it at the following URL:
Click on the iceflo labelled Downloads on the left-hand side and download the latest version. The installation instructions for LinPopUp are a little bit different but still a piece of cake. You do need to have GTK installed.
tar -xzvf LinPopUp-1.2.0.src.tar.gz cd LinPopUp-1.2.0 ./Make ./Install
In order to use LinPopUp, you are going to have to add a line to your /etc/smb.conf file (or /usr/local/samba/lib/smb.conf file if you compiled Samba from source).
message command = /usr/local/bin/LinPopUp "%f" "%m" %s; rm %s
You should not have to restart Samba for this to take effect. Now, start LinPopUp from your X window environment.
/usr/local/bin/LinPopUp -min &
The -min flag starts the program minimized. Now, if I go over to a Windows workstation, start winpopup.exe and type a message addressed to my Samba server, a nice little window pops up--like the one you see below.
Well, I've used up my allotted batch of electrons for the week. Until next we meet here at the SysAdmin's Corner, remember what your Momma said, "It's nice to share". And remember that Tux knows it too.
Ah, yes, the book. Coming Summer/Fall 2001 to a store near you, Linux System Administration: A User's Guide, written by yours truly and published by Addison Wesley. ISBN 0-201-71934-7.
Looking for past articles to this series? Click here for a list.
|December Daily Giveaways are Back!||Dec 01, 2015|
|December 2015 Video Preview||Nov 30, 2015|
|Take Control of Your PC with UEFI Secure Boot||Nov 30, 2015|
|Geek Hide-away in Guatemala - Stay for Free!||Nov 26, 2015|
|Microsoft and Linux: True Romance or Toxic Love?||Nov 25, 2015|
|Non-Linux FOSS: Install Windows? Yeah, Open Source Can Do That.||Nov 24, 2015|
- Take Control of Your PC with UEFI Secure Boot
- Cipher Security: How to harden TLS and SSH
- Non-Linux FOSS: Install Windows? Yeah, Open Source Can Do That.
- December Daily Giveaways are Back!
- Web Stores Held Hostage
- Firefox's New Feature for Tighter Security
- Microsoft and Linux: True Romance or Toxic Love?
- Geek Hide-away in Guatemala - Stay for Free!
- diff -u: What's New in Kernel Development
- PuppetLabs Introduces Application Orchestration