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.
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
- RSS Feeds
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- What's the tweeting protocol?
- Tech Tip: Really Simple HTTP Server with Python
- Kernel Problem
31 min 16 sec ago
- BASH script to log IPs on public web server
4 hours 58 min ago
8 hours 34 min ago
- Reply to comment | Linux Journal
9 hours 6 min ago
- All the articles you talked
11 hours 30 min ago
- All the articles you talked
11 hours 33 min ago
- All the articles you talked
11 hours 34 min ago
15 hours 59 min ago
- Keeping track of IP address
17 hours 50 min ago
- Roll your own dynamic dns
23 hours 3 min ago