[cups.general] list of cups servers and queues

Steve Smith steve at gdesigns.co.uk
Tue Dec 15 06:13:04 PST 2009


> I have a CUPS environment with multiple servers.  Can someone tell the
> command I can use to get a list of the server names and their queues.  I
can see the different servers in the Web interface but need a list of
> servers/queues in a terminal window so the info can be used in another
> application we are working on.

The command listed below is from one of the handy script examples included
with PrinterSetup <http://www.lucidsystems.org/printingworks/printersetup>

lpstat -p 2> /dev/null | cut -d' ' -f2 | grep -v -e "@" 

The above command will provide a list of print queues configured on the
local system. I think this solves part of your problem.

This helped but what I badly need is a list of CUPS servers and the queues
on each of them.

Steve Smith - GEO Designs Limited
 


-----Original Message-----
From: cups-bounces at easysw.com [mailto:cups-bounces at easysw.com] On Behalf Of
cups-request at easysw.com
Sent: 11 December 2009 20:00
To: cups at easysw.com
Subject: cups Digest, Vol 71, Issue 15

Send cups mailing list submissions to
	cups at easysw.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.easysw.com/mailman/listinfo/cups
or, via email, send a message with subject or body 'help' to
	cups-request at easysw.com

You can reach the person managing the list at
	cups-owner at easysw.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of cups digest..."


Today's Topics:

   1. Re: landscape printing problem (Helge Blischke)
   2. Re: list of cups servers and queues (henri)
   3. lexmark z815 (Nomad Demon)
   4. Linux server, Windows Clients, mulitple jobs ignored.
      (eusoj xirdneh)
   5. Re: lexmark z815 (Helge Blischke)
   6. Re: landscape printing problem - addendum (Helge Blischke)
   7. Differentiate when using 2 printers of the same model (arvernus)
   8. How to get media size of current job? (Lu binbin)
   9. Re: How to get media size of current job? (Helge Blischke)
  10. Re: How to get media size of current job? (Michael Sweet)
  11. Re: How to get media size of current job? (Michael Sweet)


----------------------------------------------------------------------

Message: 1
Date: Thu, 10 Dec 2009 12:48:53 -0800
From: Helge Blischke <h.blischke at acm.org>
Subject: Re: [cups.general] landscape printing problem
To: cups at easysw.com
Message-ID: <36416-cups.general at news.easysw.com>
Content-Type: text/plain; charset="us-ascii"

Christoph Litauer wrote:

[...]
> 
> Helge,
> 
> I'm sorry to say that the reason seems to be your pdftops filter ... I
> changed my config to use the original cups pdftops and got the correct
> output. I am using version 1.20.
> 
[...]

Christoph,

further research revealed that this is an issue caused by the Mac OS X 
printing system:
- when printing landscape on Mac OS X, the upper right corner values 
  of the MediaBox are exchanged ageinst the width and height of the
  selected media from the printer's PPD, i.e. the width of the media box
  is greater than the height.
- As CUPS still claims to support PostScript level 1 devices, which lack
  the pagedevice operators, the PostScript generating filter (cgpdftops on
  Mac OS X or pdftops otherwise) instead specifies the page size 
  parameters from the PPD.
- To correct the misplacement of the page content with respect to the
  media, the originating cupsd inserts an appropriate job attribute
  orientation-requested=n (n = 4 or 5).

On systems other than Mac OS X, the primary print job format is PostScript, 
not PDF, thus this problem does not show up.

And, to complete the story, the reason why my pdftops filter retained the 
media box settings for the page size specification was to let us print PDF 
files from whatever source without manually inspecting the files with repect

to the page orientation and page dimensions.

Helge



------------------------------

Message: 2
Date: Fri, 11 Dec 2009 11:15:20 +1300
From: henri <henri at stmargarets.school.nz>
Subject: Re: [cups.general] list of cups servers and queues
To: Mirror of cups.general Newsgroup <cups at easysw.com>
Message-ID:
	<D3821D75-F768-4DCA-B5D7-11180FDC416B at stmargarets.school.nz>
Content-Type: text/plain; charset=us-ascii

> I have a CUPS environment with multiple servers.  Can someone tell the
> command I can use to get a list of the server names and their queues.  I
can see the different servers in the Web interface but need a list of
> servers/queues in a terminal window so the info can be used in another
> application we are working on.

The command listed below is from one of the handy script examples included
with PrinterSetup <http://www.lucidsystems.org/printingworks/printersetup>

lpstat -p 2> /dev/null | cut -d' ' -f2 | grep -v -e "@" 

The above command will provide a list of print queues configured on the
local system. I think this solves part of your problem.






------------------------------

Message: 3
Date: Thu, 10 Dec 2009 14:36:04 -0800
From: Nomad Demon <kl0zet at wp.pl>
Subject: [cups.general] lexmark z815
To: cups at easysw.com
Message-ID: <36418-cups.general at news.easysw.com>

hi, theres many printers in cups support, but cant find lexmark z815, and
installing from sources don't work on 64bit system, is there any chances to
add support for this printer to next cups update?
NomadDemon


------------------------------

Message: 4
Date: Thu, 10 Dec 2009 15:00:17 -0800
From: eusoj xirdneh <xirdneh at gmail.com>
Subject: [cups.general] Linux server, Windows Clients, mulitple jobs
	ignored.
To: cups at easysw.com
Message-ID: <36419-cups.general at news.easysw.com>

Hi there. I have a linux machine with archlinux and the latest kernel also
the altest cups. Im sharing a Samsung ML-1610, using the splix driver, into
a lan with only Windows XP Machines. Before the upgrade to the newest cups
there was no problem now heres whats happening:
Every computer can succesfully print with the Samsung ML-1610 shared, but
when tow or more users sends a print job at the same time, or even if one
print job is half the way processed and another user sends a print job then
one of tow things happens. Either one of the tow print jobs is dismissed, or
none of the print jobs are printed. Some times one print job is printed
incomplete. The thing is that in every log i see it says print job completed
at [some time].
I have found that sending the jobs via IPP is the best thing, cuz then the
printer will either print the job or not print at all. Instead of sometimes
print the job incomplete.

Can anyone help me plz? is it the driver? is it the printer? is it cups? i
dont see any error anywhere. Im seriously cluless here, maybe some of you
guys have some good test to run?.
Thnks in advance...


------------------------------

Message: 5
Date: Fri, 11 Dec 2009 02:21:19 -0800
From: Helge Blischke <h.blischke at acm.org>
Subject: Re: [cups.general] lexmark z815
To: cups at easysw.com
Message-ID: <36420-cups.general at news.easysw.com>
Content-Type: text/plain; charset="us-ascii"

Nomad Demon wrote:

> hi, theres many printers in cups support, but cant find lexmark z815, and
> installing from sources don't work on 64bit system, is there any chances
> to add support for this printer to next cups update? NomadDemon

see
	http://cerqueira.org/sodftware/z810

Helge



------------------------------

Message: 6
Date: Fri, 11 Dec 2009 02:55:13 -0800
From: Helge Blischke <h.blischke at acm.org>
Subject: Re: [cups.general] landscape printing problem - addendum
To: cups at easysw.com
Message-ID: <36421-cups.general at news.easysw.com>
Content-Type: text/plain; charset="us-ascii"

Christoph Litauer wrote:

[...]

Just for fun, I edited one of my printer's PPD to include a specification of

a "landscape oriented" media size (named A4transverse) - and whow! - when I 
selected this media sizein the print dialog, without specifying landscape 
orientation, everything is OK without quiks and whistles.

It is a bit tedious do do such modifications, as the respective 
modifications need to be done in the localization part(s) of the PPD as 
well, at least for the language the Mac OS X is configured to use.

With modifications like this, the alternate pdftops filter can be used with 
printjobs from Mac OS X.

Helge

P.S.: this meets my suspicion on the level 1 compativlity.



------------------------------

Message: 7
Date: Fri, 11 Dec 2009 04:50:46 -0800
From: arvernus <torstentrautwein at gmail.com>
Subject: [cups.general] Differentiate when using 2 printers of the
	same model
To: cups at easysw.com
Message-ID: <36422-cups.general at news.easysw.com>

Hello,

I got the same printer 2 times which I both have plugged in using USB.

The problem is that they have to same device URI, so everything gets printed
on the printer that was plugged in, first.

How can I solve this problem? Can I maybe somehow use the UUID as the device
URI to differentiate the two printers? I'm using CUPS 1.4.1 on Ubuntu Linux.

Thanks
arvernus


------------------------------

Message: 8
Date: Fri, 11 Dec 2009 06:06:34 -0800
From: Lu binbin <lbblscy at trogine.com>
Subject: [cups.general] How to get media size of current job?
To: cups at easysw.com
Message-ID: <36423-cups.general at news.easysw.com>

Hi,
I need to get the media or paper size of current print job in my work.
In RFC 2911, I found there is a media attribute in Job Template Attribute.
So I use pkipplib parse some control file (/var/spool/cups/cxxxxx),there are
only Operation attributes and Job attributes.

How can i get media size of current job? Thanks!


------------------------------

Message: 9
Date: Fri, 11 Dec 2009 07:19:17 -0800
From: Helge Blischke <h.blischke at acm.org>
Subject: Re: [cups.general] How to get media size of current job?
To: cups at easysw.com
Message-ID: <36424-cups.general at news.easysw.com>
Content-Type: text/plain; charset="us-ascii"

Lu binbin wrote:

> Hi,
> I need to get the media or paper size of current print job in my work.
> In RFC 2911, I found there is a media attribute in Job Template Attribute.
> So I use pkipplib parse some control file (/var/spool/cups/cxxxxx),there
> are only Operation attributes and Job attributes.
> 
> How can i get media size of current job? Thanks!

The media is specified by the media attribute, the first (or single) 
component of which is the name denoting the media, e.g. A4, or 
custom.WIDTHxLENGTH (possibly followed by in, cm, or mm if not printer's 
points). In case of the names, you need to know what A4 means, e.g.

Helge



------------------------------

Message: 10
Date: Fri, 11 Dec 2009 08:31:55 -0800
From: Michael Sweet <msweet at apple.com>
Subject: Re: [cups.general] How to get media size of current job?
To: "Mirror of cups.general Newsgroup" <cups at easysw.com>
Message-ID: <9E4190B0-C78E-4773-A61F-CDC9279068CB at apple.com>
Content-Type: text/plain; charset=us-ascii

On Dec 11, 2009, at 6:06 AM, Lu binbin wrote:
> Hi,
> I need to get the media or paper size of current print job in my work.
> In RFC 2911, I found there is a media attribute in Job Template Attribute.
So I use pkipplib parse some control file (/var/spool/cups/cxxxxx),there are
only Operation attributes and Job attributes.
> 
> How can i get media size of current job? Thanks!


Are you doing this from a filter?  If so, the correct way is to combine the
options from argv[5] with the PPD defaults, and then query the current size
using ppdPageSize:

    ppd_file_t *ppd = ppdOpenFile(getenv("PPD"));
    cups_option_t *options = NULL;
    int num_options = cupsParseOptions(argv[5], 0, &options);
    ppd_size_t *size;

    ppdMarkDefaults(ppd);
    cupsMarkOptions(ppd, num_options, options);

    size = ppdPageSize(ppd, NULL);

___________________________________________________
Michael Sweet, Senior Printing System Engineer





------------------------------

Message: 11
Date: Fri, 11 Dec 2009 08:33:13 -0800
From: Michael Sweet <msweet at apple.com>
Subject: Re: [cups.general] How to get media size of current job?
To: "Mirror of cups.general Newsgroup" <cups at easysw.com>
Message-ID: <6E103548-FD43-4FAB-B537-BB4775DEC1F8 at apple.com>
Content-Type: text/plain; charset=us-ascii

On Dec 11, 2009, at 7:19 AM, Helge Blischke wrote:
> Lu binbin wrote:
> 
>> Hi,
>> I need to get the media or paper size of current print job in my work.
>> In RFC 2911, I found there is a media attribute in Job Template
Attribute.
>> So I use pkipplib parse some control file (/var/spool/cups/cxxxxx),there
>> are only Operation attributes and Job attributes.
>> 
>> How can i get media size of current job? Thanks!
> 
> The media is specified by the media attribute, the first (or single) 
> component of which is the name denoting the media, e.g. A4, or 
> custom.WIDTHxLENGTH (possibly followed by in, cm, or mm if not printer's 
> points). In case of the names, you need to know what A4 means, e.g.


Media size can also be specified using the media-col, PageSize, or
PageRegion attributes...

___________________________________________________
Michael Sweet, Senior Printing System Engineer





------------------------------

_______________________________________________
cups mailing list
cups at easysw.com
http://lists.easysw.com/mailman/listinfo/cups


End of cups Digest, Vol 71, Issue 15
************************************






More information about the cups mailing list