MacIPRpi beta release 6.02

slipperygrey

Well-known member
/usr/lib/cups/backend/pap is what I had to get setup on my v5 to get CUPS working with AppleTalk Printing, the file I'm using is something I found on the Internet and hacked on until it surprisingly worked, at least for what I wanted to do (print to an AppleTalk only LaserWriter from modern machines using the Rpi as a print server). I was hoping the newer Netatalk build would come with that file fixed up.
Did you have to do any configuration in the CUPS admin interface, select the printer, and so on? Or was printing to your LaserWriter plug'n'play once you had installed the pap backend?

Did you have to edit cups.conf as well?

What is the exact model of LaserWriter, for our reference?

I'm trying to figure out the best default configuration for netatalk.
 

Fizzbinn

Well-known member
Did you have to do any configuration in the CUPS admin interface, select the printer, and so on? Or was printing to your LaserWriter plug'n'play once you had installed the pap backend?

Did you have to edit cups.conf as well?

What is the exact model of LaserWriter, for our reference?

I'm trying to figure out the best default configuration for netatalk.

Yes I did, it was not plug'n'play.

I documented what I did back in 2021 in this post:


I have not done this on the new MacIPRpi beta release 6.02 as of yet, I had been thinking there might be a better/different pap backend to use (not understanding that its not a part of Netatalk) but sounds like the https://www.emaculation.com/pap_tkaiser_v0.1.4.tgz one is the best available. I will try again and document any changes.
 

NJRoadfan

Well-known member
I can confirm it works, but you have to manually add the printer's URL under "Add Printer" in the CUPS web interface. The "Find New Printers" option no longer works for 3rd party back ends. To get the URL, you have to manually run the pap back end script, which will list URLs of all found printers in the current AppleTalk zone.

All of this will cease to work with CUPS 3.0 as per the giant warning you get in the CUPS web interface when adding a new pap queue. CUPS 3.0 is moving to being an IPP 2.0 only (AirPrint, Mopria, etc.) print spooler. Non-IPP 2.0 legacy printers are being supported via "printer applications" which are snap containers running a printer driver and a mini-web server handling the IPP and config interface.
 

mactjaap

Well-known member
In my case I only edited papd.conf
I then rebooted the pi.

Code:
root@maciprpi:~# cat /usr/local/etc/papd.conf
# PAP print server daemon configuration (Netatalk 2.x)
#
# See the `papd.conf' manual page for examples.

# Uncomment the following line to share all CUPS enabled printers.
cupsautoadd:op=root:

After that I had a look at my CUPS configuration and to my surprise I did see my HP_LaserJet_Pro_M118dw in CUPS.
Code:
Queue Name    Description    Location    Make and Model    Status
HP_LaserJet_Pro_M118dw_6071AC    HP_LaserJet_Pro_M118dw_6071AC        HP LaserJet Pro M118-M119, driverless, cups-filters 1.28.17    Idle - "Canceling print job."

No adding of the printer...it just was there.
( I did change some settings so I could use CUPS over the network)


So...it seems that some printers advertise them self to CUPS.
But..I will try to do this again over the weekend on a fresh MacIPRpi 6.02 install to see if my theory is correct.
 

Fizzbinn

Well-known member
In my case I only edited papd.conf
I then rebooted the pi.

Code:
root@maciprpi:~# cat /usr/local/etc/papd.conf
# PAP print server daemon configuration (Netatalk 2.x)
#
# See the `papd.conf' manual page for examples.

# Uncomment the following line to share all CUPS enabled printers.
cupsautoadd:op=root:

After that I had a look at my CUPS configuration and to my surprise I did see my HP_LaserJet_Pro_M118dw in CUPS.
Code:
Queue Name    Description    Location    Make and Model    Status
HP_LaserJet_Pro_M118dw_6071AC    HP_LaserJet_Pro_M118dw_6071AC        HP LaserJet Pro M118-M119, driverless, cups-filters 1.28.17    Idle - "Canceling print job."

No adding of the printer...it just was there.
( I did change some settings so I could use CUPS over the network)


So...it seems that some printers advertise them self to CUPS.
But..I will try to do this again over the weekend on a fresh MacIPRpi 6.02 install to see if my theory is correct.

There are two use cases here:

1) Using the Rpi to enable an old Mac to print to a modern printer

Old Mac-> AppleTalk pap print job -> Rpi server -> IP CUPS print job > Modern printer​

2) Using the Rpi to enable a modern computer to print to an old AppleTalk only printer

Modern computer -> IP CUPS print job -> Rpi server -> AppleTalk pap print job -> Old AppleTalk only LaserWriter​


You are talking about #1. Its #2 that requires /usr/lib/cups/backend/pap, finding the printer's URL, and manually adding a printer with it.

For MacIPRpi 6.02 it would be great if changes for #1 (enabling access to the cups web interface, making the one edit to papd.conf) are included. For #2 including /usr/lib/cups/backend/pap would at least let those so motivated to manually set it up.
 
Last edited:

Fizzbinn

Well-known member
All of this will cease to work with CUPS 3.0 as per the giant warning you get in the CUPS web interface when adding a new pap queue. CUPS 3.0 is moving to being an IPP 2.0 only (AirPrint, Mopria, etc.) print spooler. Non-IPP 2.0 legacy printers are being supported via "printer applications" which are snap containers running a printer driver and a mini-web server handling the IPP and config interface.
Oh jeez! this of course got me thinking when CUPS 2.0 may no longer be supported. Found this:


"That said, given the history of CUPS packaging on enterprise-oriented Linux distributions, I suspect you will still see CUPS 2.x in use until at least 2030."

Hopefully that proves out.
 

NJRoadfan

Well-known member
CUPS 3.0 has been delayed quite a bit. The first distro to switch will likely be Ubuntu. Thankfully Debian tends to be very conservative and likely won't switch any time soon. This won't mean the end of printing from your classic Mac though as papd will eventually be updated to support CUPS 3.0 and convert Postscript print jobs into PDF that CUPS 3.0 can handle.
 

Fizzbinn

Well-known member
CUPS 3.0 has been delayed quite a bit. The first distro to switch will likely be Ubuntu. Thankfully Debian tends to be very conservative and likely won't switch any time soon. This won't mean the end of printing from your classic Mac though as papd will eventually be updated to support CUPS 3.0 and convert Postscript print jobs into PDF that CUPS 3.0 can handle.
But could it be the end of printing from a modern computer to an AppleTalk only Printer?
 

Fizzbinn

Well-known member
I can confirm it works, but you have to manually add the printer's URL under "Add Printer" in the CUPS web interface. The "Find New Printers" option no longer works for 3rd party back ends. To get the URL, you have to manually run the pap back end script, which will list URLs of all found printers in the current AppleTalk zone.

All of this will cease to work with CUPS 3.0 as per the giant warning you get in the CUPS web interface when adding a new pap queue. CUPS 3.0 is moving to being an IPP 2.0 only (AirPrint, Mopria, etc.) print spooler. Non-IPP 2.0 legacy printers are being supported via "printer applications" which are snap containers running a printer driver and a mini-web server handling the IPP and config interface.

I got it working too via the MacIPRpi 6.02 beta with my Apple LaserWriter 4/600 PS.

Extract files, move “pap” file to:​
/usr/lib/cups/backend/​
chown it to root:root​
Execute pap with no arguments​

Look for my AppleTalk printer URL:

Code:
macipgw@maciprpi6:/usr/lib/cups/backend $ ./pap
network pap "Unknown" "AppleTalk Devices via pap"
atp_rresp: Connection timed out
%%[ status: idle; info: "HP_ENVY_4520_series_B71BE4" is ready ;  ]%%
%%[ status: idle; info: "HP_ENVY_4520_series_B71BE4" is ready ;  ]%%
%%[ status: idle; info: "HP_ENVY_4520_series_B71BE4" is ready ;  ]%%
%%[ status: idle; info: "HP_ENVY_4520_series_B71BE4" is ready ;  ]%%
%%[ status: idle; info: "HP_ENVY_4520_series_B71BE4" is ready ;  ]%%
%%[ status: idle; info: "HP_ENVY_4520_series_B71BE4" is ready ;  ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
%%[ status: idle ]%%
network pap://%2a/4%2f600%20PS/LaserWriter "LaserWriter 4/600 PS" "4/600 PS@* (pap)"
network pap://%2a/HP%20ENVY%204520%20series%20B71BE4/LaserWriter "%%[ status: Processing... ]%%" "HP ENVY 4520 series B71BE4@* (pap)"
network pap://%2a// "Unknown" "@* (pap)"

This is what I needed, my AppleTalk printers URL:
"pap://%2a/4%2f600%20PS/LaserWriter"

Open the CUPS web interface:

  • Click Administration at top of page in nav bar
  • Click Add Printer button under Printers
  • It redirects to https, do the thing in your browser to accept the self signed cert
  • Click Add Printer button under Printers again
  • Authenticate with the default maciprpi admin credentials macipgw:macipgw
  • Click the “AppleTalk Devices via pap” radio button under the Other Network Printers section, click Continue
  • Paste the printer URL in the Connection field, click Continue
  • Enter a name, description and location, check the “Share This Printer” checkbox, click Continue
  • I provided a PPD File the Apple LaserWriter 4/600 PS that I previously took from a vintage Mac, click "Add Printer" (you likely could have picked "generic" and then continue)

And you're done. Tested by printing from my MacBook Pro M1 running macOS Sonoma 14.7.1
 
Last edited:

Fizzbinn

Well-known member
Good to see a refresh of maciprpi! I'm curious what base OS you're using now?

It's also encouraging to see that you're on a supported and secure release version of netatalk now.

May I ask what it would take for you to migrate to the netatalk 4.x release series? Is there some technical reason holding you back? Please note that the 2.4 release series will receive security patches until September 2025, but after that we plan to EOL it.

A few benefits of netatalk 4.x over 2.4:

- Coexistence with Samba (avoid risk of filesystem metadata corruption)
- AFP 3.4 compliance
- Extended Attributes metadata (more reliable than AppleDouble)
- Bundled and improved macipgw (such as a macipgw.conf configuration file)
- Tons of bug fixes

Ultimately it's your call. But I'm invested in setting you up for success in adopting the latest and best supported version.

Thinking about the change away from "AppleDouble", this means I could not just rsync the contents from my old MacIPRpi v5.02, running netatalk 2.x, to a new one with v6.02, running netatalk 4.x, correct? The HFS resource forks are encoded in a different, incompatible way? Would he best thing be to use a legacy Mac with the old and new MacIPRpi server shares mounted to copy from the the old one to the new one?
 

Fizzbinn

Well-known member
Web Server
  • Hosts a historical replica of the first CERN website on port 80 for testing vintage browsers.

While the old pages are neat, I found it more useful to replace them with some links to services on the MacIPRpi and some links to retro sites:

Code:
<HEADER>
<TITLE>MacIPRpi</TITLE>
</HEADER>
<BODY>
<H1>MacIPRpi</H1>

<p>
<b>Local:</b>
<blockquote>
    <A HREF="http://macippi.local:8888">RPi-Monitor</A>
    <p>
    <A HREF="http://macippi.local:8080">Web Rendering Proxy</A>
    <p>
    <A HREF="http://macippi.local:631">CUPS Printing</A>
    <p>
    <A HREF="cgi-bin/server-ip-address.pl">IP Addresses</A>
    <p>
        <A HREF="cgi-bin/server-appletalk.pl">AppleTalk Addresses</A>
</blockquote>
<b>Links:</b>
<blockquote>
     <A HREF="http://frogfind.com">Frog Find</A>
     <p>
     <A HREF="http://68k.news">68k News</A>
     <p>
     <A HREF="http://retro.bluescsi.com">BlueSCSI Retro Site</A>
     <p>
         <A HREF="https://macip.net">MacIP.net</A>
</blockquote>

<p>
&nbsp;
<p>


</BODY>
 

NJRoadfan

Well-known member
The dbd utility can convert the old AppleDouble v2 format to the new extended attributes format in one shot.

The way forward to print to an ancient printer is to write a printer application, or just manually push the jobs using the command line pap utility.... which is what the backend script does anyway. I have that printer's HP cousin, the LaserJet 4MP. Its honestly not worth keeping it running between the fact that good 74A toner supply is vanishing and its really really slow by today's standards. A sub $100 Brother black and white laser easily out performs it these days.
 

Fizzbinn

Well-known member
The dbd utility can convert the old AppleDouble v2 format to the new extended attributes format in one shot.

The way forward to print to an ancient printer is to write a printer application, or just manually push the jobs using the command line pap utility.... which is what the backend script does anyway. I have that printer's HP cousin, the LaserJet 4MP. Its honestly not worth keeping it running between the fact that good 74A toner supply is vanishing and its really really slow by today's standards. A sub $100 Brother black and white laser easily out performs it these days.

Will likely have to ask for for more detail on how to use that dbd utility when the time comes.

...yeah, wanting to print to an old LaserWriter is definitely not about modern practicality/utility, much like most of this site! I bought my 4/600 when I went to university in 1996, nostalgia is a heck of a drug! (oh, and I did I mention my 4/600 has the 4MB RAM upgrade! That totally changes the performance game by .03%! LOL)

Maybe I'm a gluten for crazy but I think it might be cool to get an AppleTalk card in my ImageWriter II and see if I can print to that from a modern machine. That "pap" file seems like it could support that.
 

NJRoadfan

Well-known member
I can't believe Apple shipped that printer with only 2MB stock. The LaserJet 4P (PCL only) came with 2MB, while the 4MP (Postscript and PCL) came with 6MB standard. Even with the full 22MB in my 4MP, its a dog when printing with PostScript as PCL5e is MUCH faster. Printing via CUPS is worse since it seems to stream bitmaps, its not the most efficient Postscript generator out there. Not noticeable on my color laser via Ethernet, but yeesh you can tell over LocalTalk.

The ImageWriter can be connected via serial and use the Ghostscript printer application with CUPS 3.0 (and reshared on an AppleTalk network using papd). There is no speed advantage to using LocalTalk.
 

mactjaap

Well-known member
So, I have it up and running on a spare RPi 4, connected to file sharing okay, but haven't done much else testing yet. One thing I noticed it I can't get Chromium to launch from the desktop, Firefox works though.

I have my current MacIPRpi 5 Pi configured as a CUPS print server for my AppleTalk only LaserWriter 4/600 PS and looks like I'll need to work on getting that setup again. I was hoping that Netatalk 2.4.10 would come with the pap stuff needed for CUPS.

I had to change the hostname (picked "maciprpi6") as the default conflicted with my current v5 MacIPRpi but it seems that name might need to be changed in more than one place ...or might jsut be confusing my self.
You can change hostname at these three places:



Code:
File: /usr/local/etc/afpd.conf
"maciprpi-new" -transall -uamlist uams_randnum.so,uams_guest.so,uams_clrtxt.so,uams_dhx.so -nouservol -guestname "nobody" -setuplog "default log_maxdebug /var/log/afpd.log" -minicmodel "Macintosh"

File: /etc/hosts
127.0.0.1   localhost maciprpi-new

File: /etc/hostname
maciprpi-new
In this example I have changes it into maciprpi-new.

In the final version I will add a script to do so at once.
 

Fizzbinn

Well-known member
You can change hostname at these three places:



Code:
File: /usr/local/etc/afpd.conf
"maciprpi-new" -transall -uamlist uams_randnum.so,uams_guest.so,uams_clrtxt.so,uams_dhx.so -nouservol -guestname "nobody" -setuplog "default log_maxdebug /var/log/afpd.log" -minicmodel "Macintosh"

File: /etc/hosts
127.0.0.1   localhost maciprpi-new

File: /etc/hostname
maciprpi-new
In this example I have changes it into maciprpi-new.

In the final version I will add a script to do so at once.

Thanks!

I had used the GUI to try to change the name: Pi menu -> Preferences -> Raspberry Pi Configuration - Change Hostname
But looks like that only changes the 3rd one you list "/etc/hostname"

Changed the other two and things look better!
 

mactjaap

Well-known member
Thanks!

I had used the GUI to try to change the name: Pi menu -> Preferences -> Raspberry Pi Configuration - Change Hostname
But looks like that only changes the 3rd one you list "/etc/hostname"

Changed the other two and things look better!
Super! I will add a small script what can do all the changes at once.
I’m also rebuilding the home page of the web server to something more useful, but in combination with the first CERN www page.
 

NJRoadfan

Well-known member
There shouldn't be any need to define the local hostname in /etc/hosts, it gets it from /etc/hostname. Also, Netatalk 4 bases the server's name off of the system host name by default. ;)
 

dochilli

Well-known member
I installed the image on a SD-card. The pi boots, but when I want to log in as user pi, my keyboard just shows "arabic" letters, so the password is wrong. Could it be that the keyboard is not set to english?I have to look, if I can log in by ssh and change the keyboard settings of my pi.
 
Top