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

printing-app support #143

Open
Fuseteam opened this issue Apr 24, 2021 · 6 comments
Open

printing-app support #143

Fuseteam opened this issue Apr 24, 2021 · 6 comments

Comments

@Fuseteam
Copy link

Fuseteam commented Apr 24, 2021

appearently there is a printer app for nextcloud
based on https://github.com/e-alfred/nextcloud-printer we would need to add a couple of packages to support it
while adding the packages should be easy it's not clear to me is how the cups service should be started for it to work with univention

@Fuseteam
Copy link
Author

i think this is the relevant part

Docker

You need a CUPS server with a shared IPP printer running within your local network. To use the plugin within a docker instance the docker image has to be altered to install the packages cups-client, cups-daemon and cups-bsd. The CUPS service has to be started and a default printer setup when the container is starting up. This is achieved by adding a startup script which is executed before the base image of the container is run. The following two examples show you how this can be done for the nextcloud:fpm docker image.

Example Dockerfile: myNextcloud

FROM        nextcloud:fpm
ADD         myNextcloud.sh /
RUN         apt-get update && apt-get install -y cups-client cups-daemon cups-bsd && chmod +x /myNextcloud.sh
ENTRYPOINT  ["/myNextcloud.sh"]
CMD         ["php-fpm"]

Example startscript: myNextcloud.sh

#!/usr/bin/env sh
service cups start
# Replace the placeholders $ip$ and $printer_name$ accordingly to your setup 
lpadmin -p HP_M281_docker -E -v ipp://$ip$:631/printers/$printer_name$ -m everywhere
lpoptions -d HP_M281_docker
sh /entrypoint.sh "$@"

the main problem would be how do we make the $ip$ and $printer_name$ configurable

@blizzz
Copy link
Member

blizzz commented Jul 3, 2023

I don't see this happening out-of-the-box, assuming being a niche use case and having another services bundled and running. I am open for suggestions to have this opt-in by admin configuration, outside of the base image.

@Fuseteam
Copy link
Author

i don't quite see how printing from nextcloud is a niche usecase, but if opt-in is possible, that would be good compromise

@Fuseteam
Copy link
Author

that said, iirc it will need those packages installed in the container and the printer service has to be started and the default printer has to be setup when the container starts, not sure how much of that is feasible outside the base image

@blizzz
Copy link
Member

blizzz commented Jul 26, 2023

Also cf. #69 (comment) and following.

@Fuseteam
Copy link
Author

Looks good yeah in that case we'll only need a way to start the cups service and to configure the actual printer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants