LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2009, 06:25 PM   #1
burkee
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Rep: Reputation: 0
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
 
Old 11-15-2009, 09:31 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by burkee View Post
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 View Post
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 View Post
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
 
Old 11-15-2009, 09:35 PM   #3
burkee
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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...
 
Old 11-15-2009, 11:24 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
have long file list; want to find word matches(package deletion purposes) lxquestions000019 Linux - Newbie 2 07-13-2009 04:28 AM
Wireless driver-linux newbie question dath Linux - Wireless Networking 8 02-12-2006 05:53 PM
Newbie question - what to do with driver rpm file BigHeadOne Linux - Software 2 10-07-2004 07:58 AM
Complete Newbie Question - Tulip Network Driver TaaDow Linux - Newbie 3 08-27-2004 06:29 AM
one newbie question about Alsa driver captainstorm Linux - Newbie 1 10-15-2003 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration