MaxWinterstein / homeassistant-addons

GNU General Public License v3.0
134 stars 39 forks source link

[CUPS] How to handle custom printer drivers #226

Closed kraiz closed 9 months ago

kraiz commented 9 months ago

I use the cups addon but have pretty cheap printer that isn't in the cups default supported devices. I managed to add the 2 necessary files to the container and make it work/print :)

Kyocera/Kyocera_FS-1040DDI.ppd under /usr/share/cups/models/ + rastertokpsl under /usr/lib/cups/filter/

My question is how to make it work after addon or HA restarts. These file are gone. Can we add some more copy commands in cups/rootfs/run.sh?

kraiz commented 9 months ago

Ok, in the meantime I understand how addons works thanks to the docs.

I was able to place the two files into the addon's /data/cups/ppd by attaching to the container. As this folder is a persistent volume the files survive. I also changed the ppd file content to reference the filter (second file) from this folder.

This works for me now but doing it right would mean I need to fork the addon and add the files in Dockerfile.