Printer


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Printer
# 1  
Old 02-11-2003
Printer

I config my sun solaris 8 as a print server running lp print.

It printing fine but would not print multiple copies

I use the -n option

like this:
lp -d printer_name -n3 file

it just print one copy instead of three copries

the printers are hp printers.

Can you help? please

Thanks
# 2  
Old 02-11-2003
You may want to look at the model script for that printer in /var/spool/lp. It may not have support for -n. You may also want to try -on=#.
# 3  
Old 02-13-2003
In my model script in /var/spool/lp/model they are two files
netstandard and standard I have look through both script but I don't honestly no what am looking for may you could please help
on this.

I tried using option -on this did not work either.

Any more suggestions will be appriaciated

Thanks
# 4  
Old 02-14-2003
Model scripts are usually 'scripts', just like their name says. If you understand shell scripting or programming of any kind you should be able to make out what it is doing.

When you run 'lp' it contacts the lpscheduler (lpsched). lp passes the file and the options you specified, like the printer name and number of copies, to the lpsched.

lpsched takes this information and does several things with it. This is where things get confusing. For some reason it is very hard to find a comprehensive document on how the lp subsystem works. This site is about the best I have ever found: http://www.unix.kg/eng/solaris/syste.../page007.shtml

lpsched takes the options passed by lp and creates 2 files, one in the var/spool/lp/tmp and the other is in /var/spool/lp/requests.

lpsched just uses the on in the tmp direcotry for logging and info purposes as far as I am aware. It uses the one in requests to send info to the model script

I am seeing the same thing as you. I don't remember seeing this in the past but it is not working on my home box (Solaris 9).

Looking at the model script you will find "copies=$4". It is getting $4 as the 4th entry in the /var/spool/lp/requests file. If you disable your queue and look at this file, you will see it will always be '1' no matter what you pass for -n. I tried several other options but they didn't work either.

The interesting thing is the file in tmp has the correct number in it (the C value). I searched sunsolve and couldn't find any articles about this. Hopefully this long discussion will trigger someone's memory.

The only work around I can suggest for now is to change your model script to look at the tmp directory to find the copy info. This is up to you if you feel confident you can do it and feel it would work fine in your environment.
# 5  
Old 02-14-2003
The lp subsystem originated either in System III or System V, I can't remember which. But it was intended to control printers that were directly attached to the unix computer.

The BSD guys invented their own spooler. It could control directly attached printers and it could send a request over a network to another computer.

The USG package has an option for multiple copies and the BSD package does not. And the BSD remote printer protocol does not have a way to send a copies paramter over the network.

Vendors like Sun throw these packages together and maybe toss in a few more goodies.

I'm guessing that you are sending print requests over the network and your lp package knows this so it's disabling that copies parameter.

Rather than fiddling around with the lp subsystem, I would write a script called lp and put it in /usr/local/bin. People who need a copies parameter will put /usr/local/bin first in their PATH. The local version of lp will just handle the copies by creating a long file with several copies of the input and then send that file to the real lp command.

By the way, I think that model script gets copied to the interfaces subdirectory and is given the same name as the printer.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Linux

Find printer location and printer type

Hi, Is it possible to find the printer location and printer type (whether it is local or network) using command in Linux ? Thanks in advance. (1 Reply)
Discussion started by: forumguest
1 Replies

2. Solaris

Please help about my printer

In previous version of Solaris , my printer has been working fine , but in this version of Solaris plug and play is not working . Printer is HP psc 1215 all in one , it is supported by Solaris kernel but I do not know how to install printer . I know for command lpadmin but i don't know how to... (6 Replies)
Discussion started by: microbot
6 Replies

3. AIX

Check printer queue on Windows printer server

Hello Let me first give a small overview of the setup. All printers are connected to Windows 2000 servers. There are a lot of UNIX (AIX & HP-UX) servers as well which have SAP running. I'm working on a script to add printers to a specified SAP instance. I want to verify the user input (to... (0 Replies)
Discussion started by: NielsV
0 Replies

4. Solaris

Configuring Printer with Printer Manager

Hi All, I am trying to configure printer in solaris 10 with the help of print manager. There is no printer attached to my system, ia m doing it for test purpose. However I am unable to do so coz its pops up window - Heading as error with option as dismiss and cancel. Kindly help as I am... (3 Replies)
Discussion started by: kumarmani
3 Replies

5. IP Networking

How do you send printer codes to an IP printer

We were printing to a serial laser printer with all the HP codes to generate a form (i.e. lines, boxes, etc.) Thus the file is filled w/ control codes. We are switching to an IP printer and we can no longer print directly to the device (i.e. cp text /dev/tty11). It looks like we have to use the lp... (2 Replies)
Discussion started by: jeffbugfree
2 Replies

6. Linux

know I do for to printer in printer deskjet 80colun

I want to print some thing in HP Deskjet 692.? (1 Reply)
Discussion started by: edvaldo
1 Replies

7. UNIX for Dummies Questions & Answers

HP Printer

Dear Experts How can I configure my workstation in order to be able to sent print? I am working on a sun workstation with Solaris 8 as its OS. My printer is an HP8000 series and is connected somewhere to our network. I know the IP address of the printer and I have put it in /etc/hosts file. So I... (8 Replies)
Discussion started by: Reza Nazarian
8 Replies
Login or Register to Ask a Question