Its been a while that I work in a unix environment.
I want to create a text file in pico or vi (just a test page). Whats
the command for me to use to print that test page if my device is
called lp_printer1?
I would like to use this to troubleshot comunnications of serial
printers and such.
Btw, this is SCO Unix 5.
Thanks,
Tony
Hmm, assuming "Unix 5" means it has some System V influence, try:
lp -d lp_printer1 testpage
If there's any BSD in the lineage try
lpr -Plp_printer1 testpage
At any rate, try "man lp" and "man lpr"
Ted
Try 'man lpr'.
--
Saludos,
Ángel
Thanks for replying.
Do I have to specify where the drivers/printers path?
Thanks,
Tony
Not if you know the name of the printer or printqueue, which you seem
to. man lp, or man lpr, and read the examples in the one which is
appropriate to your SCO box.
Usually with a test page you want to send it directly to the printer
not through the queueing system. Doing that is consistant with
trying to troubleshot the serial line rather than the software. Note
that you better put a form feed as the last character of your text
file if you're not using the print spooler to do that for you.
Then something like "nohup cat text.txt > /dev/lp_printer1 &".
You want to run it in background and have it hang out while
you're thinking, whence the nohup and &. You want to avoid the
spooler, whence the cat. (If this assumption is wrong see the
other message in the thread not this one.
The trouble is the serial line likely isn't named /dev/lp_printer1.
Maybe "lpstat -t" will tell you the device name for the queue?
Problem is that queue isn't necessarily pointed to the correct
device. Look around in /dev/ for *tty* *cu* and such.
>From HP Network Print Manager you get a menu of choices, #5 is Verify
network printer operation. All you need to know is the name or IP
address of the printer. It then lets you send a test file, a
PostScript file or a HP-GL/2 file to the printer. One of them is a
picture of a jet.
If it is a local printer off the parallel port then creating a file and
using the lp commands will test it, you can also redirect data to the
port, but that is just a way of troubleshooting problems with it.
By default any print errors are sent to the mail of the user sending
the print job.
Also, typing:
lpstat -t
Gives you a nice breakdown of your printers and their status as well as
any pending print jobs etc.
That should help get you into the swing of things.
Have fun!
Tony
You know alot of about printing. I recalled working with HP Print
Manager a while back too when you mention #5 (Verify)-hehe.
Anyways, is it possible to set up a laser printer through Unix and have
it print color. I am haven't seen the system, but an uncle asked me
that with not too much facts.
Thanks,
Tony
Also, can you elaborate what "Note that you better put a form feed as
the last character of your text
file if you're not using the print spooler to do that for you. "
What does form feed character look like in a pico file (text).
Thanks a lot guys. I am a newbie here.
Tony
I did a lpstat -t and it shows part of the following.
device for letter: /dev/tty02
device for PTICKETS: /dev/ttya07
So if I need to test a print I can use the following?
lp -d /dev/ttya02 testpage
nohup cat testpage /dev/ttya02 & (passing the spooler)
thanks,
Tony