The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
add printer sak900354 UNIX for Dummies Questions & Answers 1 06-20-2006 06:10 AM
How do you send printer codes to an IP printer jeffbugfree IP Networking 2 10-20-2005 06:15 PM
printer ramesh Linux 1 08-24-2004 08:04 AM
know I do for to printer in printer deskjet 80colun edvaldo Linux 1 07-13-2004 04:20 AM
printer victbla Security 1 03-23-2002 04:58 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-11-2003
hassan2 hassan2 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2002
Location: London, England
Posts: 262
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 (permalink)  
Old 02-11-2003
TioTony's Avatar
TioTony TioTony is offline Forum Advisor  
Bit Pusher
  
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
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 (permalink)  
Old 02-13-2003
hassan2 hassan2 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2002
Location: London, England
Posts: 262
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 (permalink)  
Old 02-14-2003
TioTony's Avatar
TioTony TioTony is offline Forum Advisor  
Bit Pusher
  
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
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 (permalink)  
Old 02-14-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,116
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0