jimi
November 4, 2022, 11:39am
1
Testing cups in unprivileged focal container with a functioning Brother printer.
lsusb shows the printer and i added it to the cups container.
lxc config device add cups brother usb vendorid=04f9 productid=02de
Installed brother drivers , shows up in cups but can’t get it to print anything.
lpstat / cups just shows the printing job and,
Waiting for printer to become available.
cups shows,
Current Connection: usb:/dev/usb/lp0
but there is no /dev/usb/
folder in the container.
Also when trying to add a printer in cups without brother drivers installed it is not listed under Local Printers.
bmullan
(Brian Mullan)
November 4, 2022, 4:35pm
2
I have a Brother multi function printer
It supports the Internet Printing Protocol (IPP).
It’s simple to configure.
I wrote up what I configured and can print from any LXD Container
opened 09:57PM - 12 Oct 21 UTC
Step 1
On your local linux system use ippfind to get IPP address of local pri… nters
example:
$ ippfind
might return something like the following, which would tell me I have at least one IPP enabled printer
$ ipp://BRW6814019ED515.local:631/ipp/print
Step 2
On your work/home WiFi router configure PORT forward to forward "some port" to IP address of local Printer and its Port 631
Step 3
Then on your CIAB Host/Server (Cloud/VM/physical server). Log into both the ciab-guac and the cn1 LXD containers and do the following steps in both containers:
make CIAB Admin User ID a member of "lpadmin" group
Step 4 - create the CUPS IPP printer configuration
then as sudo or root use lpadmin to add the remote printer locally on CIAB
-p = printer_name = the name of the printer as it will appear on the Linux system in the Print dialog boxes
-v = ip_address = the PUBLIC IP address of home Wifi Router that the Printer is attached to via wifi
port_ID = the WIFI "source PORT" for the Port Forward config statement
-L = location of remote printer (any name you want to ID where the printer is located)
The command line to create the Printer, all one line, and executed as sudo is:
# lpadmin -E -p printer_name -v http://<wifi_ip_address:wifi_port_ID/ipp/print -L printer_location -E -m everywhere
example - assuming you set your wifi router to port forward port 6993 to port 633 and that your wifi
router's PUBLIC IP address is 45.24.77.191 then on the CN1 container enter:
# lpadmin -E -p home_printer htttp://45.24.77.191:6993/ipp/print -L my_home -E -m everywhere
bmullan
(Brian Mullan)
November 4, 2022, 4:40pm
3
jimi
November 4, 2022, 4:42pm
4
Ok thanks, that’s how it was running previously but i don’t have wifi at new printer location and not sure if usb to ethernet adapter will work with the printer, hence why i went the USB way.
Know though why the USB Passthrough is not working for me, any ideas?
bmullan
(Brian Mullan)
November 4, 2022, 4:48pm
5
Do you control the internet router at the new location? Same config steps more or less than wifi
jimi
November 4, 2022, 5:02pm
6
yes i do, but was hopping on USB solution
bmullan
(Brian Mullan)
November 4, 2022, 6:12pm
7
I searched this forum using:
“USB passthrough”
and got 36 hits
If you haven’t you might want to read thru them.
bmullan
(Brian Mullan)
November 4, 2022, 6:20pm
8
Stephanie Grabber wrote the following
Hi @jimi ,
Have you ever tested with the lxd vm? I have added my printer and get print out from usb device. After adding printer you can check with lsusb command and lpinfo -v in the lxd vm.
Regards.
jimi
November 6, 2022, 1:42pm
10
Thanks for pushing me mate, had gone through these threads previously and it was driving me mad, figured it out now, the problem was coming from the host (usbguard) and for some reason i wasn’t seeing that error in logs or i would have acted on it earlier.
Thought about it as last resort, it works now in unprivileged container.