Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document USB printer setup #29

Open
3 tasks
DrPsychick opened this issue Jan 23, 2021 · 7 comments
Open
3 tasks

Document USB printer setup #29

DrPsychick opened this issue Jan 23, 2021 · 7 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@DrPsychick
Copy link
Collaborator

  • add a separate USB.md file to the repo, describing the process of attaching/setting up a USB printer
  • add screenshots/photos to docs/ (if applicable)
  • link the USB.md file in the README in a "Example Setups" (or similar) section

@HammyHavoc would you be willing to create a PR for this?

@DrPsychick DrPsychick added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Jan 23, 2021
@sunmeplz
Copy link

Hi @DrPsychick !
not sure if there need some extra info for that, It takes long lime to understand why my printer is not visible in UI.
So if you'll add that backends other staff will work out of the box. So I have configured printer by UI, then copy ppd and printers.conf and create a custom docker image. In my case driver was already installed(splinx)

FROM drpsychick/airprint-bridge:2.3.1-focal
RUN ln -s /usr/lib/cups/backend-available/usb /usr/lib/cups/backend/usb
COPY printers.conf /etc/cups/
COPY Xerox_Phaser_3121.ppd /etc/cups/ppd
RUN chmod 640 /etc/cups/ppd/*
RUN chown root:lp /etc/cups/ppd/*

@sunmeplz
Copy link

Useful commands:
lsusb - print usb devices, you can find you prinnter there and catch bus num and device num
your usb device would be here: /dev/bus/usb/bus_num/device_num you can plug it info docker with that path but I found that device num was changed after printer power off-on, so I'm using /dev/usb/lp0 which is static, I think.

@DrPsychick
Copy link
Collaborator Author

Perfect, thanks @sunmeplz. I'll put together a doc for it.

@FrancYescO
Copy link

in my case adding --device /dev/bus --device /dev/usb -v /var/run/dbus:/var/run/dbus (sincerely idk if all of these are needed) to the docker run command was enought to find and setup the usb printer attached to my orangepi4 from the webinterface

@DrPsychick
Copy link
Collaborator Author

As it seems @sunmeplz and @FrancYescO you both succeeded with a USB printer setup. Would you be willing to submit a PR with a short description/guide in USB.md linked in the README.md?

@FrancYescO
Copy link

I don't think a separate USB.md file is needed, expecially because your README is pretty verbose (in my opinion all things that requires a fully rebuild of the container should be removed and guide the user to use volumes/some env variable), probably a few lines added are enought to describe how to add an USB printer I'll try to do a PR after a little more testing ;)

@NeoMod
Copy link

NeoMod commented Sep 11, 2021

I know this is almost a solved issue, but since I found this docker image very useful I wanted to share my experience with a USB printer.

In my setup, Docker is running on a VM under ESXI; the printer is physically attached to the server and mounted to the same VM as Docker.

Once I started the container, I then used the official "Driver Install Package" for my printer (Brother) via console to install the drivers and configure the printer as a "local USB Printer".

Doing so, CUPS was able to automatically detect the aforementioned printer: in fact, it was already installed, I had to just tweak a few options and it was ready to print.

Probably this is one of those "happy case scenarios" where everything went smooth by sheer luck. Although - maybe- it's worth mentioning as a possible "Easy Step" for those dealing for the first time with CUPS and not familiar with CLI commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants