Miscellaneous aspects of driverless USB printing, including envelopes, in Linux

8/2/26b

When I couldn't find a cartridge for my ancient HP printer at a certain big-box store, I grabbed a cheap Canon Pixma TS3722 printer/scanner/copier because I was out of ink and had to print something right away. But the TS3722 comes with "starter" cartridges with very little ink, and before long, I had to order a black-ink cartridge (all I print is text on plain paper). So, I ordered an official Canon 275, and soon discovered that it also came with very little ink, and that others have complained about this. So, I ordered Aurasky 275XL cartridges, and found that not only do they work well for printing text on plain paper, but that they actually come full of ink.


Setting-up driverless USB printing & scanning in Linux, including MX-Linux nonpersistent live installations

This section includes information on various types of printer set-ups, including driverless USB on a customized live MX-Linux installation on a cheap flash drive. 

I wanted to use a USB connection for security, so at first I thought I'd need to use the old-school approach with drivers written specifically for the printer and scanner. I was able to install a driver for the printer on MX-Linux, but I had to update the Kubuntu installation on my desktop-PC from 20.04 to 26.04 to obtain the required "back end" (driver) for the scanner. To do this, I simply installed Kubuntu 26.04 over 20.04, after saving any data that would otherwise be lost in the process (which wasn't much, because my storage strategy is designed partly to make it easy to replace the installation).

But in the course of installing 26.04, I ran into problem in the form of a pop-up which erroneously claimed that the installation-process had failed. If this happens to you, go ahead and try to boot the "failed" installation. It can't hurt.

I don't normally download Linux ISOs because they're huge and I've had problems getting downloads with good checksums. So, I typically purchase them in the form of live DVDs and use a "burner"-program to make the ISOs from the DVDs. Then I check the ISO's checksum vs. the checksum from the official site before using the ISO to create an installation. 

But I couldn't find any sources for Kubuntu 26.04 DVDs in the US, so I was forced to download the rather large ISO. In case the download-process ended up getting interrupted, I used wget to perform the download, allowing the download to be resumed approximately at the point of interruption, instead of starting over. The command I used is "wget -c <URL of download>." Fortunately, the downloaded copy had the right checksum.

Then I learned that thanks to a fairly new software module (ipp-usb), it's now possible to use the driverless system via USB, and was able to set up driverless USB printing and scanning on MX-Linux, including live installations. 

But although I no longer need Kubuntu 26.04 for scanning, it was worth the effort required to install it, because it's a vast improvement over 20.04. 

I also wanted a 90 degree adapter for the printer-cable, to minimize cable-bending and to make it easy to put the printer away and set it up. These adapters have one unusually long side because the connectors on printers are recessed deeply. The adapters are available with upward, downward, leftward, and rightward bends. 


Instructions for setting up driverless USB printing/scanning on MX-Linux installations

A) Install ipp-usb, sane-airscan and simple-scan if not already installed.

B) Edit the ipp-usb configuration file (/etc/ipp-usb/ipp-usb.conf) so that the line "interface = ..." reads "interface = all."

(Skip steps C and D if you're using systemd.) 

C) Add the line "ipp-usb standalone -bg" above the last line ("exit 0") in /etc/rc.local. Also insert a comment immediately before the command to define its task, which is to start ipp-usb and put it into the standalone background mode.

D) Add "/usr/sbin/ipp-usb standalone -bg" to /usr/share/live-files/files/etc/rc.local (the path to this version of rc.local might be different in your installation, which might explain why the path to the command's binary file has to be included in the command; to save time, search for it with "whereis rc.local" and edit the one with "live-files" in the path). This version of rc.local is the one that gets used for live installations. Insert the new command where it won't interfere with any other task, i.e. wherever you can find a spot which is clearly between tasks, and put a comment just before the command to define its purpose. I inserted the new command after a clock-setup command. If you are performing the edit on a live installation, the edit will be lost if you shut the PC down without saving the file or making a Snapshot-ISO.

E) Restart the PC (assuming that it has a full installation) and connect your printer, and you should be able to print and scan. Sometimes my printer acts like it's out of paper for quite a while, and then starts printing. If your printer is flashing any error-codes, it might be trying to tell you why it's not printing. When you start the scanning-software, it generates a selection of scanners, and if one doesn't work, try another.

To create a live installation with the aforementioned changes, create a Snapshot-ISO [1] with the aforementioned changes baked into it (select zstd compression in the Snapshot tool's 2nd window to keep the ISO-size reasonable). Then use a USB-installer program such as Balena Etcher to install the ISO on a flash drive (a USB2 will suffice), plug the drive into a PC, and set up the "BIOS" to boot from the USB, and boot. 

Printing envelopes with the Canon TS3722 and driverless printing in Linux

Printing envelopes in LibreOffice Writer is largely automated and very easy, although it can take some practice. So, just be prepared to sacrifice some envelopes and fiddle with it until you get it right. When you tell Writer to insert an envelope, an Envelope window will appear, and most of it is self-explanatory. However, it might help to know that in the Printer tab of the Envelope window, the Envelope Orientation diagrams show the printer feeding from the bottom of the diagrams. You might find that the envelope ends up getting printed upside-down, in which case just insert the other end of the envelope. If the envelope is the first page of a document, and you just want to practice printing the envelope, tell Writer to print just the first page.

Notes

[1] The MX-Linux Snapshot tool makes it easy to turn customized MX-Linux installations into customized ISOs. The ability to create customized ISOs allows users to create customized live installations, and the MX Live USB Maker allows them to be made with various types of persistence. I prefer totally non-persistent installations, which I run on air-gap PCs for the ultimate in security.

Air gap PCs (which have no physical means, wired or wireless, to connect to the internet) cannot be monitored via the power line, as hackers claim in order to discourage us from using them, since they can't hack them remotely. There's no data on the PC's power bus, and even if there were some low-level digital noise, it couldn't make it backwards through the power supply out to the AC line, which has a lot of noise which would mask what little digital noise could make it out to the power line. 

My version of an air-gap PC starts with a barebones mini-PC (ASRock Desk-minis look like a good deal). I remove the PC's wireless module to prevent any possibility of a surreptitious wireless connection, such as in burst-mode, which is essentially impossible to detect. Pull the tiny RF connectors straight up with long-nosed pliers, assuming that the circuit board is horizontal, and cover them with tape to prevent shorting. 

To ensure that spyware can't relay data to Big Brother if it ever has internet access, my version of an air-gap PC doesn't have any internal nonvolatile storage. 

The OS is a nonpersistent, i.e. read-only, live installation on a USB2 flash drive, and for storage, I use µSD cards, with encrypted and unencrypted partitions, in small USB adapters. I use a mix of Sandisk USB2 and Orlian µSD-to-USB card readers, although they have to be plugged in and ejected in a certain order so that they don't interact when ejected. I'm considering switching to SmartQ readers (the ones that look like angular thumb drives and have slots for a µSD card and an SD card in the side) because they don't have this ejection problem, but I'd use them as USB2 drives to reduce their power consumption. When compact size is required, I'd use the Sandisk or Orlian.

I use a wired-only keyboard (currently a Perixx 534 but considering a circa-65% Alice-layout with a wrist-rest with an embedded touchpad) and a CKLau KM switch to share the keyboard and monitor with other PCs. The printer's wireless is turned off when the printer is being used, and the printer is disconnected when not in use.

Laptop PCs are convenient to use, but expensive and incapable of verifiable high security, because you can't remove their wireless circuitry. Long ago, there were cheap laptops known as "netbooks" that came without an OS or wireless and could be booted from Linux on a flash drive. But they became too popular and were taken off the market. So, I gave up on laptops and decided to go with mini-PCs, and ASRock Desk-minis look like good deals. 

You could use a mini-PC configured as a air-gap PC as an online PC as well, by reconfiguring it externally. This approach isn't convenient, but it provides a lot of flexibility and bang per buck over the long term. You'd just swap a full installation on an SSD, NVme, etc. with a USB3 adapter for the nonpersistent live flash-drive installation, and unplug all sensitive external drives reserved for use with the air-gap. If you want wi-fi, plug in a wi-fi dongle. But this might require a PC with more USB ports, which cost more. (To just add data-drives, get a USB hub. I like the Atolla A107, which is cheap and functional.) When you can afford it, get another mini-PC and a wired-only KM switch so that you can run both PCs at the same time and switch between them. 

Get a PC that allows the use of two memory modules in parallel, for best memory performance. I keep thinking about upgrading my air-gap, which is currently a bottom-of-the-line Gigabyte mini-PC with a single memory slot, but it's really all I need for my purposes.

Comments