[cups] Query queue Location/Description from command-line?

Johannes Meixner jsmeix at suse.de
Fri Mar 31 00:47:24 PDT 2023


Hello,

On 2023-03-30 07:32, Jörg Thümmler wrote:
> Am 29.03.23 um 10:09 schrieb Johannes Meixner:
>> On 2023-03-29 07:37, Jörg Thümmler wrote (excerpts):
>> 
>>> some linuxes (suse e.g.) have their own APIs to manage printers
>> 
>> as far as I know we (i.e. SUSE) don't have such own APIs.
>> 
>> In particular the YaST printer module is basically
>> only a frontend for CUPS command line tools.
>> 
>> 
>>> enable people to maintain printers
>> 
>> In general see the section
>> "Allow printer admin tasks for a normal user"
>> in
>> https://en.opensuse.org/SDB:CUPS_in_a_Nutshell
>> 
>> This article became meanwhile rather old
>> so some specific information could be outdated
>> but the general information should be still true.
> 
> OK, so yast's printer manage tool is no API
> but some kind of wrapper... but lurking into this
> could be even more useful when you want to manage things
> yourself... (I believe sources of yast are open?)...

The YaST sources are at
https://github.com/yast

The YaST printer module sources are at
https://github.com/yast/yast-printer
cf.
----------------------------------------------------
# rpm -qi yast2-printer | grep '^URL'
URL : https://github.com/yast/yast-printer
----------------------------------------------------

The YaST printer module does not implement
to do printer admin tasks as normal user.
The YaST printer module needs to run as 'root'.

The YaST printer module source code is generated
Ruby code which is somewhat readable but sometimes
it is hard to read (because it is generated code).

I would not recommend to deduce what to do from
reverse engineering the YaST printer module.

I recommend to Keep It Simple and Straightforward
and directly use the CUPS command line tools,
see the section
"Command-line Tools"
in
https://en.opensuse.org/SDB:CUPS_in_a_Nutshell


Kind Regards
Johannes Meixner
-- 
SUSE Software Solutions Germany GmbH
Frankenstr. 146 - 90461 Nuernberg - Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
(HRB 36809, AG Nuernberg)


More information about the cups mailing list