- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: network printers and device files
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
08-01-2001 05:41 AM
08-01-2001 05:41 AM
A third party application needs a device file for selection of an output device ie /dev/ttyxxx etc. How can I select my printer ?. Does it have a device file or is this handled by the LP spooler ?
Example of lpstat command is :
/#lpstat -t
scheduler is running
system default destination: hp4050
device for hp4050: /dev/null
hp4050 accepting requests since Jul 26 10:38
printer hp4050 is idle. enabled since Jul 26 10:38
fence priority : 0
no entries
Why does device show as /dev/null ? I have looked into using lpadmin to specify a device file but this assumes that one exists already.
Any help much appreciated.
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 05:57 AM
08-01-2001 05:57 AM
SolutionI'm not too sure if this has answered your question? I think it is related the contents of /var/spool/lp/member/
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 05:59 AM
08-01-2001 05:59 AM
Re: network printers and device files
Essentially /dev/null is a null file used for many purposes . One of them is the netwrok printers where in since we have to specify a device for a printer the same is done as /dev/null , but in realtiy it is never used since the hpnp dameon takes over.
In your application you will have to either one of the following :
1. Pipe the output to lp -d < printer name> or lp in case this is a default printer.
2. Or define in the env of the user that lp is lp -d .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 06:04 AM
08-01-2001 06:04 AM
Re: network printers and device files
System communicates with the printers through files called device files. HP-UX treats I/O to a printer in the same manner as I/O to a file. In your case, you set up your printer as a network printer, that is why you see the device file is /dev/null. About /dev/ttyxxx, it is for serial devices, i.e. terminal, modem or serial printer.
I am wondering why your third party application only can be send out to a serial device, so try to send it out to a network printer instead, otherwise, probably you have to find another serial printer for your third party application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 08:05 AM
08-01-2001 08:05 AM
Re: network printers and device files
Sounds like your vendor is doing some very low level coding. I have a similar application (FileNet software) that runs very low level code...it's created some 'challeneges' for me.
As the others mentioned....to this printer your probably not going to hit a /dev file. My guess is that whatever he is running...he is probably using TCP, RPC and API protocols.
My guess is that he would need to set up a print server between the UNIX box and the printer....set this print server up in your hosts file...than direct your print jobs to that print server. You would need this, since if it's low level code, you may need to have your print server interface to format the output properly...
Just a thought, may help you...may not, like I said just a thought,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 10:11 AM
08-01-2001 10:11 AM
Re: network printers and device files
One way you could make this work is via a named pipe.
mknod p /dev/myprinter
chmod 666 /dev/myprinter
then
create a small script, e.g. myprinter.sh
#!/usr/bin/sh
while [ 1 -lt 2 ]
do
lp -dmyprinter < /dev/myprinter > /dev/null 2>&1
done
exit 0
Next execute myprinter.sh
You should then be able to direct the output
of your program to /dev/myprinter.
Clay