Skip to content

Instantly share code, notes, and snippets.

@sclark-dev
Last active September 25, 2026 15:37
Show Gist options
  • Select an option

  • Save sclark-dev/14f975c257590d212a6e7c12e1c832ad to your computer and use it in GitHub Desktop.

Select an option

Save sclark-dev/14f975c257590d212a6e7c12e1c832ad to your computer and use it in GitHub Desktop.
Brother QL-570 Fedora/Atomic SELinux Setup

Writing this mostly for myself because this was a massive pain the ass.

Brother's offical support pages recommend globally disabling SELinux. Bad.
Their other option is manually changing SELinux files. Bad again.

This sets up a proper policy.

Steps

  1. Go grab both the LPR and CUPSwrapper drivers from Brother Support.
  2. Install both these RPMs.
    Normal: sudo dnf install "ql570lpr-*.i386.rpm" "ql570cupswrapper-*.i386.rpm"
    Atomic: sudo rpm-ostree install "ql570lpr-*.i386.rpm" "ql570cupswrapper-*.i386.rpm"
  3. Reboot.
  4. Add printer via system settings or CUPS.
  5. Print test page.
  6. ./ql570_selinux.sh
  7. Print another test page. It should work now.
#!/bin/bash
# Required for 32-bit binary filters.
sudo setsebool -P cups_execmem 1
# Visual check for CUPS error in SELinux logs.
sudo ausearch -m avc -ts recent | grep cups
# Filter log to only CUPS failures, then convert to policy module.
sudo grep cups /var/log/audit/audit.log | audit2allow -M brother-ql-cups
# Install policy module.
sudo semodule -i brother-ql-cups.pp
# Fix potential SELinux label issues.
sudo restorecon -Rv /opt/brother/
sudo restorecon -Rv /usr/lib/cups/filter/
# Restart CUPS
sudo systemctl restart cups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment