OpenPrinting News - October 2023

18 minute read

Probably many of you are using a modern driverless multi-function printer and scanner device, and it does not only print but also scan perfectly on your Linux system, or you have your driverless printer connected via USB and it also just works without any device-model-specific driver.

This works especially thanks to Alexander Pevzner’s excellent voluntary work of creating the IPP-over-USB daemon ipp-usb and the SANE backend sane-airscan for driverless scanning with both the eSCL and the WSD standards.

For a longer time he has been very busy with other things and so he was keeping his OpenPrinting work in “maintenance mode”, but now he showed up again and worked on some issues in CUPS and cups-filters.

And he has also written an amazing article (Original, Google-translated to English) about his work, how he got into it, and especially praising me for my cooperation with him. And thanks a lot to Anton Gladky, without his hint on the DebConf2023 I had never got note of it.

Some days ago, Alan Pope (“Popey”), a former colleague of mine at Canonical, and owner of the instance of Mastodon, posted on Mastodon asking for help which printer to buy. I read the busy thread and answered several times, telling about OpenPrinting’s list of driverless printers, confirming that the Xerox somebody else suggested is actually on the list, warning about (mainly HP and Canon) printers which stop scanning when they run out of ink/toner, …

Confirmed by most people answering down the thread it turns out that currently Brother is the best choice, and there especially laser printers. These are reliable printers which perfectly work as driverless IPP printers and scanners with all operating systems and devices, and especially they seem just to be designed to do their job of printing and scanning and not to suck lots of money out of the users by making them buying lots of over-expensive ink and toner.

Especially I found another thread about a purchase of a color laser multi-function printer from Brother and also answered there, telling that we have currently 657 Brother printers on our list and this answer was my most successful Mastodon post! 21 people favorited and 16 people boosted my post!

And here is a YouTube video where someone is showing how to set up printers with YaST (SUSE) but there is something wrong with it … Just watch the video, read the description only afterwards…

So let us now start with what we did at OpenPrinting in October …

And as usual: Stay updated on Mastodon: #OpenPrinting and

Ubuntu Summit 2023 in Riga

The Summit is coming close, I am already in Riga since yesterday and today at 2pm EET (CET) it will actually start. A lot of exciting stuff is waiting there in 5 rooms for 2.5 days. And there will be also a surprise!

The best of all is that one will meet each other again, like last year on the Ubuntu Summit 2022 in Prague in these 3.5 days (many arrived early, to enjoy Riga, get rid of jet lag, have a margin for flight delays, attending the Canonical-internal Sprint before the Summit …).

And on the conference itself I will give my third Snap workshop! It is

Improving Snap maintenance: Automating tag updates on new upstream releases of the app

On Saturday, November 4, at 12:00 - 13:00 EET in Beta 2

It is all about having your Snap get automatically updated in the Snap Store when any of the underlying upstream projects issues a new release. This helps users of Snaps to always have the latest and greatest versions of their apps.

It is an easy-to-apply GitHub action/workflow, developed by Heather Ellsworth who was in Canonical’s Desktop Team, in the Snap Squad.

If you are developing an application and snapping it or are snapping applications for developers who do not snap by themselves (like the Snapcrafters do) you should not miss this session, as applying the automation will ease youe life.

If you want to attend it, to make use of the time (60 min) efficiently, I want to ask you to download the slides and follow the instructions under “Setup”, so that you have forked the example GitHub repositories. Also it is easier to do the exercises when having the slides at hand to browse and copy-and-paste.

By the way, I plan to apply the method also on the OpenPrinting Snaps. Especially the Ghostscript Printer Application with its ~20 parts will benefit a lot from it. But it will us also get an Ubuntu Core Desktop with always up-to-date printing stack.

And do not think that this will be an Ubuntu Summit without any OpenPrinting session, GSoC contributor Akarshan Kapoor will tell about his GSoC work on scanning support in PAPPL in the talk

ScaniVerse: A New Horizon in Unified Scanning for Linux Systems

On Sunday, November 5, at 11:30 - 12:00 EET in Sigma

Akarshan presents his work on scanning support of this summer, the addition of scanning support to PAPPL to be able to make scanner drivers available as Scanner Applications, emulators of deriverless scanners (PAPPL PR #249), the retrofit of SANE drivers (GitHub repo), and his new MetaScan (GitHub repo). I will be in the room with him and help answering the questions.

There are a lot of great sessions to choose from, often several in parallel in different rooms. To help attendees through all this, the schedules display, nicely hacked by Canonical’s Community Team manager, Philipp Kewisch, has a facility that you can mark interesting sessions with a star. These will get listed under “My Conference” in chronological order then, so that you do not miss what you plan to attend.

I have marked up to now (only to get an inspiration, not sure whether I will attend them all):

In addition to these lots of awesome talks and workshops and hopefully also a great hallway track, there are also 3 evenings and on all these there will also be events not to be missed.

On Friday, right after leaving the last session at 18:00 EET in the hallway between the conference rooms you will directly be on the first one, the

Welcome Reception/Opening Mixer

Have some after-session chat with appetizers and form groups to have dinner in the nice old town of Riga afterwards.

Saturday evening, from 20:00 - 23:00 we will be gaming like hell in the

Gaming Night

In the 2 workshop rooms (Beta 1 & 2) opened up to one we will play board games, video games, Foosball, and Air Hockey. And you can contribute: Bring your board games, gaming consoles, and other gaming devices!!

Also on Saturday there will be a

Special Demonstration

What exactly, will be told through the event. There are 2 sessions of it, at 21:00 and 22:00, room to be announced.

And after two and a half days of amazing, exciting, eshausting, boring, … talks and workshops, we will celebrate the success of the second Ubuntu Summit on the

Closing Party

on 19:00 - 23:00 EET in the Digital Art House, walking distance from the venue (so no party buses). Drinks and a dinner buffet will get served.

So see you in Riga!

Or attend remotely via live streams and recordings.

And keep up-to-date via Mastodon: #UbuntuSummit, #UbuntuSummit2023

Google Summer of Code 2023

Now we are close to the end. Having extended the deadline for all the now 5 OpenPrinting contributors it is time to write the final reports. Their deadline is Nov 6, Monday next week.

Due to his participation in the Ubuntu Summit Akarshan Kapoor already finished one week earlier and so his report is already posted. He succeeded with the addition of scanning support to PAPPL and so we will soon see first Scanner Applications.

And from Kushagra Sharma, GSoC contributor on CPDB support in the print dialogs I got a last write-up before the end of the GSoC:

Implementation for CPDB pkg config support is completed which allows autoninja to set flags for CPDB allowing its import into the system. Currently implementing all the virtual functions for print backend as of now I am able to display all thé available printers for different print backends on the print dialog using CPDB, working on fetching their print capabilities and semantics. This will conclude CPDB support for print dialog in chromium.

Thanks Till Kamppeter and Gaurav Guleria for all the support, I hope we keep working on CPDB and one day all software use CPDB for print dialog.

Next month I will post an overview with links to all the final reports.

And I was in Sunnyvale at Google on the Mentor Summit meeting my fellow mentors again, especially also Deepak Patankar, who was lucky to get a spot through the waitlist. The event was smaller than the 2018 edition which has taken place in the same location, as each mentoring organization got only one guaranteed delegate spot and not two. But nevertheless it was still fun.

Especially I have given a 3-min (!) lightning talk about the participation of the Linux Foundation and the Opportunity Open Source in the IIT Mandi. It was in one of two sessions where every mentoring organization could give a brief presentation about something interesting or important, usually success stories about exceptional contributors. So mine was somehow different, but in some form also a success story of a contributor, of Akarshan doing the excellent local part of the organization of the event …

And even quicker was the self-presentation of each of the 175 attendees. We only could use 4 words! I used OpenPrinting - Snap - Ubuntu - Community.

But the rest went much more easily, mostly hallway chat but also the un-conference, BoF-style sessions planned on the spot. Two boards, one for each conference day, with squares for each hour and each of the 5 rooms where people could post a paper announcing their session. No pre-planning, no CfP. A little like the Ubuntu Developer Summits many years ago.

In addition, I departed to the US two days earlier, to not miss the event if flights are late or canceled, to have the jet lag go down a bit, and also to have a short touristic visit in San Francisco, and luckily enough, on the evening before the Mentor Summit, there happened the Annual Celebration of the Internet Archive, a great organization conserving everything which appears on the internet, even if popping up only shortly, and making it available via the Wayback Engine, preserving a lot of history. I met also some of the Mentor Summit attendees that evening, especially Robert Kaye from Metabrainz/Musicbrainz who works closely together with the Internet Archive.

CPDB CUPS backend Snap

To complete the printing stack in the all-Snap experience of Ubuntu Core Desktop we still need one more Snap, the one of the CUPS backend for the Common Print Dialog Backends (CPDB).

This is needed as all the application’s print dialogs also need to get switched over to the New Architecture of not having PPD files any more, but instead, IPP print destinations. And exactly this we have implemented in the CPDB backend for CUPS, and now making the dialogs using CPDB we will make them not only working with the upcoming CUPS 3.x and with the CUPS Snap, but also assure that they stay working with further changes in CUPS and also being open for new print services, like for example cloud services.

Luckily I was successful with my talk about Snap and Ubuntu Core Desktop and my Snap workshop on the Opportunity Open Source in Mandi, as Biswadeep Purkayastha, one of the candidates for this year’s GSoC, attended and stepped up as a volunteer for OpenPrinting. Right after the conference he studied the rest of the workshop (In Mandi I had only 60 min for the workshop which was originally designed for 90 min - 2 hours), my Daemon Snapper’s Workshop from the Ubuntu Summit 2022, and Ken VanDine’s blog about Ubuntu Core Desktop. Then he asked me what he could do for OpenPrinting and I offered him to snap the CPDB backend for CUPS.

He is really enthusiastic about OpenPrinting, especially he ported the cupstestppd utility’s core functionality into a library function in libppd (Pull Request #6) and when he got the message of not having been selected for GSoC, he asked me right away what he could do voluntarily and I talked with him about OCI containers and Snap and also about my planned sessions in Mandi.

Biswadeep accepted the snapping task and started right away creating the snapcraft.yaml. He asked me when he got stuck and I helped him through several quirks, including libcups2 of CUPS 2.5.x having removed some things which were marked deprecated in CUPS 2.4.x.

Later on we both got stuck as the CPDB backend is entering a new area: It is a user daemon, triggered via the session D-Bus (see Ken VanDine’s second blog). There is support for such a thing by snapd but it is still considered experimantal and not really well documented, and it only supports a client application to call one pre-defined D-Bus service, not as we have with CPDB that the client (in our case a print dialog) is looking for all suitable D-Bus services (in our case the CPDB backends) which are installed and does not know beforehand which these are (in our case a new cloud printing service with its CPDB backend could appear). So I asked for help on the forum, but did not get any answer yet, neither from Canonical’s snapd and snapcraft developers nor from the community …

So now I will have to make the developers aware in-person, on the Canonical Engineering Sprint, Canonical’s internal meeting of their around ~700 engineers, in the week right after the Ubuntu Summit, also here in Riga.

Thanks a lot, Biswadeep, for all your great work on this!

libcups3 support

Michael Sweet is not only deep into the development of libcups3, the CUPS library of the new CUPS 3.x, but he is also already switching PAPPL to it. The current stable release 1.4.2 can be built with either libcups2 or libcups3, the library being autodetected by the ./configure script, and the master branch in the GIT repository which is approaching version 2.0 is even libcups3-only.

So Michael seems to be eager to switch us into the New Generation of all-IPP, PPD-less printing as soon as possible and probably also considers Printer Applications as a thing of the New Generation CUPS 3.x world.

Akarshan Kapoor has added scanning support to PAPPL during this year’s GSoC and posted a Pull Request for its inclusion. As it is a significant new feature it will most probably not be accepted into the 1.4.x series but only into 2.x which would require that PAPPL-based Scanner Applications will háve to use libcups3.

As we do not want to only support writing new scanner drivers from scratch but also retro-fit all drivers which are already there, which are SANE backends, we need SANE support and this we want to do in pappl-retrofit where we are already supporting PPD-based legacy printer drivers. But pappl-retrofit also uses the libcups2-based libcupsfilters and libppd libraries, and pappl-retrofit also uses libcups2 by itself.

This made adding support for building with libcups3 to the libraries libcuppsfilters, libppd, and pappl-retrofit getting more urgent. Work on libcupsfilters got already started by Gayatri Kapse during the selection process for the GSoC earlier this year (Pull request #24) and as Biswadeep Purkayastha got stuck with snapping the CPDB backend for CUPS I asked him to work on the addition of libcups3 to the libraries. He did all the renamings to the new libcups3 function names and the #defines for converting to the libcups2 names when building with libcups2, taking Gayatri’s work and also PAPPL 1.4.x as example and in the end I completed it by doing the more tricky parts.

But the worst thing was already done much earlier, copying all PPD file support code into libpppd. This way all the libraries did not contain any calls of PPD-related functions in libcups2 any more. The only code I still had to copy from libcups2 was the code to support the back channel and the side channel for communication between CUPS filters and CUPS backends. I have taken the files cups/sidechannel.h, cups/sidechannel.c, and cups/backchannel.c and copied their content over into the new files pappl-retrofit/cups-side-back-channel.c and pappl-retrofit/cups-side-back-channel-private.h in pappl-retrofit. After that I renamed all the functions, data types, and constants to the scheme of pappl-retrofit. pappl-retrofit builds with either libcups2 or libcups3 now, always using its own copies of the back/side channel support functions.

All the libcups3-support-related changes are done now and available in the master branches of the three libraries. They still need more testing before the 2.1.0 releases of libcupsfilters and libppd and the 1.0.0 release of pappl-retrofit.

Scanner Applications being forced to use libcups3 instead of libcups2 are no problem at all if they are provided as Snaps or otherwise packaged in some sandboxed format (like Docker/OCI containers). In all these formats each application brings its own dependencies (needed libraries, …), so the system can use libcups2 while the encapsulated Scanner Application uses libcups3. Even classically installed the Scanner Applications can use libcups3, as libcups2 and libcups3 can co-exist on classically installed distributions, at least if they use DEB or RPM. Even more this works as current libcups3 uses the 3 actually in its name, having the library file and the compiler argument -lcups3.

Only disadvantage against using libcups3 is that libcups3 is still in its beta phase, but Michael Sweet’s code quality is very high, so it is not such a problem.

CUPS 2.4.7

Michael Sweet has already started the development of CUPS 2.5.x but not stopped releases of of 2.4.x yet. Latest release is 2.4.7 including the fix for CVE-2023-4504 and other changes, like adding OpenSSL support for the cupsHashData() function and bug fixes.

List of changes from the original announcement:

  • CVE-2023-4504 - Fixed Heap-based buffer overflow when reading Postscript in PPD files
  • Added OpenSSL support for cupsHashData (Issue #762)
  • Fixed delays in lpd backend (Issue #741)
  • Fixed extensive logging in scheduler (Issue #604)
  • Fixed hanging of lpstat on IBM AIX (Issue #773)
  • Fixed hanging of lpstat on Solaris (Issue #156)
  • Fixed printing to stderr if we can’t open cups-files.conf (Issue #777)
  • Fixed purging job files via cancel -x (Issue #742)
  • Fixed RFC 1179 port reserving behavior in LPD backend (Issue #743)
  • Fixed a bug in the PPD command interpretation code (Issue #768)

PAPPL 1.4.2

Also PAPPL received a bug fix release, 1.4.2.

By the way, the 1.4.x series of PAPPL can be built with either libcups2 or libcups3, while the master branch (2.x) is libcups3-only.

libcups 3.0b2

And last but not least, Michael also released the second beta of libcups3, for more API modernization, improvement, and clean-up.

  • Added the ipptransform command to replace/upgrade the ippevepcl and ippeveps commands (Issue #65)
  • Added cupsFormDecode and cupsFormEncode APIs (Issue #49)
  • Added cupsJWT APIs to support JSON Web Tokens (Issue #50, Issue #52)
  • Added ippAddCredentialsString and ippCopyCredentialsString APIs (Issue #58)
  • Added cupsCreateCredentialsRequest and cupsSignCredentialsRequest APIs and updated cupsCreateCredentials API to better support X.509 certificates (Issue #59)
  • Updated the configure script to add _FORTIFY_SOURCE=3 (previous level was 2) when not using address sanitizer and when it hasn’t already been added (Issue #51)
  • Updated the httpAddrListen function to use the maximum backlog value.
  • Fixed ipptool limit on the size of an attribute value that would be printed (Issue #5)
  • Fixed some configure script issues (Issue #48)
  • Fixed JSON output bug in ipptool.
  • Fixed CUPS_DNSSD_IF_INDEX_LOCAL when using Avahi.