Cooking with Linux—The French Connection
Allo, and welcome to Chez Marcel, home of fine French Linux cooking.
Please take a seat. If you have not already done so, I would like you to read this article with a somewhat exaggerated French accent since that is the way I wrote it. Even the README files are heavily accented. For those of you who, like myself, are French, you may translate as you read, thus adding another level of authenticity to the excellent menu that awaits you.
It is an honour and a privilege to welcome you to my kitchen. Tonight, I have a special treat for you. The recipes I have prepared are made from common Linux distribution ingredients so that you can recreate these delicacies when you return to your own kitchen CPU. Tonight's menu:
Mail notification for Windows clients
What's my IP?
Waiter! More disk.
Waiter! There's a fly in my system.
Is it That Time Already?
I must tell you right now that I am thrilled you have decided to join me in my kitchen. Much of what I have in store for you is designed to make Windows 9x more productive with a little help from Linux. If you have already cast away your Windows PC but you miss some forgotten piece of software (provided that software is not too demanding), you could check out http://www.winehq.com/ for the latest version of the Windows non-emulator for Linux.
For many users out there, the Windows workstation is still on the desktop, while the Linux machine performs such noble tasks for the Windows user as connecting to the Internet, providing firewall services, delivering mail, sharing disk space and printers, among other services.
What we have in store for you here today are Linux scripts that can make your Windows experience more enjoyable.
In the next few examples, we will have our Linux system talk back to Windows. While that is a good idea, we must first set up Windows to listen; otherwise, all our talk will disappear into the proverbial ether. When our Linux system needs to contact a Windows user, it will do so using Samba's smbclient messaging functionality. Obviously, that requires a system running Samba. On the Windows side, it requires Winpopup.
To set up Winpopup to start each time you boot Windows, create a shortcut in the Windows Startup folder. Click on the Start button, then Settings, then Taskbar. Choose the tab that says “Start Menu Programs”, then click the Advanced button. This will open a Windows Explorer window. Open the Startup folder under Programs and add a shortcut to winpopup.exe. Accept the default name, and you will wind up with a cute little Jack-in-the-box icon. Right-click on it to access the properties tab. Now, set the Run: option to Minimized. Winpopup starts up out of the way, and pops up only when it gets a message. Double-click the icon to start it right away.
One more thing: you should now see Winpopup sitting minimized on your taskbar. Click on it to bring it up. Now click on Messages, and choose Options from the drop-down menu. Click the box for “Pop up dialog on message receipt”. Click OK and re-minimize Winpopup. Windows is now ready to receive messages from your Linux system, which brings us to the next item on the menu.
This is a frequent question we get from users. You are the administrator of a small- to medium-size office; you've set up an Internet gateway that picks up the mail on a regular basis using fetchmail, which then stores it on your Linux server. The problem is that your users are still running Windows with some sort of stand-alone POP3 e-mail package like David Harris' Pegasus Mail. While many packages can be set up to retrieve mail automatically, keeping them open and running taxes their already taxed Windows system. This means users tend to point out how slowly their systems are running. You suggest they close a few applications. “How about e-mail?” you suggest. To which they reply, “What if I miss an important message?” The solution is the checkusermail script shown in Listing 1.
In /usr/local/etc, create a small text file called mail_notify with the names of users who receive mail on your system. If the Windows clients are named differently (in the network configurator of the Windows control panel) than the user ID for mail, create an /etc/lmhosts file with IP addresses matching your mail user IDs, and the results should be the same. The script can be run from cron at whatever time interval suits your environment. Since it runs as root, it can spy into everyone's mailbox with the frm command. It will tell each user they have mail and how many messages. If there is no mail, there is no message and no need to waste time and energy checking every few minutes.
Another happy soul you'll discover after you deploy this script is the boss who had been complaining about either the amount of time users spent checking mail, or the user who did not check it often enough and missed an important message.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide