- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- cups queue issue
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 04:00 AM
09-07-2005 04:00 AM
Is this possible?
I am using RHEL 3.0 ES
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 06:26 AM
09-07-2005 06:26 AM
Re: cups queue issue
One possible solution is to create a script like this:
#!/bin/bash
cat > /tmp/printjob.$$
lpr -P printer1 /tmp/printjob.$$
lpr -P printer2 /tmp/printjob.$$
rm /tmp/printjob.$$
then create an entry in the /etc/services:
dualprinter 9101/tcp
(replace 9101 with a port you want)
then create in /etc/xinet.d the dualprinter description:
service dualprinter
{
disable = no
socket_type = stream
wait = no
# choose a user to run
user = USER
# replace with the path to the previous script
server = PATH_TO_SCRIPT
log_on_failure += USERID
log_on_success += USERID
}
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).
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 06:29 AM
09-07-2005 06:29 AM
Re: cups queue issue
You must restart xinetd to start the service:
service xinetd restart
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 06:40 AM
09-07-2005 06:40 AM
Re: cups queue issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 07:15 AM
09-07-2005 07:15 AM
Re: cups queue issue
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.
The entry in /etc/services and the file in /etc/xinet.d are need to instruct the xinetd to wait on the specified port.
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
When you enable the service you create a listening port on yours machine (You can try the previous telnet with telnet localhost 9101).
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).
When this file is saved it is printed to printer1 and printer2.
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.
One drawback is that the printers must be of same type.
As I say this is one possible solution. Maybe someone other will give you a better solution.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 07:20 AM
09-07-2005 07:20 AM
Re: cups queue issue
lp -dprinter file_to_print
This must go to two different printers at the same time. Unfortunately the application uses that mechanism.
I am not sure I'll be able to use you suggestion with this constraint.
However, I very much appreciate this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 07:44 AM
09-07-2005 07:44 AM
SolutionFirst
You have to create 2 queues in cups. One for each physical printer. Say that the names are printer1 and printer2.
Now you can print to the printers with:
lp -dprinter1 file_to_print
lp -dprinter2 file_to_print
Second
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.
Now when you print to this printer with:
lp -dprinter file_to_print
cups will transfer the file to the script which can be (to be more explanatory):
cat > file_to_print
lp -dprinter1 file_to_print
lp -dprinter2 file_to_print
In my script I substituted file_to_print with /tmp/printjob.$$ to have a unique name.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 07:53 AM
09-07-2005 07:53 AM
Re: cups queue issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 07:54 AM
09-07-2005 07:54 AM
Re: cups queue issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 08:12 AM
09-07-2005 08:12 AM
Re: cups queue issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 08:56 AM
09-07-2005 08:56 AM
Re: cups queue issue
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.
Bojan