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

how to create a backend that can be CUPS recognize? #6195

Closed
tthnu opened this issue Apr 23, 2024 · 2 comments
Closed

how to create a backend that can be CUPS recognize? #6195

tthnu opened this issue Apr 23, 2024 · 2 comments

Comments

@tthnu
Copy link

tthnu commented Apr 23, 2024

I've created a new backend which is based on the cups-pdf but with fewer code , only keeping the main function and triming the code which is used to generate config file.

After compiling using gcc -O9 -s cups-pdf.c -lcups and copying cups-mybackend binary to /usr/lib/cups/backend/, also copying the ppd file to /usr/share/ppd/cups-mybackend, CUPS cannot recognize this new backend.(sudo lpinfo -v has nothing about cups-my-backend and it also couldn't be selected in AddPrinter in WEB .)

So how should I do to let CUPS know this new backend?

@jsmeix
Copy link

jsmeix commented Apr 24, 2024

When you use Linux,
you may have a look here:
https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS

When you use macOS I don't know.
I think in macOS CUPS runs within some kind of "sandbox"
so user-made CUPS backends may not be allowed by default?
But this is only a blind guess.

Current CUPS upstream is no longer here but under
https://github.com/OpenPrinting
at
https://github.com/OpenPrinting/cups

When you use macOS this place here could be still
the right place for CUPS on macOS - I don't know?

@tthnu
Copy link
Author

tthnu commented Apr 25, 2024

When you use Linux, you may have a look here: https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS

When you use macOS I don't know. I think in macOS CUPS runs within some kind of "sandbox" so user-made CUPS backends may not be allowed by default? But this is only a blind guess.

Current CUPS upstream is no longer here but under https://github.com/OpenPrinting at https://github.com/OpenPrinting/cups

When you use macOS this place here could be still the right place for CUPS on macOS - I don't know?

Thanks for your reply!

I've read some manuals you provide and source codes of different backend and found that any new backend MUST report its information through stdout with the form "device_scheme, device_uri, device_make_and_model, device_info, device_id, device_location" or could call cupsBackendReport function instead. CUPS will soon recognize this new backend after reporting operation.

@tthnu tthnu closed this as completed Apr 25, 2024
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