[SUPPORT] cups DOCKER REPOSITORY


Recommended Posts

2 hours ago, tcj said:

yes
the symlink changes immediately, but cups/the printer does not print anymore


try to print a testpage before and after turning the printer off and on again

 

 

Hmm. my symlink seems to update correct.... but...

 

image.png.97ca9a940b8aef71410bd2316cc92e90.png

 

I am unable to print a test page, so I thought just restarting the docker would remedy the situation...  It did not..

I then got an "Execution error" and there was nothing useful in the logs...  in the edit settings I had a trailing "/" after the /dev/canon (which was working fine iirc) but after it rebuilt and I reinstalled the canon driver (executing the drive install script, just copying the file it said it was missing clears the error, but still can't print) everything works great again.

 

I am going to have to put in the work to make my own install that has the drivers persistent, and I have to learn how to do that first... but the process of making that symlink so it is always up to date seems very solid.

-g

 

 

Link to comment

giving only the symlink "/dev/myprinter001" as a Printer does not work

and by adding "--device=$(readlink -f /dev/myprinter001)" to the extra parameter resolves the symlink and gives the result (e.g. /dev/bus/usb/003/017 ) to the container as an additional device/printer when the docker starts

but this becomes invalid when the printer's path changes e.g. to /dev/bus/usb/003/019 after a printer reboot

so we've got to find a way that the symlink only becomes a valid device for the cups docker container
 

Edited by tcj
,
Link to comment
  • 2 weeks later...

Hello, 

I am trying to get this to print a test page on my hp laserjet 1020.

 

I found the printer with lsusb, started my docker and in docker webui I found 4 local printers.

image.png.78745e3863e390f2bc60140d0cd9156d.png

 

I tried to add both of the LaserJet 1020 options but was unable to print a test page from printer administration tab. The job says completed but nothing came out...

 

I see this in the WebUI logs:

 

E [06/Feb/2022:04:04:19 +0000] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
W [12/Feb/2022:22:07:57 +0200] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [12/Feb/2022:22:07:57 +0200] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
E [12/Feb/2022:22:08:08 +0200] [Client 1] Unable to encrypt connection: A TLS fatal alert has been received. E [12/Feb/2022:22:08:10 +0200] [Client 2] Unable to encrypt connection: A TLS fatal alert has been received.

 

Any help? Anything I can try? 

 

Link to comment

I have an old USB printer (I bought it for $50.00) 15 years ago. It is a Canon Image class 4100 MF. Supposably the new version of cups can handle it. When will the new version get updated or can you add a PPD script to your docker? Yes, I know I can get one with an ethernet port or WiFi but I am broke and using what I have. 

Link to comment
8 hours ago, jperry1978 said:

I have an old USB printer (I bought it for $50.00) 15 years ago. It is a Canon Image class 4100 MF. Supposably the new version of cups can handle it. When will the new version get updated or can you add a PPD script to your docker? Yes, I know I can get one with an ethernet port or WiFi but I am broke and using what I have. 

I use a USB Canon imageCLASS D-530 myself, and although many of the drivers for canon i-c printers are available in this cups implementation, mine is not. 

However, as a work-around, it was easy enough to grab the Linux drivers from Canon's website (not necessarily the US site) and them pass a volume to inside the container.

I still have to open up a terminal to the docker and ./install.sh the drivers every time the container gets updated (which is WAY more often than I want my print server updating) but am able to live with it... (I am still looking into forking and permanently installing the drivers in my own, but haven't had the time.. )

 

FWIW I have not been able to get my scanner working on mine, but that is less of an "issue" and more of a "nice to have" thing (in other software, obviously)...

Link to comment
On 2/13/2022 at 5:03 PM, Garbonzo said:

I use a USB Canon imageCLASS D-530 myself, and although many of the drivers for canon i-c printers are available in this cups implementation, mine is not. 

However, as a work-around, it was easy enough to grab the Linux drivers from Canon's website (not necessarily the US site) and them pass a volume to inside the container.

I still have to open up a terminal to the docker and ./install.sh the drivers every time the container gets updated (which is WAY more often than I want my print server updating) but am able to live with it... (I am still looking into forking and permanently installing the drivers in my own, but haven't had the time.. )

 

FWIW I have not been able to get my scanner working on mine, but that is less of an "issue" and more of a "nice to have" thing (in other software, obviously)...

I cannot seem to get terminal to install the drivers. I get a command not recognized error. 

 

Link to comment
12 hours ago, jperry1978 said:

I cannot seem to get terminal to install the drivers. I get a command not recognized error. 

 

Did you get things straight? I just looked at their website and it looks like it is the same "UFR II/UFRII LT" driver that my d-530 uses (actually I was using v5.30 but I just updated it to the v5.40).

I keep all of my drivers on one share, and I just map the /mnt/user/drivers/canon/linux-UFRII-drv-v540-usen/ to /driver inside the container... then open terminal in the cups container and run 'yes | ./data/install.sh' but that is as "painless" as I have gotten the process, and like I said I have to do it every time the container updates... also all of the previous things in the thread by @rpertusio was very helpful as well..

Good luck.

-g

 

Link to comment

No... I did install the newest version of CUPS. But I still get a PDD error. This is after following the list of commands and making sure I have the correct Bus and device is the CUPS docker settings. I am open to setting up a zoom meeting and sharing screens so someone can follow what I am doing and correct any mistakes I am making.

 

Edited by jperry1978
Link to comment
  • 1 month later...

I have been trying to get my MFC-7360N on the CUPS for airprinting. It is a network printer but it does not airprint compatibility. I ran into this error. (using the built-in drivers seemed to work best).
 

"Unable to locate printer "BRNXXXXX.local"

I tried a load of things and learned a lot through this process. If anyone has this problem the solution is simply to modify your hosts file and adding the BRNXXX.local and the static ip of the printer.

 

/etc/hosts:

192.168.1.XX BRNXXXXX.local


Hope this helps anyone!

Link to comment
On 2/12/2022 at 12:14 PM, Laov said:

Hello,

I am trying to get this to print a test page on my hp laserjet 1020.

 

I found the printer with lsusb, started my docker and in docker webui I found 4 local printers.

image.png.78745e3863e390f2bc60140d0cd9156d.png

 

I tried to add both of the LaserJet 1020 options but was unable to print a test page from printer administration tab. The job says completed but nothing came out...

 

I see this in the WebUI logs:

 

E [06/Feb/2022:04:04:19 +0000] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
W [12/Feb/2022:22:07:57 +0200] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [12/Feb/2022:22:07:57 +0200] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
E [12/Feb/2022:22:08:08 +0200] [Client 1] Unable to encrypt connection: A TLS fatal alert has been received. E [12/Feb/2022:22:08:10 +0200] [Client 2] Unable to encrypt connection: A TLS fatal alert has been received.

 

Any help? Anything I can try? 

Have you resolved this?

Has anyone else?

 

I am stuck with the same printer, same problem. Most interesting is that everything worked correctly on my initial install. I printed the docs I needed at the time, then let it sit. A reboot or some other event resulted in the printer picking up a new USB location /dev/bus/usb/003/003 -> 007 or some such thing. I haven't been able to print ever since...

I believe I have the symlink setup (per instruction in this forum). I am able to remove the printer and add it back to CUPS. It simply will not print; test page or otherwise, but it does consider the job completed.

 

 

Link to comment
On 4/3/2022 at 12:30 AM, SuperPAPA said:

Have you resolved this?

Has anyone else?

 

I am stuck with the same printer, same problem. Most interesting is that everything worked correctly on my initial install. I printed the docs I needed at the time, then let it sit. A reboot or some other event resulted in the printer picking up a new USB location /dev/bus/usb/003/003 -> 007 or some such thing. I haven't been able to print ever since...

I believe I have the symlink setup (per instruction in this forum). I am able to remove the printer and add it back to CUPS. It simply will not print; test page or otherwise, but it does consider the job completed.

 

 

Nope. I simply went and got a wifi printer instead as the cables were annoying. I have this slight hunch that a linux driver for the printer needs to be installed into unraid. But it is just a hunch...

Link to comment
  • 3 weeks later...
On 4/2/2022 at 4:30 PM, SuperPAPA said:

Have you resolved this?

Has anyone else?

 

I am stuck with the same printer, same problem. Most interesting is that everything worked correctly on my initial install. I printed the docs I needed at the time, then let it sit. A reboot or some other event resulted in the printer picking up a new USB location /dev/bus/usb/003/003 -> 007 or some such thing. I haven't been able to print ever since...

I believe I have the symlink setup (per instruction in this forum). I am able to remove the printer and add it back to CUPS. It simply will not print; test page or otherwise, but it does consider the job completed.

 

 

I am having the EXACT same issue as you with the same printer. Worked great initially and now won't work no matter what I try. 

Link to comment

for installing other drivers or updating drivers, is manually installing from terminal the only way? then every time the docker starts the drivers need to be installed again?

is it possible to set it up in the config file or something like that?

 

my current set up for CUPS is an Ubuntu VM because I had to install my printer's drivers.

Link to comment
On 4/8/2022 at 10:05 PM, Laov said:

Nope. I simply went and got a wifi printer instead as the cables were annoying. I have this slight hunch that a linux driver for the printer needs to be installed into unraid. But it is just a hunch...

Hi, I have the same laserjet 1020 and the reason why it doesn't work is much funnier than that. You see, that printer is a little stupid. That is to say that the printer doesn't persistently store its own firmware (because reasons). Thus, every time you power it on you actually have to manually copy the firmware file into /dev/usb/lpX (X being the line printer number it gets assigned, probably 0) EVERY TIME you power it on or connect it. I have figured out how to do that and will post instructions later if anyone wants to but I still haven't found how to get the docker container to change the bus ID when the printer gets disconnected. I tried the --device=$(readlink ...) thing that @rpertusio proposed, which worked until I restarted the container and then it failed, throwing an error on startup that it can't find the busid file (which no longer exists since it has changed and it's looking for the old one). It appears that removing --device=$(readlink...) and just providing /dev/printer1 as a printer does not work, probably because the symlink itself cannot be passed to the container. Perhaps a hard link would work instead? How can that be done with a udev rule? I'll see if I can find some solution, but please if you have any ideas I am very looking forward to hearing them.

Edited by Devnol
Link to comment
30 minutes ago, Devnol said:

Hi, I have the same laserjet 1020 and the reason why it doesn't work is much funnier than that. You see, that printer is a little stupid. That is to say that the printer doesn't persistently store its own firmware (because reasons). Thus, every time you power it on you actually have to manually copy the firmware file into /dev/usb/lpX (X being the line printer number it gets assigned, probably 0) EVERY TIME you power it on or connect it. I have figured out how to do that and will post instructions later if anyone wants to but I still haven't found how to get the docker container to change the bus ID when the printer gets disconnected. I tried the --device=$(readlink ...) thing that @rpertusio proposed, which worked until I restarted the container and then it failed, throwing an error on startup that it can't find the busid file (which no longer exists since it has changed and it's looking for the old one). It appears that removing --device=$(readlink...) and just providing /dev/printer1 as a printer does not work, probably because the symlink itself cannot be passed to the container. Perhaps a hard link would work instead? How can that be done with a udev rule? I'll see if I can find some solution, but please if you have any ideas I am very looking forward to hearing them.

I believe I have found a rather not very pretty solution. Instead of passing the device busid, you pass the entire bus it is on (e.g. if the printer is /002/012 and unplugging it turns it to /002/013, you can pass /dev/bus/usb/002 to the docker container in the Printer argument of the docker setup). However, for some reason unplugging the printer and plugging it back in does change the busid on the unraid host, but on the docker container you end up with the old busid (such as 012) which no longer exists, and the new one (013) does not get created. Here's where the jank comes in: I added a udev rule that runs a script that, similarly to the udev rule itself is copied from /boot/config on boot and is chmoded to 744 by the gofile. The udev rule is as follows:
 

SUBSYSTEM=="usb", ATTRS{idVendor}=="cafe", ATTRS{idProduct}=="f00b", ATTRS{serial}=="AAAA1234", ACTION=="add", RUN+="/usr/local/bin/printer.sh"

The printer.sh script is as follows:

#!/usr/bin/bash
#Copy LaserJet 1020 firmware to printer, replace lp0 with your own lp name, issue is that it might change on a reboot if you have multiple. If you have just one, you can specify lp* instead.
cat /boot/config/cups/sihp1020.dl > /dev/usb/lp0

#restart the cups docker container to pick up the new /dev/bus/usb/ entry
docker restart cups


then the /boot/config/go code for the above is as such:

cp /boot/config/rules.d/99-usb-rules.rules /etc/udev/rules.d/99-usb-rules.rules
cp /boot/config/cups/printer.sh /usr/local/bin/printer.sh

chmod 644 /etc/udev/rules.d/99-usb-rules.rules
chmod 744 /usr/local/bin/printer.sh

udevadm control --reload-rules

udevadm trigger --attr-match=subsystem=usb


(obviously make sure to copy the rule from /etc/udev/rules.d/99-usb-rules.rules to /boot/config/rules.d/ and /usr/local/bin/printer.sh to /boot/config/cups/, creating the required folders with mkdir, before restarting or they will be lost).

Now the firmware file (sihp1020.dl), or any other foo2zjs printer for that matter, is kind of a pain to get:
- Download the firmware sihp1020.img file (or whichever .img applies for your zjs printer) from https://github.com/koenkooi/foo2zjs (since the original foo2zjs servers are dead)
- Move the .img file to somewhere in your unraid machine host
- Copy the image to the cups container:
    - Open a webterminal
    - Copy the image to the cups container root as such:

docker cp /mnt/user/data/sihp1020.img cups:/

   - Run the arm2hpdl utility provided by foo2zjs inside the cups container with:

docker exec cups arm2hpdl sihp1020.img > sihp1020.dl

You should now have a .dl firmware file in your unraid host (do ls and you you should see it)
- cp that to /boot/config/cups/sihp1020.dl so that it gets run by the script and is persistent across reboots.

Now, every time you plug in your printer or turn it on it should blink a couple times while the firmware is being copied. After that, you should be able to add it to cups. However, there are a few caveats with this process:

Due to the fact that the printer busid changes the printer.sh script restarts the cups container every time, effectively resetting it. However, all your cups configs inside /etc/cups will be safe since they are persistent, just a thing to note.

Again, if anyone has a less jank way of doing this, I am all ears.

  • Upvote 1
Link to comment
  • 1 month later...

Hi guys! First of all thanks for the docker! 

I could setup the printer and print a test page within the admin page of the docker.. but i can't seem to print on it from anytwher else.. my windows machine can't find the printer.. and I can't even ping on the ipaddress:port. I think is an unraid problem, but I can't find a solution..

Of cours cups is configured to share the printers..

Any solution? I'm desperate..

Link to comment
  • 1 month later...
On 1/25/2022 at 6:29 PM, rpertusio said:

 

Rick_Sanchez,

 

cups Docker container -> Edit -> Change from 'Basic View' to 'Advanced View' (upper right toggle)

Under "Extra Parameters" append this to the end:  --device=$(readlink -f /dev/printer1)

Make sure "Printer:" field is /dev/printer1

 

 

========== Long Version (SymLink and docker config) ============

Pre-Req:

* Install cups docker app

* Plug your USB printer in

 

 

Hi there,

 

Experimenting with this a bit. I have an older Canon MG5760 printer, which is connected via Wifi. There are Linux drivers available from Canon's website - the manual for Linux seems to support Wifi printing. Do I just need to mount and install within the Docker container, then do the CUPS setup stuff?

 

Cheers,


Xav.

Link to comment
  • 1 month later...

I've installed cups 2.2.7 as a Docker app on my unraid server and had to do some work to get it to start. It now works great, sort-of, enabling access to my networked but not airprint-enabled printers from my Android and my wife's iOS phone  . . . until the unraid server reboots. I'm sure that the docker is storing the printer config information somewhere that's not persistent across reboots, but I have no idea how to fix this.

 

Can anyone help? I know that I'm missing some technical knowledge that would enable me to fix this.

Edited by StevenHB
Make clear that printers are not usb, but networked
Link to comment
  • 2 weeks later...
  • 2 weeks later...

Hi everyone. my CUPS run realy well, all my client is working as intendet and now i need to scan with the same Multi Funcion Printer with SANE.

From the consolle i run:

scanimage -L

and the system responde is:

device `hpljm1005:libusb:007:004' is a Hewlett-Packard LaserJet M1120 multi-function peripheral
device `hpaio:/usb/HP_LaserJet_M1120_MFP?serial=MF27FCF' is a Hewlett-Packard HP_LaserJet_M1120_MFP all-in-one

and the scanner funcion is working! (i try to scan and it works but only in LOCAL!)

My question is: how to export the scanner funcionality to LAN?

 

Sorry if my English is not perferct.

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.