Exercise: Create and Print to a Driverless Queue
Using the Modern CUPS Workflow
1 Purpose
Now that you have a persistent virtual IPP printer running as a background service, you need to tell CUPS how to find it. In this exercise, you will create a CUPS print queue using the modern, driverless method. You will use the -m everywhere model, which tells CUPS to treat the device as a standard IPP Everywhere printer, and point it to the fixed port your service is using.
2 What You’ll Accomplish
By the end of this exercise, you will be able to:
- Create a driverless print queue using the
lpadmincommand. - Print a test job to the persistent IPP queue.
- Verify a successful print by checking the output directory and viewing the service logs.
This exercise maps to the following program and course learning outcomes:
- Course Learning Outcomes (CLOs):
- 1. Identify hardware and basic network components: This exercise covers the modern software process for configuring and using a network peripheral.
This exercise develops the following skills, which align with the O*NET SOC Code 15-1232.00 for Computer User Support Specialists.
| Learning Objective | O*NET KSAs | Technologies Used |
|---|---|---|
| Create and test a driverless print queue. | Knowledge: Computers & Electronics, Telecommunications Skills: Installation, Systems Analysis |
CUPS, lpadmin, journalctl |
3 Prerequisites
This exercise requires a running Fedora 43 virtual machine where you have already completed Exercise 10.1 and the ippeveprinter.service is active and running.
4 Step-by-Step Guide
4.1 Step 1: Create the Driverless CUPS Queue
We will now use the lpadmin command to create the print queue that points to our persistent service.
Open a terminal window.
Run the following command. The port
8631is fixed because we defined it in oursystemdservice file.sudo lpadmin -p IPP-Persistent-Printer -E -v ipp://localhost:8631/ipp/print -m everywhereLet’s break down this command:
-p IPP-Persistent-Printer: Sets the name of our queue.-E: Enables the printer so it’s immediately ready to accept jobs.-v ipp://localhost:8631/ipp/print: The device URI. This tells CUPS where the “hardware” is—our persistentippeveprinterservice.-m everywhere: This is the magic flag. It tells CUPS to use the modern, driverless IPP Everywhere model.
4.2 Step 2: Print a Test Job
Now, let’s send a print job to our new, persistent queue.
Use the
echoandlpcommands to send a test file:echo "This is a test of a persistent, driverless printer." | lp -d IPP-Persistent-Printer
4.3 Step 3: Verify the Output
Since the service is running in the background, we can’t watch its terminal output directly. Instead, we verify in two ways: by checking for the file and by viewing the service’s log.
Check the output directory. This is the most direct proof.
ls -l ~/PrinterOutputYou should see a PDF file in this directory, confirming the job was processed and saved.
View the service log. This is a powerful troubleshooting skill. The
journalctlcommand lets you see the logs forsystemdservices.journalctl --user -u ippeveprinter.serviceScroll through the log output. You should see the same activity you saw in the terminal in the previous test, including lines like
Accepted connection,Send-Document, andCreated job file. This is how you debug a background service. Pressqto exit the log viewer.
5 Reflect and Review
Now that you have completed this exercise, reflect on your experience in your personal notes:
- 3 parts of the
lpadmincommand you used. - 2 ways you verified the print job was successful.
- 1 question you still have about
journalctl.
Answer these questions in your notes to solidify your understanding:
- What command is used to create and manage CUPS print queues from the CLI?
- What flag tells
lpadminto use the modern, driverless printing standard? - Now that the virtual printer runs as a background service, how can you view its log output?
- Why didn’t you need two separate terminal windows for this exercise?