Kevin.... have you ever seen the CUPS browser based admin tool (I use Mandrake and it is in the Configure options).... it shows all your active printers jobs etc..... you should be able to get whatever info it has somehow I would naively think...

Joseph

Kevin Toppenberg wrote:
I'd like to revisit a topic we discussed awhile ago.

I am to the point in my install scripter that I want
to setup printers.

As a review, we have established the following process

1. Setup the printer on the linux side.
2. In VistA, create a printer defination that writes
the print job out to a file, then passes the info to
linux for printing.

For printing systems on the Linux side, it seems that
there are the following options:
1. lpr -- simple only
2. CUPS -- full featured
3. KDE -- ? a layer above CUPS ??
And these systems can somehow work together.

Now, because I want to make the installation as
painless as possible, I want to have my install script
query the printing system to see what printers are
already installed.  I can then automatically create
VistA difinations for these.  I know how to get info
regarding KDE printers (at least while running Redhat
9 linux).  It's done like this:
-----------------
[EMAIL PROTECTED] root]#
/usr/sbin/redhat-config-printer-tui --Xexport >
printersettings.xml
[EMAIL PROTECTED] root]# cat printersettings.xml
<?xml version="1.0"?>
<adm_context VERSION="0">
  <id NAME="local" SERIAL="1102259265">
    <null/>
    <null/>
    </id>
  <datatree>
    <printconf TYPE="LIST">
      <print_queues TYPE="LIST">
        <Laser ATOMIC="TRUE" TYPE="LIST">
          <alias_list ANONYMOUS="TRUE" TYPE="LIST">
            </alias_list>
          <queue_description TYPE="STRING"
VALUE="Front-Office Laser"/>
          <queue_type TYPE="STRING"
VALUE="JETDIRECT"/>
          <queue_data TYPE="LIST">
            <jetdirect_ip TYPE="STRING"
VALUE="192.168.0.1"/>
            <jetdirect_port TYPE="STRING"
VALUE="9100"/>
            </queue_data>
          <filter_data TYPE="LIST">
            <print_header_page TYPE="BOOL"
VALUE="FALSE"/>
            <flags TYPE="LIST">
              <send_FF TYPE="BOOL" VALUE="FALSE"/>
              <convert_text_to_Postscript TYPE="BOOL"
VALUE="TRUE"/>
              <rerender_Postscript TYPE="BOOL"
VALUE="FALSE"/>
              <assume_data_is_text TYPE="BOOL"
VALUE="FALSE"/>
              <send_EOT TYPE="BOOL" VALUE="FALSE"/>
              </flags>
            <mf_type TYPE="STRING" VALUE="MFOMATIC"/>
            <filter_locale TYPE="STRING" VALUE="C"/>
            <printer_id TYPE="STRING" VALUE="75104"/>
            <gs_driver TYPE="STRING" VALUE="ljet4"/>
            <foomatic_defaults ANONYMOUS="TRUE"
TYPE="LIST">
              </foomatic_defaults>
            </filter_data>
          <filter_type TYPE="STRING"
VALUE="MAGICFILTER"/>
          <jobsheets TYPE="LIST">
            <start TYPE="STRING" VALUE="none"/>
            <end TYPE="STRING" VALUE="none"/>
            </jobsheets>
          <margins TYPE="LIST">
-----------------------

So here is my question:  The above process uses a
"redhat" config file.  Is this unneccesisarily
restrictive?  I.e. if I just used the CUPS system,
then it would work with any linux/unix system.  The
problem is, that I don't know how to get a list of
defined printers out of the CUPS system.  In fact, I
get the idea that CUPS doesn't maintain a list of
printers, it just tries to contact a printer at a
given address when asked to do so.

Any thoughts?

Thanks
Kevin





--- Marc Aylesworth <[EMAIL PROTECTED]>
wrote:


KDE has a HTMl help page for CUPs and some other
stuff.



Thank you,

Marc Aylesworth
Health Specialist Technician
Oneida Indian Nation
223 Genesee Street
Oneida, New York 13421
(315) 829-8909



This electronic transmission is intended only for
the use of the
individual
or entity to which it is addressed and may contain
information that is privileged, confidential or exempt from disclosure
under applicable law.


If the reader of this message is not the intended
recipient, you are
hereby notified that any dissemination, distribution, or
copying of this
communication
is strictly prohibited. You are also requested to
please notify the
sender immediately by e-mail and delete the original
message.


-----Original Message-----
From: [EMAIL PROTECTED]


[mailto:[EMAIL PROTECTED]

On Behalf Of Kevin
Toppenberg
Sent: Monday, November 15, 2004 6:24 PM
To: [EMAIL PROTECTED]
Subject: RE: [Hardhats-members] Printers... An
overview please.

Marc,

This is wonderful.  Were did you get this
documentation?  I have just
looked at the man pages, and it doesn't give me
quite enough
information.

Thanks!!!
Kevin

--- Marc Aylesworth <[EMAIL PROTECTED]>
wrote:


Cups can also connect networked printers here are

some examples from


the help files.



Adding Your First Printer from the Command-Line



Run the lpadmin command with the -p option to add

a printer to CUPS:


/usr/sbin/lpadmin -p printer -E -v device -m ppd

ENTER



For a HP DeskJet printer connected to the parallel

port this would


look
like:


/usr/sbin/lpadmin -p DeskJet -E -v

parallel:/dev/lp1 -m deskjet.ppd


ENTER



Similarly, a HP LaserJet printer using a JetDirect

network interface


at IP address 11.22.33.44 would be added with the
command:


/usr/sbin/lpadmin -p LaserJet -E -v socket://11.22.33.44 -m laserjet.ppd ENTER



As you can see, deskjet.ppd and laserjet.ppd are

the PPD files for the


HP DeskJet and HP LaserJet drivers included with

CUPS. You'll find a


complete list of PPD files and the printers they

will work with in


Appendix C, "Printer Drivers".



For a dot matrix printer connected to the serial

port this would might


look like:


/usr/sbin/lpadmin -p DotMatrix -E -m epson9.ppd \ -v


serial:/dev/ttyS0?baud=9600+size=8+parity=none+flow=soft

ENTER



Here you specify the serial port (e.g. S0,S1, d0,

d1), baud rate (e.g.

9600, 19200, 38400, 115200, etc.), number of bits,

parity, and flow


control. If you do not need flow control, delete

the "+flow=soft"

portion.


Thank you,

Marc Aylesworth
Health Specialist Technician
Oneida Indian Nation
223 Genesee Street
Oneida, New York 13421
(315) 829-8909



This electronic transmission is intended only for

the use of the


individual or entity to which it is addressed and

may contain


information that is privileged, confidential or

exempt from disclosure


under applicable law.

If the reader of this message is not the intended

recipient, you are


hereby notified that any dissemination,

distribution, or copying of


this communication is strictly prohibited. You

are also requested to


please notify the sender immediately by e-mail and

delete the original


message.

-----Original Message-----
From: [EMAIL PROTECTED]


[mailto:[EMAIL PROTECTED]

On Behalf Of Kevin
Toppenberg
Sent: Monday, November 15, 2004 1:38 PM
To: [EMAIL PROTECTED]
Subject: RE: [Hardhats-members] Printers... An

overview please.

Marc,

Thanks for writing.

I will be trying to print from linux to an hp

jetdirect print server.


I think CUPS serves a printer attached to a local

box to others on the


network.
This is backwards from what I need.

In AIX, I have been able to set up the print que's

to connect with


jetdirect servers. I just need to do the same for

linux now.

Thanks
Kevin


=== message truncated ===




__________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members


.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to