LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Newbie question about creating a driver file for printing purposes (https://www.linuxquestions.org/questions/linux-newbie-8/newbie-question-about-creating-a-driver-file-for-printing-purposes-768785/)

burkee 11-12-2009 06:25 PM

Newbie question about creating a driver file for printing purposes
 
Looking to learn something... We have a client with a linux-based accounting system. I've been told that in order to expose a printer to their application, I need to run through several steps that I'm not familiar with (or comfortable just doing)... Couple of initial steps:

1.) I used printconf to build a new printer (redhat)
2.) New printer was called "lpc" and had an alias assigned

First question(s) - I've created both as LPD and as JetDirect (printer is on an IP print server) - I see that when I do this, I can edit a text file in the queue directory to modify the IP address (jetdirect) or I can add the IP (or hostname) to the printcap entry using "rm:hostname". What is the difference/benefit of using an LPD printer versus a JetDirect printer?

3.) Okay, printer created (one of the two methods) and driver assigned through printconf. I run an lp -a and I see the printer, queue status, etc.

Here is the next question. The vendor of the app somehow creates a link between a printer defined in their application and my new linux printer, "lpc". Here is a quote for the step they want me to do next:

*************************************
"login as root, and create a driver file i.e. lpc.drv, it is located in /u2/spool/uv and the file will look like this:

cat - | lp –dLPC
# chmod 777 lpc.drv"
*************************************

What does this do? I was first thinking it piped a null into lp and that somehow -d automatically would create a driver file and append ".drv" to the filename entered. Could that be right?

I understand the last part makes the driver file writable (I think).

The rest of the instructions have to do with adding the printer to their program. I think I'm okay with those...

Thanks in advance!
Eric

Tinkster 11-15-2009 09:31 PM

Quote:

Originally Posted by burkee (Post 3754917)
Looking to learn something... We have a client with a linux-based accounting system. I've been told that in order to expose a printer to their application, I need to run through several steps that I'm not familiar with (or comfortable just doing)... Couple of initial steps:

1.) I used printconf to build a new printer (redhat)
2.) New printer was called "lpc" and had an alias assigned

First question(s) - I've created both as LPD and as JetDirect (printer is on an IP print server) - I see that when I do this, I can edit a text file in the queue directory to modify the IP address (jetdirect) or I can add the IP (or hostname) to the printcap entry using "rm:hostname". What is the difference/benefit of using an LPD printer versus a JetDirect printer?

3.) Okay, printer created (one of the two methods) and driver assigned through printconf. I run an lp -a and I see the printer, queue status, etc.

Here is the next question. The vendor of the app somehow creates a link between a printer defined in their application and my new linux printer, "lpc". Here is a quote for the step they want me to do next:

*************************************
"login as root, and create a driver file i.e. lpc.drv, it is located in /u2/spool/uv and the file will look like this:

cat - | lp –dLPC
# chmod 777 lpc.drv"
*************************************

What does this do? I was first thinking it piped a null into lp and that somehow -d automatically would create a driver file and append ".drv" to the filename entered. Could that be right?

No ... I assume that the file they create is invoked as
a shell script; what it does is to take standard output of what
ever calls it into the printer LPC. Not much of a driver, really.


Quote:

Originally Posted by burkee (Post 3754917)
I understand the last part makes the driver file writable (I think).

It would if it weren't hashed out.


Quote:

Originally Posted by burkee (Post 3754917)
The rest of the instructions have to do with adding the printer to their program. I think I'm okay with those...

Thanks in advance!
Eric

Cheers,
Tink

burkee 11-15-2009 09:35 PM

Thanks Tink...
 
You are correct... After digging a bit more, the "driver file" is nothing more than a script which sends the output to the printer referenced in the original command. Spent about 3 hours on Friday and I think I finally got it... It's driving me nuts, as Linux pretty much let's everything run as a script. Makes it really hard to track back to what's actually happening. As a newbie - this stuff is hard to follow...

Tinkster 11-15-2009 11:24 PM

It can be hard to track some things down, but if you start digging the
stuff it will become easier. So you're all on your way, and this question
is sorted?


Cheers,
Tink


All times are GMT -5. The time now is 02:25 AM.