LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 07: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, 10:31 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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, 10: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-16-2009, 12:24 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:28 AM
Wireless driver-linux newbie question dath Linux - Wireless Networking 8 02-12-2006 06:53 PM
Newbie question - what to do with driver rpm file BigHeadOne Linux - Software 2 10-07-2004 08:58 AM
Complete Newbie Question - Tulip Network Driver TaaDow Linux - Newbie 3 08-27-2004 07:29 AM
one newbie question about Alsa driver captainstorm Linux - Newbie 1 10-15-2003 09:29 PM


All times are GMT -5. The time now is 10:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration