- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem on printer interface
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
Discussions
Discussions
Forums
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
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
тАО10-19-2001 06:12 AM
тАО10-19-2001 06:12 AM
Problem on printer interface
Thanks very much for any suggestion.
Colin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2001 06:34 AM
тАО10-19-2001 06:34 AM
Re: Problem on printer interface
Since your interfacxe script works when you execute from the shell, you are very close.
I suspect that your are calling some programs that are not in the PATH when lp runs it. simply place some staements something like this early in in your interface;
PATH=/usr/sbin:/bin:/usr/bin:/usr/local/bin
export PATH
Just make sure that all the utilities called within your interface are covered. The other thing is to make sure that your interface script and anything el;se that it calls is executable by user 'lp'. Your interface should have 755 permissions; owner lp; group bin.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2001 10:03 AM
тАО10-19-2001 10:03 AM
Re: Problem on printer interface
could it be that you use some interactive command (like "stty") somewhere?
That would not work when called from "lp"...
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2001 10:16 AM
тАО10-19-2001 10:16 AM
Re: Problem on printer interface
One more thing that can get is not understanding the argument convention for an iterface file. You must follow it EXACTLY.
0)The interface file in /var/spool/lp/interface must be named the same as your printqueue name.
1) Arg 1 ==> Printer Request ID
2) Arg 2 ==> User (Logname of user who made the lp request)
3) Arg 3 ==> Title (may simply be "")
4) Arg 4 ==> Number of Copies
5) Arg 5 ==> the -o options (all of them are quoted within arg5)
Arg 6, .... full path name(s) of the file(s) to be printed
Note that your interface may want to do something with the first 5 arguments but in must then do a shift 5 to get to the filenames.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2001 12:12 PM
тАО10-19-2001 12:12 PM
Re: Problem on printer interface
Thanks very much for your help.
After reading your replies, I double checked all the points you mentioned. The permission for the virtual printer interface and the programs running in the scripts should all be correct. The interface script is 755 and lp:bin. The programs inside the interface are all 777. The six arguments you mentioned in your last notice are set properly in the interface. Also, full path is being used in the interface to run all program.
I know which program in the interface is causing the problem. That program's permission is also being set to 777 and it's called in full path name. I don't know why it works in the interface when I run the script on shell, but stops and returns error when it's run by the lpsched.
Thanks again for your guys help
Colin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2001 12:24 PM
тАО10-19-2001 12:24 PM
Re: Problem on printer interface
One of the other differences is that TERM is exported in lp and set to the printer-type.
I'm guessing that your external program is doing some curses or stty stuff and that is what is killing you. You might look to see if your command has an argument to specify that
stdin/stdout in not associated with a terminal.
What external command are you running? Is it any sort of remsh?
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2001 12:44 PM
тАО10-19-2001 12:44 PM
Re: Problem on printer interface
I just got the reason. It's a stupid mistake I made. One of the program run in the interface is trying to redirect its stderr to a file which is created already and no write permission to user lp. That's why the whole interface is getting stuck over there. It also explains why I can run the script at shell because I login as root so I am always able to write anything into that file.
Thank you very much for your suggestion and quick responses. I deeply appreciate.
Take care,
Colin