The UNIX and Linux Forums  

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 03:10 AM
How do you send printer codes to an IP printer jeffbugfree IP Networking 2 10-20-2005 03:15 PM
printer ramesh Linux 1 08-24-2004 05:04 AM
know I do for to printer in printer deskjet 80colun edvaldo Linux 1 07-13-2004 01:20 AM
printer victbla Security 1 03-23-2002 12:58 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-11-2003
Registered User
 

Join Date: Mar 2002
Location: London, England
Posts: 262
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
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
Forum Sponsor
  #2 (permalink)  
Old 02-11-2003
TioTony's Avatar
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
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
Registered User
 

Join Date: Mar 2002
Location: London, England
Posts: 262
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
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-13-2003
TioTony's Avatar
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
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
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,253
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
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.
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop boot: cannot open kernel/sparcv9/unix command copy/move folder in unix curses.h cut command in unix export command in unix find grep find mtime find null character in a unix file grep multiple lines grep or grep recursive gzip password inaddr_any inappropriate ioctl for device lynx javascript mailx attachment mget mtime ping port remove first character from string in k shell replace space by comma , perl script rsync ftp scp recursive segmentation fault(coredump) sftp script snoop unix solaris change ip address stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix internals unix interview questions unix mtime unix simulator unix.com vi substitute while loop within while loop shell script


All times are GMT -7. The time now is 02:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101