<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: cups queue issue in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620865#M19509</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One possible solution is to create a script like this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;cat &amp;gt; /tmp/printjob.$$&lt;BR /&gt;lpr -P printer1 /tmp/printjob.$$&lt;BR /&gt;lpr -P printer2 /tmp/printjob.$$&lt;BR /&gt;rm /tmp/printjob.$$&lt;BR /&gt;&lt;BR /&gt;then create an entry in the /etc/services:&lt;BR /&gt;&lt;BR /&gt;dualprinter   9101/tcp&lt;BR /&gt;(replace 9101 with a port you want)&lt;BR /&gt;&lt;BR /&gt;then create in /etc/xinet.d the dualprinter description:&lt;BR /&gt;&lt;BR /&gt;service dualprinter&lt;BR /&gt;{&lt;BR /&gt;        disable = no&lt;BR /&gt;        socket_type     = stream&lt;BR /&gt;        wait            = no&lt;BR /&gt;# choose a user to run&lt;BR /&gt;        user            = USER&lt;BR /&gt;# replace with the path to the previous script&lt;BR /&gt;        server          = PATH_TO_SCRIPT&lt;BR /&gt;        log_on_failure  += USERID&lt;BR /&gt;        log_on_success  += USERID&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Now configure a new queue as a jetdirect queue on localhost ip address and the port you have choosen. You can use this also from other systems (linux and non linux).&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
    <pubDate>Wed, 07 Sep 2005 13:26:46 GMT</pubDate>
    <dc:creator>Bojan Nemec</dc:creator>
    <dc:date>2005-09-07T13:26:46Z</dc:date>
    <item>
      <title>cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620864#M19508</link>
      <description>I need to come up with a mechanism for setting up a print queue that will accept a job and send it to two different printers at the same time.&lt;BR /&gt;&lt;BR /&gt;Is this possible?&lt;BR /&gt;&lt;BR /&gt;I am using RHEL 3.0 ES</description>
      <pubDate>Wed, 07 Sep 2005 11:00:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620864#M19508</guid>
      <dc:creator>Unix Administrator_5</dc:creator>
      <dc:date>2005-09-07T11:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620865#M19509</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One possible solution is to create a script like this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;cat &amp;gt; /tmp/printjob.$$&lt;BR /&gt;lpr -P printer1 /tmp/printjob.$$&lt;BR /&gt;lpr -P printer2 /tmp/printjob.$$&lt;BR /&gt;rm /tmp/printjob.$$&lt;BR /&gt;&lt;BR /&gt;then create an entry in the /etc/services:&lt;BR /&gt;&lt;BR /&gt;dualprinter   9101/tcp&lt;BR /&gt;(replace 9101 with a port you want)&lt;BR /&gt;&lt;BR /&gt;then create in /etc/xinet.d the dualprinter description:&lt;BR /&gt;&lt;BR /&gt;service dualprinter&lt;BR /&gt;{&lt;BR /&gt;        disable = no&lt;BR /&gt;        socket_type     = stream&lt;BR /&gt;        wait            = no&lt;BR /&gt;# choose a user to run&lt;BR /&gt;        user            = USER&lt;BR /&gt;# replace with the path to the previous script&lt;BR /&gt;        server          = PATH_TO_SCRIPT&lt;BR /&gt;        log_on_failure  += USERID&lt;BR /&gt;        log_on_success  += USERID&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Now configure a new queue as a jetdirect queue on localhost ip address and the port you have choosen. You can use this also from other systems (linux and non linux).&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Wed, 07 Sep 2005 13:26:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620865#M19509</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-09-07T13:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620866#M19510</link>
      <description>Sorry I forgot,&lt;BR /&gt;&lt;BR /&gt;You must restart xinetd to start the service:&lt;BR /&gt;service xinetd restart&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Wed, 07 Sep 2005 13:29:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620866#M19510</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-09-07T13:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620867#M19511</link>
      <description>I am not sure I am following what this is doing.  Could you explain it a bit more for me?</description>
      <pubDate>Wed, 07 Sep 2005 13:40:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620867#M19511</guid>
      <dc:creator>Unix Administrator_5</dc:creator>
      <dc:date>2005-09-07T13:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620868#M19512</link>
      <description>I will try to explain.&lt;BR /&gt;&lt;BR /&gt;xinetd is a server program which waits on the configured ports. When a connection is made to a specific port forks and runs the specified program (or script) substituting its stdin and stdout with the socket.&lt;BR /&gt;The entry in /etc/services and the file in /etc/xinet.d are need to instruct the xinetd to wait on the specified port.&lt;BR /&gt;&lt;BR /&gt;The so called jetdirect mode of printing is nothing other than a raw tcpip socket. When you have a printer server or a network enabled printer printing consist in formating data for the printer and sending this data to this socket. If you have such a printer you can try with: telnet PRINTER_ADDRESS PORT where PRINTER_ADDRESS is the printer TCPIP host name or address and PORT is the port number (in most cases 9100) then type something and terminate with &lt;CTRL&gt; (form feed) to eject the page. You will see that the printer will print that you have typed. (use &lt;CTRL&gt; and quit to exit from telnet).&lt;BR /&gt;&lt;BR /&gt;When you enable the service you create a listening port on yours machine (You can try the previous telnet with telnet localhost 9101).&lt;BR /&gt;&lt;BR /&gt;The script does nothing other than copy the whole print job in a temporary file on the tmp directory (/tmp/printjob.$$ where $$ is the pid of the current job).&lt;BR /&gt;When this file is saved it is printed to printer1 and printer2.&lt;BR /&gt;You should configure each printer in cups and substitute printer1 and printer2 in the script with the names of yours real queues. You should also configure one queue which will print to the virtual printer.&lt;BR /&gt;&lt;BR /&gt;One drawback is that the printers must be of same type.&lt;BR /&gt;&lt;BR /&gt;As I say this is one possible solution. Maybe someone other will give you a better solution.&lt;BR /&gt;&lt;BR /&gt;Bojan&lt;/CTRL&gt;&lt;/CTRL&gt;</description>
      <pubDate>Wed, 07 Sep 2005 14:15:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620868#M19512</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-09-07T14:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620869#M19513</link>
      <description>Seems like a creative way to attack this problem; however, I have to have something that doe the following&lt;BR /&gt;&lt;BR /&gt;lp -dprinter file_to_print&lt;BR /&gt;&lt;BR /&gt;This must go to two different printers at the same time.  Unfortunately the application uses that mechanism.&lt;BR /&gt;&lt;BR /&gt;I am not sure I'll be able to use you suggestion with this constraint.&lt;BR /&gt;&lt;BR /&gt;However, I very much appreciate this.</description>
      <pubDate>Wed, 07 Sep 2005 14:20:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620869#M19513</guid>
      <dc:creator>Unix Administrator_5</dc:creator>
      <dc:date>2005-09-07T14:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620870#M19514</link>
      <description>More explanations:&lt;BR /&gt;&lt;BR /&gt;First&lt;BR /&gt;You have to create 2 queues in cups. One for each physical printer. Say that the names are printer1 and printer2.&lt;BR /&gt;&lt;BR /&gt;Now you can print to the printers with:&lt;BR /&gt;&lt;BR /&gt;lp -dprinter1 file_to_print&lt;BR /&gt;lp -dprinter2 file_to_print&lt;BR /&gt;&lt;BR /&gt;Second&lt;BR /&gt;You create the xinetd service which will act as a printer (cups will not notice that this is not a physical printer). And you create a queue in that points to this virtual printer say that the name is printer as you mentioned.&lt;BR /&gt;&lt;BR /&gt;Now when you print to this printer with:&lt;BR /&gt;&lt;BR /&gt;lp -dprinter file_to_print&lt;BR /&gt;&lt;BR /&gt;cups will transfer the file to the script which can be (to be more explanatory):&lt;BR /&gt;&lt;BR /&gt;cat &amp;gt; file_to_print&lt;BR /&gt;lp -dprinter1 file_to_print&lt;BR /&gt;lp -dprinter2 file_to_print&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In my script I substituted file_to_print with /tmp/printjob.$$ to have a unique name.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Wed, 07 Sep 2005 14:44:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620870#M19514</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-09-07T14:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620871#M19515</link>
      <description>thanks, i'm gonna give this a try and post the results.</description>
      <pubDate>Wed, 07 Sep 2005 14:53:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620871#M19515</guid>
      <dc:creator>Unix Administrator_5</dc:creator>
      <dc:date>2005-09-07T14:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620872#M19516</link>
      <description>I think that the easy way is to use printer classes. Use your web browser and in the Linux Server connect to localhost:361. You will get the cups administration web page. See the online documentation for further reference about printer classes.</description>
      <pubDate>Wed, 07 Sep 2005 14:54:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620872#M19516</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-09-07T14:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620873#M19517</link>
      <description>I was under the impression that printer classes still only printed to one printer</description>
      <pubDate>Wed, 07 Sep 2005 15:12:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620873#M19517</guid>
      <dc:creator>Unix Administrator_5</dc:creator>
      <dc:date>2005-09-07T15:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: cups queue issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620874#M19518</link>
      <description>My impression was the same so I checked. On my home system RedHat 9.0 the job is printed only on one printer (tested with two virtual printers which copy the contents to a temporary file).&lt;BR /&gt;&lt;BR /&gt;Within this testing I have a ne Idea abbout the virtual printer. Configure the printer as a postscript/Generic postcript printer. This will translate the printing job in post script and the two other printers will receive postscript data as input. So the printers can be of different type and cups will translate postscript to the right printer language which depends on the printer.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Wed, 07 Sep 2005 15:56:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cups-queue-issue/m-p/3620874#M19518</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-09-07T15:56:42Z</dc:date>
    </item>
  </channel>
</rss>

