How do I get my thermal printer to work on silverblue?

Hi, I’ve been trying for the past 2 days getting this printer to work. This printer works on other non immutable distros following instructions from here: MUNBYN ITPP941 - Stopped "No Available Printer." - Printers - Manjaro Linux Forum

This is the entire process:
So, I went to Linux Driver - Rollo , downloaded rollo-driver-ubuntu_x86_64_v1.0.2.tar.gz .

Extracted the file, and copied the raster file to CUPS filters:
sudo cp rollo-driver-ubuntu_x86_64_v1.0.2/ubuntu_x86_64_v1.0.2/rastertolabelbeeprt /usr/lib/cups/filter/

Installed the printer in CUPS, using the PDD file:
rollo-driver-ubuntu_x86_64_v1.0.2/ubuntu_x86_64_v1.0.2/ppd/ThermalPrinter.ppd

I believe I need to copy the raster file to /usr/lib/cups/filter/ and upon googling I came across this: Reddit - Dive into anything

This post suggest creating a rpm package. I tried following it and I’m honestly not sure what went wrong. I even tried to get ChatGPT to guide me through. I’m not even sure whether layering through a rpm package will work.

Below the same post, there was another solution:
Another way to do this which I don’t often see mentioned would be by using systemd-sysext, which allows for system extensions to be loaded in the usr directory using overlayfs. This means you can overlay additional files (meaning they are not actually in the usr directory) during runtime even though you cannot modify the usr directory.

  1. Make a /var/lib/extensions/YourExtensionName directory.
  2. Add a /var/lib/extensions/YourExtensionName/usr directory and your needed files inside it.
  3. Copy /etc/os-release to /var/lib/extensions/YourExtensionName/usr/lib/extension-release.d/extension-release.YourExtensionName
  4. Use systemd-sysext merge to overlay your extensions
  5. Use systemctl enable systemd-sysext to automatically merge your extensions on boot

I also tried that, but I get the error of are you sure you are logged in? Using systemd seems to change my password and I cannot log back in, until i restart my pc. This might have something to do with SELinux, I’m not sure.

ChatGPT also gave me the suggestion of copying the files through toolbox, it seems to have done something, but even after adding the ppd file it still wouldn’t print.

Any suggestions would be much appreciated.

1 Like

If you’re using systedm-sysexts, you should watch out for: GitHub - travier/fedora-sysexts: Example sysexts for Fedora image based systems. Note that systemd-sysexts are still in an experimental phase on the Atomic Desktops.

As you apparently need to setup some files in /usr, you should look into making a small RPM package using fpm and overlaying that. That should be the easiest option right now.

Thank you for your response. I just had a look at fpm using gpt and it does seem like an easier way of doing it. I’ll give it another shot in my gnome-boxes.

1 Like

Added cups, printing, rpm, systemd-sysext

Nice ideas! So fpm is the way to easily build RPMs?

This is currently the major bottleneck of atomic desktops UX.

I will try to build some myself

It was pretty easy. Took about 5 minutes using chatgpt as a guide.

Great! Feel free to share here your results as that may help future readers (which may include you as well :slight_smile:).

Okay! So what I’ve did is, I entered toolbox so I can use dnf commands.

Install required tools: ruby and fpm using these commands:
dnf install -y ruby ruby-devel gcc make cups-devel
gem install --no-document fpm

My goal was to move rastertolabelbeeprt into /usr/lib/cups/filter/. First I have to move the file into the container created by toolbox.
cp /path/to/rastertolabelbeeprt

Now I can create the rpm using fpm:
fpm -s dir -t rpm
–name rastertolabelbeeprt
–version 1.0
–iteration 1
–description “A filter for CUPS that converts raster images to labels.”
–prefix /usr/lib/cups/filter/
rastertolabelbeeprt

the command that specifies --prefix /usr/lib/cups/filter/ will place rastertolabelbeeprt into /usr/lib/cups/filter/ on the host system.

You can locate the create rpm package using:
ls *.rpm

which returns: rastertolabelbeeprt-1.0-1.x86_64.rpm

The rpm file can then be layered using rpm-ostree:

sudo rpm-ostree install /desired/path/on/host/rastertolabelbeeprt-1.0-1.x86_64.rpm

1 Like