How to read the lp job title from a Perl backend script?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well I know it's not right... but what do I need to do, to get it to pass stdin into the output file, named with the job title? It doesn't do anything right now.
Well I know it's not right... but what do I need to do, to get it to pass stdin into the output file, named with the job title? It doesn't do anything right now.
Now, I set up my printer to send the output to /dev/null, because the interface should handle sending the data to the file, right? Or do I need to do something different? Here is my printer definition:
Code:
<Printer TEXT>
Info TEXT
DeviceURI parallel:/dev/null
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
Now, I set up my printer to send the output to /dev/null, because the interface should handle sending the data to the file, right? Or do I need to do something different? Here is my printer definition:
Code:
<Printer TEXT>
Info TEXT
DeviceURI parallel:/dev/null
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
No, the interface doesn't need to handle the destination. It just needs to add the title.
What do I need to have in the interface to pass the title? Where do I define my output title?
I originally had set up a text printer to print to a file, in this case /usr/archives/txtrpts/report.prn
But we discovered that when multiple users tried to print to the same file, their lpr processes would hang. So I'm trying to write something that won't hang because multiple users are trying to write to the same file simultaneously.
I might just go back to the Perl server listening on a socket, at least I could get that to produce some output...
What do I need to have in the interface to pass the title? Where do I define my output title?
I originally had set up a text printer to print to a file, in this case /usr/archives/txtrpts/report.prn
But we discovered that when multiple users tried to print to the same file, their lpr processes would hang. So I'm trying to write something that won't hang because multiple users are trying to write to the same file simultaneously.
I might just go back to the Perl server listening on a socket, at least I could get that to produce some output...
Thanks for your help.
Definitely the direct to file is not suitable for multi-user.
There were other pointers in the comments that might help.
Sure was a lot easier with Sys V interface scripts..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.