Printing
Gets you printing to the colour queues in building MARB from Linux or macOS, through CUPS, including double-sided, hole-punched and stapled output. Two queues live on the same print server: MARB-color for staff and STUD-color for students. Everything below applies to both; only the queue name changes.
Official documentation: THI printing service · knowledge base: printing. Account or quota problems belong there, not here.
Two things to know first
Jobs do not print until you release them at the device. Send the job, walk to the machine, authenticate with your campus card, then pick the job. A queue that looks "finished" on your laptop is normal and does not mean the job was lost.
You do not need a driver at all if you are in a hurry. https://print.thi.de takes a PDF in the browser and prints it. No CUPS, no PPD, no SMB. You lose the finishing options (punch, staple, jog), which is the only reason the rest of this page exists.
Documented values
| Setting | Staff | Students |
|---|---|---|
| Print server | rz-print-marb.rz.fh-ingolstadt.de | rz-print-marb.rz.fh-ingolstadt.de |
| Queue | MARB-color | STUD-color |
| Device | Kyocera TASKalfa 6054ci | not documented here |
| SMB domain | ESPL_001 | ESPL_001 |
| Username | your campus login (<kennung>) | your campus login (<kennung>) |
The queue is reached over SMB, the same protocol and the same campus login as the campus network shares.
The server was renamed from marb-mfp.rz.fh-ingolstadt.de. Old notes and working configurations still carry the previous name; it is the most common reason a setup that worked last year stopped.
The device model behind STUD-color is not documented here, so the driver section below assumes the same model as the staff queue. If the verify step does not list Pnch and Stpl on the student queue, that assumption is wrong for your queue and the finishing recipes will be rejected.
Install the driver
The vendor ships one tarball for all models, roughly 250 MB, from the Kyocera download page. There is no stable direct link, so nothing can fetch it for you unattended.
The AUR package wraps the download, so it is one command below rather than a browser trip.
Downloading it is a manual step: open the page in a browser and take the tarball.
Downloading it is a manual step: open the page in a browser and take the tarball.
sudo pacman -S cups smbclient system-config-printer
sudo systemctl enable --now cupsThe PPDs come from the AUR package kyocera-cups, which covers the TASKalfa line the Kyocera TASKalfa 6054ci belongs to. With an AUR helper that is one line:
yay -S kyocera-cupsWithout a helper, git clone https://aur.archlinux.org/kyocera-cups.git and run makepkg -si in it. Either way it is worth reading the PKGBUILD first, since that is where it is decided whether the vendor archive is fetched during the build or has to be placed beside it.
Unpacking the vendor tarball by hand works too, and is the route to take if you would rather not build from the AUR. Background: ArchWiki: CUPS.
sudo apt update
sudo apt install cups smbclient printer-driver-all system-config-printerThen unpack the vendor tarball and install the EU variant. It carries the European finishing options, including 2-hole punching:
tar -xzf KyoceraLinuxPackages-*.tar.gz
sudo dpkg -i KyoceraLinuxPackages-*/Ubuntu/EU/kyodialog_amd64/kyodialog_10.0-0_amd64.deb
sudo apt -f installThis puts the PPD at /usr/share/kyocera10.0/ppd10.0/Kyocera_TASKalfa_6054ci.ppd.
Install the Kyocera macOS driver from the vendor download page, then add the printer through System Settings → Printers & Scanners → Add Printer. Choose the Windows tab (SMB) rather than IP, since the queue is served over SMB.
Enter the server as smb://rz-print-marb.rz.fh-ingolstadt.de/ followed by your queue from the table above, and select the Kyocera TASKalfa 6054ci driver rather than "Generic PostScript".
Pick your queue
Every command from here on reads the queue from a shell variable, so the same recipe works for staff and students. Set it once per terminal session:
# Staff
QUEUE=MARB-color
# Students
QUEUE=STUD-colorA new terminal starts without it. If a command reports an empty queue name, set QUEUE again.
Add the queue
sudo lpadmin -p "$QUEUE" -E \
-v "smb://rz-print-marb.rz.fh-ingolstadt.de/$QUEUE" \
-m "kyocera/Kyocera_TASKalfa_6054ci.ppd"sudo lpadmin -p "$QUEUE" -E \
-v "smb://rz-print-marb.rz.fh-ingolstadt.de/$QUEUE" \
-m "/usr/share/kyocera10.0/ppd10.0/Kyocera_TASKalfa_6054ci.ppd"If that is rejected, use the CUPS model name instead of the absolute path. Which form works varies between CUPS builds:
sudo lpadmin -p "$QUEUE" -E \
-v "smb://rz-print-marb.rz.fh-ingolstadt.de/$QUEUE" \
-m "kyocera/Kyocera_TASKalfa_6054ci.ppd"Adding the printer in System Settings does this for you. To script it:
sudo lpadmin -p "$QUEUE" -E \
-v "smb://rz-print-marb.rz.fh-ingolstadt.de/$QUEUE" \
-m "kyocera/Kyocera_TASKalfa_6054ci.ppd"Or run the script, which carries the values above and falls back between the two PPD forms automatically. Without arguments it adds the staff queue; --students adds the student queue instead:
printing-install.sh DownloadAdds the staff queue to CUPS, or the student queue with --students, trying both PPD forms
curl -fsSLO https://hutzelmann.github.io/thi-linux-macos-setup/scripts/printing-install.sh
less printing-install.sh # read it first
sh printing-install.sh --dry-run
sh printing-install.sh Runs on its own. The documented values and helpers are built in, no clone needed. --dry-run prints what it would do and changes nothing.
At the first print job CUPS asks for credentials. Username is your campus login, domain is ESPL_001. If the dialogue has no separate domain field, combine them: ESPL_001\<kennung>.
Verify
lpstat -p "$QUEUE"
lpoptions -p "$QUEUE" -lThe second command must list Pnch and Stpl. If it does not, the vendor PPD is not in use and every finishing option below will be rejected.
The device behind the staff queue is fitted with an inserter and a punch unit. A folding unit may or may not be installed. If an option is missing from lpoptions, the corresponding hardware is not configured on the device or not present in the PPD.
printing-verify.sh DownloadChecks the queue, the server and the finishing options; pass --students for the student queue
curl -fsSLO https://hutzelmann.github.io/thi-linux-macos-setup/scripts/printing-verify.sh
less printing-verify.sh # read it first
sh printing-verify.sh --dry-run Runs on its own. The documented values and helpers are built in, no clone needed. --dry-run prints what it would do and changes nothing.
Recipes
Plain A4, single and double sided:
lp -d "$QUEUE" -o media=A4 file.pdf
lp -d "$QUEUE" -o media=A4 -o sides=two-sided-long-edge file.pdf-o KSCREENMODE="Resolution" selects the finer halftone screen, which is what light grey area fills and fine line art need (the grey grid behind an exam sheet, for example) to come out as an even tone rather than a coarse pattern. It costs nothing on pages that do not need it, so it is carried through every recipe below and can be dropped from any of them.
Hole-punched:
lp -d "$QUEUE" -o media=A4 -o Pnch=2HoleEUR -o KSCREENMODE="Resolution" file.pdfThe exam-printing combination, double sided, punched, stapled at the rear, 25 copies:
lp -d "$QUEUE" -n 25 -o media=A4 -o sides=two-sided-long-edge \
-o Pnch=2HoleEUR -o Stpl=Rear -o KSCREENMODE="Resolution" file.pdfStpl=Rear is the usual position. Stpl=Front staples at the bottom of the page.
A4 content scaled onto A3:
lp -d "$QUEUE" -o media=A3 -o fit-to-page -o sides=two-sided-long-edge \
-o Pnch=2HoleEUR -o Stpl=Front -o KSCREENMODE="Resolution" file.pdfLabels, fed from the manual tray on the right with the labels facing down:
lp -d "$QUEUE" -o media=A4 -o InputSlot=MF1 -o MediaType=Labels \
-o KSCREENMODE="Resolution" file.pdfMany documents at once, each offset in the output tray so you can separate them:
for p in *.pdf; do
lp -d "$QUEUE" -o media=A4 -o sides=two-sided-long-edge \
-o Pnch=2HoleEUR -o Sep="Jog" -o KSCREENMODE="Resolution" "$p"
sleep 1
doneRun lpoptions -p "$QUEUE" -l for the full option list. The PPD exposes trapping, overprint, colour model, gloss mode and resolution beyond what is shown here.
Remove it again
Removing the queue is one command, and it is reversible: rerun the add step to get the queue back.
sudo lpadmin -x "$QUEUE"If you added both queues, remove them by name:
sudo lpadmin -x MARB-color
sudo lpadmin -x STUD-colorThat also deletes the PPD copy CUPS made for the queue under /etc/cups/ppd/. Check nothing is left:
lpstat -p # the queue is no longer listed
lpstat -v # no smb:// device points at the print serverThe password you typed at the first job is not held by CUPS.
It sits in your desktop keyring (GNOME Keyring, KWallet), filed under the print server name. Remove it there if you want it gone.
It sits in your desktop keyring (GNOME Keyring, KWallet), filed under the print server name. Remove it there if you want it gone.
It sits in the login keychain, filed under the print server name. Remove it there if you want it gone.
Then the driver, which is separate from the queue and is worth keeping if you print elsewhere on the same model.
sudo pacman -Rns kyocera-cupsRemoving CUPS as well stops all printing on the machine, not only campus printing:
sudo systemctl disable --now cups
sudo pacman -Rns cups smbclient system-config-printerThe package name depends on which variant of the vendor tarball you installed, so ask dpkg which package owns the PPD rather than guessing:
dpkg -S /usr/share/kyocera10.0/ppd10.0/Kyocera_TASKalfa_6054ci.ppd
sudo apt purge <the package name from the line above>If the PPD file is already gone and the package is not, dpkg -l | grep -i kyo finds it. CUPS and the SMB client are ordinary Debian packages, and removing them takes all printing with them:
sudo apt purge cups smbclient system-config-printerRemove the printer in System Settings → Printers & Scanners: select it, then use the minus button. That is the same operation as the lpadmin -x above.
The driver installs under /Library/Printers/. Look before deleting, since printers you set up yourself live in the same place:
ls /Library/Printers/The vendor download ships an uninstaller. If you still have the disk image, that is the vendor's own route and it removes the parts an rm would miss.
An empty /etc/samba/smb.conf, if the install step created one, can stay. Other SMB tooling expects the file to exist.
An empty /etc/samba/smb.conf, if the install step created one, can stay. Other SMB tooling expects the file to exist.
Known quirks
A glob does not work as a batch. lp -d "$QUEUE" ... *.pdf silently does not do what it looks like. Use a for loop.
Rapid loops hit authentication delays. Jobs submitted back-to-back can stall in SMB authentication. A sleep 1 between jobs avoids it. If jobs seem stuck, reopen the print queue and retry.
Nothing comes out and the queue is empty. Expected. Go to the device and release the job with your card. Unreleased jobs expire after approximately 24 hours.
CUPS may need restarting twice after adding the queue before the first job goes through. Reported on Debian with KDE; harmless, if baffling.
On KDE, the first job may need explicit authentication. If it sits in the queue, open the print queue, right-click the job and choose Authentifizieren (Authenticate).
Missing /etc/samba/smb.conf breaks the SMB backend on some systems. An empty file is enough:
sudo mkdir -p /etc/samba && sudo touch /etc/samba/smb.confThe queue window is system-config-printer if your desktop does not offer one.
CUPS may need restarting twice after adding the queue before the first job goes through. Reported on Debian with KDE; harmless, if baffling.
On KDE, the first job may need explicit authentication. If it sits in the queue, open the print queue, right-click the job and choose Authentifizieren (Authenticate).
Missing /etc/samba/smb.conf breaks the SMB backend on some systems. An empty file is enough:
sudo mkdir -p /etc/samba && sudo touch /etc/samba/smb.confThe queue window is system-config-printer if your desktop does not offer one.