Economy Size Geek - Adventures in Scanning
I am running Karmic (9.10), but by the time this article is printed, Lucid (10.4) will be released. Simple Scan is being included as part of the release. Simple Scan is a new scanning tool focused on making scanning, in a word, simple. Because it currently is available as part of a PPA (Personal Package Archive), adding it to my system was easy:
sudo add-apt-repository ppa:robert-ancell/simple-scan sudo apt-get update sudo apt-get install simple-scan
The first time I tried Simple Scan, it failed. That was a bit frustrating, but it was my own fault. I had xsane open at the same time. It turns out that each application claims ownership over the device. Once I closed xsane, Simple Scan worked like a champ. It really is simple, and it can do photos or text. Plus, it made making a multipage document as easy as just continuing to scan. xsane gives you incredibly fine-grained control. There probably are situations where I would be glad it includes a histogram of the image, but when all I am trying to do is sign a contract, scan it and e-mail a PDF, Simple Scan fits the bill.
One word of warning before I move on. After spending some time using Simple Scan, I hit a problem. Simple Scan depends on the convert command from ImageMagick to make a multipage PDF from a series of scans. On Karmic, this results in a segmentation fault. I was able to locate a bug report confirming that this problem has been resolved for Lucid, but not for Karmic. There are three options: upgrade to Lucid, pull in only the Lucid packages, or pull in an updated ImageMagick from Raimar Sandner's PPA (see Resources). Long term, I plan to upgrade to Lucid. For now, I just used Sandner's PPA to pull in a fixed version. I was able to confirm that this works.
After having such a pleasant experience getting my scanner working, I realized I was up for more of a challenge. At my office, I have an HP LaserJet 3055. It's one of those multifunction copier, scanner, fax and printer machines. The v300 scanner I used at home was connected directly to my Linux box. In the case of the HP, I have to connect over the network. Will it be as simple to set up as the single-function Epson?
At first, I wasn't sure where to start. There didn't seem to be any tools to detect the scanner on the network. Then I realized I had already been through this process. Step one with the scanner is finding out whether special drivers exist. In this case, the key phrase is “HP Linux Imaging and Printing” system, or HPLIP for short:
sudo apt-get install hplip-gui
Once that is done, I needed to run hp-toolbox to configure the network printer. This provides a handy icon in the GNOME alert bar that lets you select actions for the multifunction printer. By choosing Scan, it automatically starts xsane. I found the configuration under Preferences in the HP system tray application to change it to Simple Scan as the default application. For some reason, it refused to find the HP scanner when I launched it from the system tray. At the moment, I'll chalk that up to something that will get ironed out, as a bug report says the switch will be official in Lucid (see Resources). On the plus side, now that the HP is completely installed, I can start xsane or Simple Scan and then choose the HP for scanning. Scanning under Linux really has come a long way.
I now have both scanners working, so I decided to dig a littler deeper into scanner configuration. My Epson scanner has three hardware buttons: PDF, Email and Copy. It would be cool if I could press the PDF button and have it automatically start Simple Scan and start scanning. To do that, I needed to use a tool called scanbuttond. This is a dæmon that runs in the background and monitors the status of the scanner buttons. It then allows you to trigger scripts based on the button pushed:
sudo apt-get install scanbuttond
I started the dæmon by running:
The application still logs to /var/log/syslog, but the -f option keeps it in the foreground, so it is easier to kill as I work through the configuration issues. Right away, things got off to a bad start. My log file quickly filled with:
Apr 1 21:30:24 barqs scanbuttond: rescanning devices... Apr 1 21:30:24 barqs scanbuttond: no supported devices found. rescanning in a few seconds... Apr 1 21:30:26 barqs scanbuttond: rescanning devices... Apr 1 21:30:26 barqs scanbuttond: no supported devices found. rescanning in a few seconds...
Now I know why they provide a -q option to quiet the log messages. The problem seems to be that the system doesn't know how to detect my scanner. After spending some time on Google, I determined that the way to solve the identification problem is to modify the source of scanbuttond to detect the scanner. Using lsusb, I was able to code to add to scanbuttond. I recompiled the package and got a notification that it found my scanner.
After all of that, I learned that even more work was needed. scanbuttond uses libusb to communicate with the scanner. This allows it to talk to the scanner without locking it up (the way xsane and Simple Scan do). As a result, in order to get the button presses, you have to know precise codes to send to the scanner to get a response. Once I realized that, I was able to confirm that the Epson scanner I have acts completely differently from the other scanners that scanbuttond knows about. If I knew more about USB debugging, I might have had a shot at fixing the problem.
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
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Tech Tip: Really Simple HTTP Server with Python
- Doing for User Space What We Did for Kernel Space
- Rogue Wave Software's Zend Server
- Parsing an RSS News Feed with a Bash Script
- SuperTuxKart 0.9.2 Released
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