bloovis.com

November 8, 2018

Using an HP P1006 printer in Linux Mint 18

Over the years, one persistent problem with using HP printers in Linux Mint has been the conflict between the drivers provided by CUPS (the standard Linux printing system), and HPLIP (the HP software that provides proprietary drivers for some of the company’s printers). My old P1006 printer (which uses a USB connection) requires the use of HPLIP, because CUPS does not contain the required drivers. However, when the printer is first plugged into a system running Linux Mint (and, presumably, Ubuntu), CUPS automatically installs its own incorrect driver for the P1006 after a few seconds. Then if you run the HPLIP device manager, which installs its own driver, the incorrect CUPS driver will still be used, and printing from Xreader (a PDF reader) will not produce correct output.

The fix is to delete the CUPS printer driver before running the HPLIP device manager. After you plug in the printer, wait a few seconds for CUPS to install its driver. Then open the CUPS Printers tools (aka system-config-printer, found by searching for “printer” in the Mint menu). Find the newly added HP printer, right click on it, and select Delete. This will remove the incorrect driver.

Then run the HPLIP device manager. (This is part of the hplip-gui package, and looks like a little HP logo in the system tray.) Tell it to add a USB printer, and it should soon install a working driver.

You can verify that the correct driver is in use by opening the CUPS Printers tool again (see above). Right click on the printer, and select Properties. In Settings, the Make and Model field should include words saying something like “hpcups 3.16.3, requires proprietary plugin”. If the incorrect CUPS driver is being used, this field will not mention “hpcups”, but may include the word “foomatic” somewhere.

September 28, 2018

Updating ThinkPad BIOS from Linux

Updating a ThinkPad BIOS usually involves booting a floppy or CD-ROM containing PC-DOS and an update program, or running a Windows-only updater. Neither of these is an option on a machine like my ThinkPad X200s, which has no floppy or CD drives, and is running Linux only.

The various options available to Linux users are discussed in the ThinkWiki BIOS upgrade page. The one option that worked for me in the X200s case is to boot the CD-based updater using Grub2.

First, I downloaded the latest CD-based BIOS updater from the link on the ThinkWiki BIOS Upgrade Downloads page. In the case of the X200s, the bootable CD updater file was called 6duj48us.iso and was found here.

Then I logged in as root (using sudo su) and performed the following steps:

apt-get install grub-imageboot
cp 6duj48us.iso /boot/images
update-grub

After rebooting, I realized that I needed to force the Grub menu to appear at boot time. (The menu was invisible because this machine had no other operating systems when I installed Mint. If your machine dual boots Windows and Linux with Grub, you should not have to perform these steps.) As root, I edited the file /etc/default/grub, and commented out the line containing GRUB_HIDDEN_TIMEOUT so that it looked like this:

#GRUB_HIDDEN_TIMEOUT=0

Finally, I ran update-grub and rebooted. This time the Grub menu appeared, and I was able to select 6duj48us.iso for booting.

July 26, 2018

Microsoft buys Github

For a while now I’ve been publishing my free software projects on Github. But last month Microsoft purchased Github, and that alarmed me. Traditionally, Microsoft has been the mortal enemy of free software, and Linux in particular. The company now claims to be the friend of free software, but trusting Microsoft, whose mission is total monopoly power, is like trusting an abuser who claims to be reformed and promises he will never hit you again. So I’ve starting moving my projects to Gitlab; see them here.

June 22, 2018

Mailing labels in Linux

Once a year our library sends out appeal letters to donors, using mailing labels that we print ourselves. The librarian keeps a list of donors in a spreadsheet that records their names, addresses, and past donation amounts. Formerly the librarian attempted to use MS Office to generate the labels, but this was an error-prone and time-consuming operation. I prefer to automate processes like this using scripts and open source software instead of GUIs, so I took on this task.

June 13, 2018

Cervantes on Criticism

The following explains much of the commentary on Youtube and other forums on the internet:

“Men who are famous for their talent, great poets, eminent historians, are always, or almost always, envied by those whose particular pleasure and entertainment is judging other people’s writings without ever having brought anything of their own into the light of day.”

– Cervantes, Don Quixote, Second Part, Chapter III

April 24, 2018

Disable low toner error in Brother printer

Our library has a Brother MFC-8950DW laser printer / copier device that started complaining recently about its toner cartridge being low on toner. The cartridge was nearly new and the print quality was still quite good. Then a couple of days ago, the printer stopped printing, saying that we needed to replace the cartridge. This was clearly ridiculous. After some poking around I found this video that showed how to disable the low toner error and get thousands more pages out of the cartridge. Here’s what to do:

  1. Remove the toner cartridge. This requires removing its carrier and then extracting the cartridge from the carrier.

  2. Notice that there is a small clear plastic lens on the right side of the cartridge. The printer shines a laser beam through this hole, and if the beam emerges on the left side of the cartridge, the printer assumes that the toner level is low.

  3. Place a small piece of duct tape over the lens and reinstall the cartridge. The low toner error should be gone.

I filed this note under “crapification of everything” because it’s another example of how making a device “smart” has actually made it stupider. The user can no longer decide when to replace the toner cartridge based on print quality. The printer now makes this decision on its own, and worse yet, refuses to function once it has made this erroneous decision.

April 15, 2018

Using the Coce book cover cache with Koha

Earlier I described how I installed the Koha library software system on Debian 8. Koha can display book cover images in search results by fetching the images from Amazon, if you enable the OPACAmazonCoverImages preference in Koha. But Koha needs to query Amazon to get the URL for the images. Furthermore, clicking on the image sends the user to the Amazon site for the book in question. I believe this behavior is required by Amazon’s terms of service, and I consider it incompatible with the goals of a public library. To avoid the use of Amazon entirely, and to speed up the queries for image locations, I installed Coce, a cover image URL caching server.

April 15, 2018

Extending MicroEMACS with Ruby

Years ago, when I had planned to rewrite MicroEMACS in Ruby, the motivation was to have support for Rails built into the editor. Eventually I did add some very minimal Rails support without rewriting the editor. But it was never quite satisfactory. Some things that are easy to do in Ruby, such as converting singular names to plural or camel-case names to underscores, are not easy in mimimal C, and I did not attempt all of them. The solution was to allow new commands to be written in Ruby.

April 11, 2018

Accursed Invention

“Happy were those blessed times that lacked the horrifying fury of the diabolical instruments of artillery, whose inventor, in my opinion, is in hell, receiving the reward for his accursed invention, which allows an ignoble and cowardly hand to take the life of a valiant knight, so that not knowing how it comes, or from where, a stray shot is fired into the courage and spirit that inflame and animate a brave heart, sent by one who perhaps fled in fear at the bright flare when the damned machine dischared it, and cuts off and ends in an instant the thoughts and life of one who deserved to enjoy many more long years. When I consider this, I am prepared to say that it grieves my very soul that I have taken up the profession of knight errant in an age as despicable as the one we live in now, for although no danger can cause me to fear, it still fills me with misgivings to think that powder and tin may deprive me of the opportunity to become famous and renowned throughout the known world for the valor of my arm and the sharp edge of my sword.”

– Cervantes, Don Quixote, First Part, Chapter XXXVIII

← Archive