Unable to talk to CUPS #3
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Alfredolin/WebPrint#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So, here it goes my compose file:
i am using rootless podman and i have "cups" running on the server machine (the /run/cups...) with one printer configured and working (and shared via network as well).
Inside webprint, i see no printer and cups sync is successfull, but no printer.
This should be a common use case. I'll look into that. Glad you haven't given up yet.
I can not replicate that one :/
I tried with os installed cups, UID/GID 1000 (not cups, which would be lp or root respectively with uid 7 or 0), binding the volumes as you did and it discovers the printers fine. Btw for me cups.sock has read/write permissions for all users: 666.
how do i see or enable more logging?
I will have to code them. In the mean time can you check what permissions are set for /run/cups/cups.sock? I'm not sure how to handle this.
Actually, I could somewhat reproduce. If the /run/cups/cups.sock has permissions srw-rw---- and is owned e.g. root:lp or lp:root and your docker's uid/gid is not 0 or 7 (root or lp), it's not gonna work.
So either add read/write permissions to others
sudo chmod 666 /run/cups/cups.sockor run your container as lp if you want to avoid root (assuming lp is uid or gid owner, which could also be set).Currently the writing is only used for setting the printer location and it's still buggy so actually read-only permission would be sufficient.
I did not find how to change the owners/permissions from the cups config yet. If someone knows, I'm all ears.
I think I found a solution. We will add a variable with the group id of
lp(cups user) and add it to the container's GID. This change should not need a rebuild, it will flow in the next release. I will also add more logs in case of errors, which are currently (v1.0.2) silenced.Ok, we should now be able to read the socket by adding the right LP_GID in the .env! Can you pull latest (v1.0.3) and retest?
Ok, i had my cups misconfigured. The local unix socket was disabled. After enabling it i can see the printer in WebPrint! Huge step forward!
(i added my "webprint" user to lp group and checked that it could print first, then LP_GID=7 in docker-compose, and bang, it see the printer in the web gui!)
but i doesnt print anything. In the logs i only see:
but that's the same for almost all requests. It seems that CUPS does not receive the job at all, nothing in the logs
Sorry to ask, but are you sure that you pulled the image from latest? There should be more going on in the logs during the printing job.I could reproduce! Working on it.
One question to confirm I am on the right track, what filetype were you trying to print?
Release v1.0.4 (latest) should now solve that. I mean, you will probably get an error because your printer rejects the job, but it won't stay stuck and should give the info in the logs.
pulled latest image... Now it prints! Great work!