Sponsored Content
Full Discussion: How to modify /etc/printcap?
Operating Systems Linux Red Hat How to modify /etc/printcap? Post 302659697 by nick-genisys on Thursday 21st of June 2012 11:21:17 AM
Old 06-21-2012
How to modify /etc/printcap?

I put this on the CentOS forums yesterday and it's been read 80 times, but no response..........I hope I'm not too impatient.

Hello,
I am trying to set up a 3 port HP Jetdirect 300x box. I have done the following:

Added jetdirect to host file with IP address.
Created 3 printers with lpadmin (one for each port).

Now I'm stuck. In SCO UNIX, you can just modify the rm variable in the /etc/printcap file to route print jobs to the hostname, however with CentOS, I cannot change that file because it will be overwritten by cupsd and the /etc/cups/printers.conf file doesn't have the rm variable there. Where can I make this change permanent? I did try lpoptions and it created an lpoptions file in /etc/cups with the variable that I added, I don't know that this is what I want to do, unless it somehow is read at the time a print job is sent I don't think it will work.


I did find that I could shut down cupsd and remove the startup script from /etc/rc5.d, which would then stop /etc/printcap from being overwritten, but this is going to cause problems because cups won't be running and then nothing will print.

Any help would be appreciated, I have checked Red Hat docs, CentOS, Googled, etc and all I can seem to find is how to do this via GUI interface, not command line. I've seen where it clearly says that you "cannot edit /etc/printcap", but not where it says what to edit to change the rm variable.

Thanks,
Nick


---------- Post updated at 10:21 AM ---------- Previous update was at 09:19 AM ----------

Apparently there is no easy way to modify /etc/printcap to change the rm variable.

An associate of mine found something on an old forum that might work for the Jet Direct 300x...............the first printer on the box will be port 9100 and subsequent printers are on port 9101 & 9102.
So,
lpadmin -p testprinter1 -vsocket://192.168.10.10:9100 -E
lpadmin -p testprinter2 -vsocket://192.168.10.10:9101 -E
lpadmin -p testprinter3 -vsocket://192.168.10.10:9102 -E

I will have to test to confirm if this works.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help to modify my script

Hi, I have a script which connect to ATM's and pull two files from the ATM. The which i try to pull is like PIC20085200001*.JPG First 7 digit consist of year montn and date as well After todays execution i want to change the date to next date I add few lines in the script but it is not... (6 Replies)
Discussion started by: Renjesh
6 Replies

2. Shell Programming and Scripting

How to modify the variable

I have a directory name stored in a variable. Does anyone have a piece of code which checks if this stored directory name ends up with the "/" and if it is missing adds it to the same variable. for example I might have A=/bb/data or A=/bb/data/ which needs to be A=/bb/data/ for sure thanks... (5 Replies)
Discussion started by: aoussenko
5 Replies

3. Shell Programming and Scripting

Modify a file

Hi all Can anyone suggest me a good solution ? My requirement is as follows I have a plain text file similar to this... sending data to 0003345234 here is the output... ,.......... ........... ....... sending data to 00033452ab here is the output... ,.......... ........... .... (5 Replies)
Discussion started by: ./hari.sh
5 Replies

4. UNIX for Dummies Questions & Answers

printcap printer -> email account script/filter help

the basics: Tru64 unix 5.1b on alpha have nail(now mailx), mail, and mailx(old version) available. I'm trying to make a print filter to take a file that is printed to a specific printer in my printcap file and email it. I put this in my printcap: emailprinter:\ ... (0 Replies)
Discussion started by: syadnom
0 Replies

5. UNIX for Dummies Questions & Answers

Modify Path

Hi, This is certainly a simple question, but I have yet to receive sufficient info concerning it. I am using BASH on a Powerbook G4 running Leopard. - I would like to permanently add a directory to my path. How do I do this? - I understand that I can view my path by: echo $PATH. Is there a... (4 Replies)
Discussion started by: msb65
4 Replies

6. UNIX for Dummies Questions & Answers

Help with LPRng Print Spooler and Printcap file

Im fairly new to unix printing and printcap files, but have been given the task of administering the print functions of a server, and I have a specific question. We use a 3rd party pay-to-print system which references our server that hosts the print queues and printcap file for about 15 queues.... (0 Replies)
Discussion started by: Choach
0 Replies

7. Shell Programming and Scripting

modify first column

Hi, I am use to using awk and sed. This time I have a file that has multiple columns. It looks like this: 4 6 7 8 5 4 3 2 3 2 6 9 I want to add chr to column 1 only so it looks like this: chr4 6 7 8 chr5 4 3 2 chr3 2 6 9 The file is tab seperated. Thanks ... (5 Replies)
Discussion started by: phil_heath
5 Replies

8. Shell Programming and Scripting

Modify file

Hi, I have a file that looks like this: 27+:<10,289808,1> 31+:<11,1445372,1> 33-:<7,1014101,2> 35+:<11,728811,1> 36-:<11,1445205,0> 37+:<11,1445792,2> and I want to change it to this: + 10 289808 + 11 1445372 - 7 1014101 + 11 728811 - 11 1445205 + 11 1445792 (3 Replies)
Discussion started by: kylle345
3 Replies

9. Shell Programming and Scripting

Please modify solution

Hi Please check my code,here awk -vLIT="$line" '$0 ~ LIT { print LIT,"Found in ",FILENAME; }' $f it is not checking for small alphabets.can u pls modify my code #!/bin/ksh for f in /tmp/satemp/* do cat /tmp/sa/tt.txt| while read line do awk -vLIT="$line" '$0 ~ LIT { print LIT,"Found in... (3 Replies)
Discussion started by: coolboy98699
3 Replies

10. Shell Programming and Scripting

File modify

Hi All I am getting a file with below pattern - 00150366 05/08/2015 07:14:32 8000186167+++ 50195281000000000371001010903236 800186167+++ 100209000000000 800000018617+++ 50295281000000000371001010900217================================3u4398482344334=432434 00150367 05/08/2015 07:14:32... (7 Replies)
Discussion started by: honey26
7 Replies
la88cof(8)						      System Manager's Manual							la88cof(8)

NAME
la88cof - Filter for the Simplified Chinese LA88 printer SYNOPSIS
/usr/lbin/la88cof [-c] [-h host] [-i indent] [-l length] [-L locale] [-n login] [-w width] [accounting_file] OPTIONS
Prints control characters. Specifies the host name of the job owner. This name can contain Hanzi characters. Specifies the amount of indentation. The default value is no (no indentation). Specifies the page length in lines. The default value is 66. Specifies the printer codeset. This value must be a valid locale name. The default value is zh_CN.dechanzi. Specifies the login name of the job owner. This name can contain Hanzi characters. Specifies the page width in columns. The default value is 132. OPERANDS
Specifies the file to record accounting information. DESCRIPTION
The la88cof filter is used to filter text data for the LA88-C printer. The filter handles the device dependencies of the printer and per- forms accounting functions. At print job completion times, accounting records are written to the file specified by the af field in the /etc/printcap file. The la88cof filter can handle plain text files and files that have been preprocessed by nroff. Either kind of file can contain non-ASCII characters. The filter translates nroff control sequences for underlining, superscripting, and subscripting into the proper control sequences for the LA88-C printer. The la88cof filter can be the specified filter in both the of and the if fields in the /etc/printcap file. For more information on these fields, see printcap(4). The LA88-C printer can be configured to use the software on-demand loading (SoftODL) mechanism to print user-defined characters (UDCs). See i18n_printing(5) for a more detailed description of SoftODL. To enable SoftODL printing, set the ys field in /etc/printcap to 256. You can also set the default SoftODL database, style, and size by including the odldb and odlstyle options in the ya field. If you specify a value for the yt field, use fifo. For more information on these fields, see printcap(4). NOTES
The lpr command supports a number of options and associated arguments to enable localization features supported by various printers. The following can be used with the la88cof print filter: To specify the SoftODL database path To specify SoftODL font style and size For a complete description of the -A option and its arguments, refer to lpr(1). ERRORS
The lf field (default value is /dev/null) in the /etc/printcap file specifies the name of the error log. SEE ALSO
Commands: lpr(1), pr(1), lpd(8), pac(8) Files: printcap(4) Others: i18n_printing(5) la88cof(8)
All times are GMT -4. The time now is 11:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy