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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT PHP
set_color
set_color(1) fish set_color(1)
NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)