It’s tax season here in the US and yesterday I plugged in our HP OfficeJet J4500 to scan in some documents that were mailed to us. I don’t use it much but imagine my consternation when I received a malware message “HPScanner.app will damage your computer” from macOS Big Sur and the scanner refusing to work.
I spent a good 30 minutes Googling, uninstalling drivers, reinstalling drivers, with zero success. I went to rant to my husband and surprisingly his Big Sur laptop was working just fine! And while usually I’m the stubborn technologist in the relationship, he was the one who solved this one.
The solution is to download and install the HP 5.1.1 Printer Software Update from Apple, uninstall the printer, and reinstall it.
Why is that so incredibly hard to figure out? Because HP’s website is an incompetent mess. The usual problem resolution path of going to HP’s Driver Download website fails because they don’t have macOS 11 drivers for the OfficeJet J4500. If you click through far enough you’ll arrive on their My operating system is not listed on HP Software and Driver Downloads page which routes you to the Apple website linked above. So there is a driver for the printer it’s just difficult to find. You might need to download and run the “HP Uninstaller” first. I had already done this in my troubleshooting attempt so it’s unclear if this is a prerequisite or not.
Other things that I discovered during my attempt to fix this:
- Downloading the HP Easy Scan software from the App Store. This doesn’t include the OS-level driver and without it the app can’t communicate with the scanner.
- Using the Generic PCL driver. While the printer will happily print with the Generic PCL driver (courtesy of Gutenprint) it doesn’t include the drivers for scanning.
- The reason this likely worked for my husband and not me is that he updated his printer drivers while still on Catalina after HP screwed the pooch and mistakingly revoked certificates for their printer drivers in Oct 2020. I very very seldom print or scan so it’s not surprising that my system was out of date.
When exporting a document with bitmap images in it, Inkscape won’t downsample them to a lower resolution, despite the “Resolution for rasterization (dpi)” setting in the PDF export dialog. That export dialog setting only applies to bitmaps that have had filters applied against them. See bug 246677.
4 years ago I figured out how to work around this and today I had to relearn it. So as to not repeat this in another 4 years, I’m documenting this here for posterity.
The workaround is to apply an identity filter to each bitmap before saving it. An identity filter is one that doesn’t do anything, but because it is a filter it forces Inkscape to do the downsampling upon export. Because an identity filter doesn’t actually do anything, there isn’t one available in the Filters menu, but we can create one.
To create a reusable identity filter:
- Open a new Inkscape file
- From the Filters menu, select Filter Editor…
- In the Filter Editor pane, click the New button. This will add the filter “filter1” to the Filter list
- Double click “filter1” and rename it “Identity”
- To the right of the Add Effect: button there is a drop-down. Change it to Color Matrix, and hit the Add Effect: button
- Save the document as “Identity filter.svg”
- Now put the file where Inkscape can find it:
- Linux/OS X: ~/.config/inkscape/filters
- Windows XP: C:\Documents and Settings\[USERNAME]\Application Data\Inkscape\filters
- Windows Vista and later: C:\Users\[USERNAME]\AppData\Roaming\Inkscape\filters
- The ‘filters’ directory may not exist, in which case just create it.
- Close and restart Inkscape
- This should add the Personal submenu under the Filters menu which should include our Identity filter.
To use the identity filter:
- In your Inkscape file, select the bitmaps you want to downsample. Be sure not to select any vector images or text since you don’t want to rasterize that.
- From the Filters menu, select Personal > Identity
- Now when you save the document as a PDF, adjust the “Resolution for rasterization (dpi)” setting. 90 is a decent number for documents that are being viewed on a computer screen. 150 is probably the smallest you want to go for anything that is being printed.
At work, I have my music collection on my Fedora desktop. At times I’ve wanted to access this library on my Mac Book Air but have been unable to do so given they are on two separate subnets (and DAAP is a broadcast protocol). The solution was Network Beacon.
- Ensure your DAAP server is accessible. For Rythmbox, enable/configure the DAAP Music Sharing plugin (be sure to click the ‘Share my music’ checkbox for the plugin).
- Make sure port 3689 is open on your Linux firewall if necessary.
- On the Mac, download and install Network Beacon and configure a new beacon thusly:
- Beacon Enabled: Yes
- Service Name: [string of your choice]
- Service Type: _daap._tcp
- Port Number: 3689
- Enable Host Proxy: Yes
- Host Name: [full hostname]
- IP Address: [duh]
- Now you should be able to open iTunes and see the DAAP share appear in the SHARED section. Note that Network Beacon must remain running for iTunes to see the remote share.
Note that if the machines were on the same subnet you should be able to skip Network Beacon entirely and just enable the DAAP Music Sharing and punch the hole through the Linux firewall.
Yesterday I received my new 15″ MacBook Pro from FedEx and I’m sure I’ll be spending the next several evenings getting it all set up. I’ve christened it Seregil from the character of Lynn Flewelling’s Nightrunner series. (I always name my computers from characters in books — usually those I’m reading or have read recently.) It is spec’d out thusly:
- MacBook Pro
- 15″ high-density anti-glare screen
- i5 2.4GHz CPU
- 8GB RAM
- 128GB SSD
For the past 4 years I’ve used Linux systems exclusively and when it came to purchase a new computer I decided to jump to Mac. Moving to Linux from Windows was the most productivity-enhancing change I’ve ever made and I’m hoping the swap to Mac doesn’t set me back. What appeals to me so much about Macs is that they have the classic unix underpinnings with an elegant GUI.
Currently I have a Windows VM which I use solely to put music on my iPhone. That’s going straight to /dev/null. Instead I’ll be creating a Fedora 13 (14?) VM as a backup for those things that just need a Linux touch to them. For instance, I’m going to give Apple Mail a chance, but if it just doesn’t pan out, I’ll run Evolution on the VM using VMware Fusion with Unity. I’m interested to see if The Gimp, Inkscape, and other X-Windows dependent apps behave better running in the VM rather than directly on the OS X X-server. While they function well, they just aren’t really integrated into the OS X UI.
I already have Adium, Unison, Moneydance, LibreOffice (aka: OpenOffice), and Chrome installed and configured. My iPhone library is moved over and correctly synching with my phone thanks to a bit of work getting the Library IDs sync’d between the two. Now to get VMware Fusion installed and that Linux VM created.
Growing up in a print shop gives me a unique knowledge of all things print. Stray too far outside of the spot color domain however and I have to start getting resourceful.
My family’s business has always used offset presses. And even while they have T-heads to enable the simultaneous printing of 2 colors — the ink has always been Pantone spot colors. This means that whatever we designed, be it on the old negative-creating typesetter circa 1980 or Adobe InDesign, would come out black-and-white in the end to be “converted” to a single spot color on the presses. [Aside: I’m not even going to get into the use of halftone screens and the camera in order to make printable photos — lets just gloss all over that and say it all ended up in black and white.] At no time did I ever need to delve into the process color domain. I knew it existed, I grok the basic concepts, but I didn’t have to concern myself with it.
Recently Benjamin was designing a banner in Inkscape that was to be printed by a 3rd party vendor who specifically requested the document be in CMYK. I dug around and discovered that while Inkscape has some tentative support for CMYK, it is unable to export EPS files in that color space. The work-around is to import the SVG file into Scribus and create the EPS from there as Scribus has better color management support. The tricky part is that Benjamin had used three high-resolution JPEGs in the SVG — JPEGs that were in the sRGB color space. I attempted to use jpegicc utility from littlecms to convert the image from the sRGB color space to a CMYK color space using an Adobe ICC file which succeeded. However, viewing these images did not give me a comfortable feeling that they would look good in print. I ended up punting the work altogether and asked a friend to use Adobe PhotoShop to do the conversion. I was then able to do the Inkscape -> Scribus route to get the final EPS format.
The banner was reported shipped yesterday. Hopefully my color space wrangling worked and it’ll look good upon arrival.
Yesterday Benjamin was having some challenges trying to copy text out of OpenOffice (a full Aqua app) and paste it into an Inkscape (an X11 app) document he was creating. The challenge was that it wasn’t working.
After digging around a bit I discovered that the X11 app didn’t have pasteboard syncing enabled. To fix this we went into the Preferences for the X11 app, selected the Pasteboard tab, and enabled syncing using only the ‘Update PRIMARY when Pasteboard changes’ option. Problem solved!
Unfortunately it also messes up copying and pasting vector images from within Inkscape. Looks like this is a setting that will have to be toggled on and off based on what you want to be doing for your copy/paste action. Rather a pain I think.
One of the odd challenges I encountered with getting Inkscape working on Sebastian were the fonts. The fonts showed up in the usual slew of non-X11 applications but refused to show up in Inkscape. I admit to not have tried the Gimp in this state although I assume this is a fonts-in-X11-apps issue and not specifically Inkscape and thus the Gimp would have had the same problems.
A bit of googling resulted in this forum post that solved the problem nicely.
Macs present both a system-specific (under /Library) and user-specific (under [User]/Library) view of several system resources, such as Fonts. The concept being that a specific user can install a resource under their login ID ([User]/Library/Fonts) and that resource is only available for that user’s login ID. Logging in as another user would not expose those resources. The end-user helpfully sees a superset of both the System and User resources exposed to them in the interface.
If you want a resource made available to all users on the system you place them in the System resources instead of the User resources and in order to install a System resource a privilege escalation is required. Like any good OS this helps limit the damage that any given user can inflict to the system.
Extrapolating from my geek knowledge, it appears the core of the issue is how X11 interacts with user resources — or rather how it doesn’t interact with them. My suspicion is that the X11 subsystem only pulls the System fonts, and not the superset of the System and User fonts, which is the reason why moving fonts from the User resources to the System resources caused them to show up in Inkscape.
Next up on my Mac OS X to-investigate list: making printer defaults stick in X11 apps.
Over the past several years Benjamin has developed several documents for use with his business, Memento & Co. These documents are designed in Word and originally had the letterhead on them as well. This proved problematic when we moved because in order to update the contact information he had to open and change each and every document. Word doesn’t provide a way to single-source documents and we decided we needed to do this differently.
B had been using CutePDF to create PDFs of his Word documents for a while so I started poking around to see if there was a way to “merge” two PDFs together: we’d create one PDF with the letterhead that he could use to merge on the first page of Word document printed to a PDF. I discovered pdftk would do the trick. Using this technique B was able to design his letterhead in Inkscape and save it as a PDF document. Using Inkscape allowed for a crisp logo (also designed in Inkscape) and no longer required rasterizing the vector logo into a high-resolution image just to place it into a Word document! He could then run a VB script I write which would prompt for the PDF onto which the letterhead should be applied and the script called pdftk to do the actual work.
Now enter the move to Sebastian and Mac OS X. Initially the process seemed much simpler. OpenOffice can export to a PDF out-of-the-box removing the need for CutePDF. Automator can apply a watermark to a PDF but only if the watermark is a raster image, not another PDF. Moreover it doesn’t tell you that anywhere but simply doesn’t do anything to the desired file making it a frustrating task to figure out what was going wrong. Drat, we’d have to go back to pdftk.
Getting pdftk on the system was a bit more challenging as the program doesn’t come in a DMG. Luckily it is included as a port so the process was a simple ‘port install pdftk’. I then used the Automator to provide a Finder menu option that B can use to apply the letterhead to one or more files. The Automator calls a shell script that calls pdftk to do the actual work.
Many of the applications that Benjamin used on Meme, his Windows XP machine, were ports for the Linux realm: Gimp (raster image editor), Inkscape (vector image editor), and Nvu (WYSIWYG web editor). Luckily all of these are available on Mac OS X although not without some pain.
- Inkscape was the easiest as they had a downloadable DMG – easy as pie. Open source developers — this is the way to go!
- Gimp was more challenging. I initially thought about just installing it via port but didn’t like the idea. There are a couple of DMG-based ports (sounds like typical infighting from open-source developers) which sounded much easier. After I got one installed it wasn’t playing nice with the font size — the ‘F’ for the File menu on the toolbar was bigger than this 13″ MacBook Pro screen! After much googling around a bit I found the Gimp resource file which somehow had gotten a font size of 934! Changing this down to 10 made the Gimp work.
- The no-longer-developed Nvu wasn’t available on Mac. Instead a fork called KompoZer is, provided in a nice DMG for installing. It appears to work identically to Nvu and was an easy transition.
Inkscape and Gimp are pure X11 apps meaning that X11 has to be running in order to provide the infrastructure for these two apps to run. Coming from a Linux background this makes perfect sense. It took a bit of explaining for B to understand why the X11 app appeared running on his Dock when he started one of these apps — and why he shouldn’t just kill it until he was done with them!
One of his most important apps was certainly not a port from Linux: MS Office. Being the cheap person that I am I encouraged B to try OpenOffice and if that really just didn’t meet his need then we would evaluate Pages or bite the bullet and purchase MS Office for Mac. I was very pleasantly surprised to find that OpenOffice isn’t just running on top of X11 but is a full-fledged Aqua app! This dramatically helped B towards my goal of giving OOo a shot and so far I think it’s been an easy transition. I know he’s been using it extensively during the past few weeks he was out of town. I’m uncertain if I haven’t heard complaints because it has Just Worked or because he’s been too busy with other things to make his case for an alternative office suite.
I’ve only played with Sebastian, B’s MacBook Pro, for a few hours while getting it configured for B, but from what I’ve seen I really like it.
For the past several years I’ve been running Linux both on my desktop and my laptop. The recent move from RHEL to Fedora on both systems helped with the usability issues but it’s obvious to me that Linux still doesn’t have the spit-and-polish that end-users expect on a desktop workstation. Still, I’m much more productive on a unix-based system than I ever was on a Windows-based system even with cygwin installed.
OS X seems to have the best of both worlds: a unix system with a very polished desktop environment. Moreover Apple isn’t trying to hide the unix underpinnings either — you can easily run a bash/ksh/perl/etc script from the Automator. A real scripting language built right into the OS — no more learning VB scripts just to automate some of B’s tasks! [Aside: powershell might address some of this gripe for Windows systems, and I’ve heard great things about it, but it’s been a long time coming.]
While out at a customer site last week two of the IBMers out on-site were using Macs. When my laptop comes due for an upgrade in ~1.5 years rest assured I’ll be moving to a Mac either on IBM’s dime or my own.