AirPrint for an Old Brother Printer with Warp AI – Done in 20 Minutes

AirPrint for an Old Brother Printer with Warp AI – Done in 20 Minutes
created with ChatGPT

I have a Brother MFC-490CW printer that doesn't support AirPrint. Yes my printer is old (15+ years) but we only print 5-10 pages at most per week and it still works very well. Instead of buying a new printer, I thought: "This should be doable with Podman (docker), CUPS and Avahi!" The problem? I had zero interest in digging through endless documentation.

So I asked Warp AI – and here's the thing: In 20 minutes, I had a working AirPrint container.

What is Warp AI?

Warp is a modern terminal with built-in AI capabilities. Unlike traditional AI coding assistants that just generate code snippets, Warp AI can directly interact with your system – it reads files, executes commands, builds containers, analyzes logs, and debugs issues in real-time. It's available for macOS, Linux, and Windows. It can even access other devices on your network e.g. via SSH.

Think of it as having an expert DevOps engineer sitting next to you, actually doing the work while explaining what's happening.

What is CUPS (Common Unix Printing System)?

CUPS is the printing system used by most Linux distributions and macOS. It basically takes care of everything that happens between you hitting “Print” and your document coming out of the printer. CUPS uses a network-friendly protocol called IPP, which means it can handle both local printers (connected directly to your machine) and network printers with ease. It even comes with a simple web interface where you can check printer status, manage queues, or add new printers. In short, CUPS is the behind-the-scenes tool that makes printing on Unix-like systems actually work — whether it’s a USB printer on your desk or a shared office printer down the hall.

The Beginning: "Any idea how to get it working?"

To be fair, I have to admit that I already had the two Brother driver .deb files downloaded from the official Brother website. Warp wasn't aware that a specific driver is required and so it failed a couple of times by trying to use the driver provided by CUPS.

• mfc490cwlpr-1.1.2-2.i386.deb
• mfc490cwcupswrapper-1.1.2-2.i386.deb

I’ve got a small Ubuntu Noble VM running on my local network with Podman installed. After starting WARP, I simply SSH’d into the machine and let WARP handle the rest.

Don’t worry — WARP will prompt you before running any command. It won’t execute anything without your confirmation. There’s even a small » button you can click to auto-approve commands if you trust what’s being run. That said, I’d strongly recommend using this only on a sandbox or test system, not on a production machine. It’s a great way to explore how WARP automates things, but you should always keep control over what gets executed.

My question to Warp:

"I have a brother mfc490cw printer (192.168.2.40) that doesn't support airprint. I have podman running here and I have downloaded two deb files for the printer, driver and wrapper. any idea how to get it working?"

Warp's response? Not some theoretical guide, but:

  1. Created a Dockerfile directly with Debian, CUPS, Avahi
  2. Installed the Brother drivers
  3. Wrote a start.sh script that configures everything automatically
  4. Built and started the container

Everything automatic. No copy-paste marathon.

Problem #1: CUPS Starts Too Early

The first build succeeded, but at startup there was an error:

lpadmin: Unable to connect to server: Bad file descriptor

Warp identified the problem immediately: The lpadmin command in the startup script ran before CUPS was ready.

The solution: A while loop that waits for the CUPS socket:

while [ ! -S /var/run/cups/cups.sock ]; do
  sleep 1
done

Simple. Elegant. Works.

Problem #2: Printer Accepts Jobs, But Doesn't Print

The printer appeared on my iPhone, jobs were accepted, but no paper came out.

Me to Warp: "I can see the printer on my iPhone, but it is not printing."

Warp enabled debug logging and analyzed the CUPS logs:

/usr/local/Brother/Printer/mfc490cw/cupswrapper/brcupsconfpt1: not found
/usr/local/Brother/Printer/mfc490cw/lpd/brmfc490cwfilter: not found

Aha! The Brother drivers are 32-bit, but the Debian image had no 32-bit libraries.

The Final Solution: 32-bit Support

Warp modified the Dockerfile:

# Enable 32-bit architecture
RUN dpkg --add-architecture i386 && \
    apt-get update && \
    apt-get install -y cups cups-client avahi-daemon avahi-utils libnss-mdns \
    libc6:i386 libstdc++6:i386 libcups2:i386

Container rebuilt, started, test print sent... and it printed!

The debug logs showed:

[Job 2] Wrote 3892 bytes of print data...
[Job 2] Wrote 4096 bytes of print data...
[Job 2] The printer is ready to print.

🎉 Paper came out! 🎉

What I Learned

  1. Warp AI isn't a glorified chatbot – it executes commands, analyzes logs, debugs in real-time
  2. No copy-paste – Warp writes files, builds containers, tests everything directly
  3. Iterative debugging – Every problem was identified, solved, validated
  4. Production-ready output – The final setup is clean and reusable

The Final Setup

Three files, ready for deployment:

Dockerfile:

FROM debian:bookworm-slim

RUN dpkg --add-architecture i386 && \
    apt-get update && \
    apt-get install -y cups cups-client avahi-daemon avahi-utils libnss-mdns \
    libc6:i386 libstdc++6:i386 libcups2:i386 && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

COPY mfc490cwlpr-1.1.2-2.i386.deb /tmp/
COPY mfc490cwcupswrapper-1.1.2-2.i386.deb /tmp/

RUN dpkg -i --force-all /tmp/mfc490cwlpr-1.1.2-2.i386.deb && \
    dpkg -i --force-all /tmp/mfc490cwcupswrapper-1.1.2-2.i386.deb || true && \
    rm /tmp/*.deb

RUN sed -i 's/#enable-dbus=yes/enable-dbus=no/' /etc/avahi/avahi-daemon.conf

RUN echo "ServerAlias *" >> /etc/cups/cupsd.conf && \
    echo "<Location />" >> /etc/cups/cupsd.conf && \
    echo "  Order allow,deny" >> /etc/cups/cupsd.conf && \
    echo "  Allow all" >> /etc/cups/cupsd.conf && \
    echo "</Location>" >> /etc/cups/cupsd.conf

EXPOSE 631 5353/udp

COPY start.sh /start.sh
RUN chmod +x /start.sh

CMD ["/start.sh"]

start.sh:

#!/bin/bash

cupsd

while [ ! -S /var/run/cups/cups.sock ]; do
  sleep 1
done

sleep 3

cupsctl --remote-any --remote-admin --share-printers

lpadmin -p Brother-MFC-490CW -v socket://192.168.2.40:9100 \
  -P /usr/share/cups/model/brmfc490cw.ppd -E -o printer-is-shared=true

avahi-daemon -D
sleep 2

cat > /etc/avahi/services/Brother-MFC-490CW.service <<'AVAHI'
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name replace-wildcards="yes">Brother MFC-490CW</name>
  <service>
    <type>_ipp._tcp</type>
    <subtype>_universal._sub._ipp._tcp</subtype>
    <port>631</port>
    <txt-record>txtver=1</txt-record>
    <txt-record>qtotal=1</txt-record>
    <txt-record>Transparent=T</txt-record>
    <txt-record>URF=none</txt-record>
    <txt-record>rp=printers/Brother-MFC-490CW</txt-record>
    <txt-record>note=Brother MFC-490CW</txt-record>
    <txt-record>product=(Brother MFC-490CW)</txt-record>
    <txt-record>printer-state=3</txt-record>
    <txt-record>printer-type=0x809046</txt-record>
    <txt-record>pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf</txt-record>
  </service>
</service-group>
AVAHI

avahi-daemon -r

tail -f /var/log/cups/error_log

Deployment:

podman build -t cups-brother-airprint .
podman run -d --name cups-airprint --network host \
  -v /var/run/dbus:/var/run/dbus cups-brother-airprint

Done. My iPhone sees the printer, prints flawlessly.

Conclusion

What would have meant hours of Stack Overflow, trial-and-error, and frustration, Warp solved in 20 minutes. Not through magic, but through:

• Direct access to my system (reading/writing files, building containers)
• Intelligent debugging (analyzing logs, isolating problems)
• Iterative improvement (every problem immediately fixed and tested)

This isn't "AI-assisted development" – this is AI doing the development while I watch.

Old printer + Warp AI = AirPrint in 20 minutes.

10/10, would containerize a printer again.

Written with (and about) Warp AI. The printer is still running.

Privacy Policy Cookie Policy Terms and Conditions