Hey folks, sorry I didn't quite follow the discussion :-(
did you try '-J' ? in general this should result in something like: [pcx1839] / $ echo test | lpr -Ptestp5 [pcx1839] / $ lpq Printer: testp5@pcx1839 (printing disabled) (dest testp5@spoolc,spoola) Queue: 2 printable jobs Server: no server active Status: job 'chbeyer@pcx1839+78' removed at 13:57:34.865 Rank Owner/ID Class Job Files Size Time 1 root@pcx1839+273 A 273 (stdin) 5 13:02:13 [pcx1839] / $ echo test | lpr -J name -Ptestp5 [pcx1839] / $ lpq Printer: testp5@pcx1839 (printing disabled) (dest testp5@spoolc,spoola) Queue: 2 printable jobs Server: no server active Status: job 'chbeyer@pcx1839+78' removed at 13:57:34.865 Rank Owner/ID Class Job Files Size Time 1 root@pcx1839+273 A 273 (stdin) 5 13:02:13 2 root@pcx1839+280 A 280 name 5 13:02:38 To use this with SAMBA try something like: print command = /usr/spool/lp/bin/lpr -r -J"%J" -m%m -U%U -P%p %s Don't forget the '"' because filenames coming from windows tend to have blanks in their names which will kill your 'print command'... hope this helps (?) ~christoph -- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY | Phone: 040-8998-2317 * * - IT - | Fax: 040-8998-4060 * \* 22603 Hamburg | http://www.desy.de */ On Fri, 17 Jan 2003, Van Sickler, Jim wrote: > Good point. > > I'm not all that happy with the Lanier job > processing (aside from the 2138's intermittent > trips into la-la land). The only time the > Document Name ever shows up is when I send > jobs to it via the Samba/LPRng route. > > The following drivers/ports are in use, > but NEVER result in the Document Name > being displayed in the History: > > RPCS (Ricoh's native driver) > via LanMan or SmartNet ports > PS2/PS3 > via LanMan or AdobePS ports > ------------------------------ > I just created a printer on the Win2k box > using the PS3 driver, through a > Standard TCP/IP port; the correct > Document Name (Test Page) info shows up... > > xxx.xxx.xxx.24 port name is lp. > > Device Type is Ricoh Generic Network Printer > > But...the PS3 driver (always) screws up the > timestamp in the process. The History shows > 00/00/00, and the console/web log shows > ----------- instead of YY/MM/DD. This occurs > no matter which port I use-LanMan, SmartNet, > TCP/IP. > > It looks to me like the Ricoh/Lanier folks have > cobbled the drivers together well enough to > ship, but there's still a lot of "features" > to be worked out. > > I haven't tried the PCL drivers yet...I can > hardly wait to see what "features" will > divulge themselves when I do... > > > -----Original Message----- > > From: Paul Tykodi [mailto:[EMAIL PROTECTED]] > > Sent: Friday, January 17, 2003 8:31 AM > > To: [EMAIL PROTECTED] > > Subject: RE: LPRng: RE: How do I get the @#$$% job name to > > show instead > > of smbprn.yad a.yada? > > > > > > Hello Joel and Jim, > > > > One question to ask the Lanier folks would be where the print > > controller of > > the copier/printer collects the job name from when it > > processes a job. Your > > discussion to date has assumed that it is getting the data > > from the LPD > > daemon running on the print controller parsing the control > > file generated by > > LPRng when the job is transferred through Samba to the > > printer. It is also > > possible the accounting function of the copier/printer is > > reading header > > information (PostScript or PJL) in each actual received job > > to find the user > > instead of the LPRng control file. If this turned out to be > > true, it would > > explain why the changes you were testing didn't have any effect at the > > copier/printer. > > > > Just a thought... > > > > Best Regards, > > > > /Paul > > -- > > Paul Tykodi > > National Product Manager > > Print 4Sight Inc. > > > > p: 603-431-0606 x115 > > f: 603-436-6432 > > E-mail: [EMAIL PROTECTED] > > > > Special Note: On November 30th, 2002, Print 4Sight Inc. acquired the > > business assets and business activity of Intermate US Inc. > > > > Print 4Sight Inc. as an official North American distributor > > will continue to > > sell and support Intermate and Praim Printing products from > > current offices > > in Portsmouth, NH, USA. > > > > > > >-----Original Message----- > > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > > Behalf Of > > >Joel Hammer > > >Sent: Thursday, January 16, 2003 8:05 PM > > >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > >Subject: Re: LPRng: RE: How do I get the @#$$% job name to > > show instead > > >of smbprn.yad a.yada? > > > > > > > > >Question: I am not sure what you mean by the Lanier displaying > > >anything. Is there a display on the printer? Is this a > > network printer > > >that talks to the server? This may be an idiosyncracy of the lanier. > > > > > >Suggestion: > > >Is there a way to modify the print command in smb.conf so > > that it mv's > > >the job from samba.xxx to ProperJobName, and then print the job with > > >lpr and forget about the %J parameter? > > > > > >For example, without trying this, I could certainly see > > putting into the > > >smb.conf print command something like this: > > >mv %s %J > > >lpr %J > > > > > >Other questions: > > >Are you getting the right name when viewed from the windows clients? > > >If lpq is working properly on the server, do you have the correct lpq > > >command in your smb.conf? eg. > > > > > > lpq command = /usr/bin/lpq -PWin4LinZ53 > > > > > >Does the user printing have permissions to use lpq? > > > > > >Have you specifed which printing system (lprng) you are using in your > > smb.conf > > >file? BSD is the default, or, at least it was. > > > > > >Another suggestion: > > >You might use tcpdump to monitor what is sent back and forth between > > >the server and the clients. I would THINK the server would be sending > > >back the jobname for display, but, I haven't tried this. > > > > > >Joel > > > > > > > > >On Thu, Jan 16, 2003 at 06:43:20PM -0500, Van Sickler, Jim wrote: > > >> > -----Original Message----- > > >> > From: Joel Hammer [mailto:[EMAIL PROTECTED]] > > >> > Sent: Wednesday, January 15, 2003 6:57 PM > > >> > To: Van Sickler, Jim; [EMAIL PROTECTED] > > >> > Subject: Re: [Samba] How do I get the @#$$% job name to show > > >> > instead of > > >> > smbprn.yada.ya da? > > >> > > > >> > > > >> > If the file name is right in /tmp/J, then it looks like samba > > >> > is working ok. > > >> > > > >> > I guess the question would be, does your version of lpr > > support the -J > > >> > option? lpr -H shows all the options. > > >> > > > >> > What happens if you just print a file on your linux server > > >> > (with the printer > > >> > turned off) with: > > >> > > > >> > lpr -J"This is my banner" FileToPrint > > >> > > > >> > lpq should show something like this: > > >> > > > >> > Rank Owner/ID Class Job Files > > >> > Size Time > > >> > active jlh@hammer2+227 A 227 This is my > > >> > banner 24 20:43:27 > > >> > > > >> > Joel > > >> > > > >> > > > >> > On Wed, Jan 15, 2003 at 07:35:25PM -0500, Van Sickler, Jim wrote: > > >> > > I'm tinkering with this mod to my smb.conf, > > >> > > and can't get the actual filename to be > > >> > > displayed in the printed job history. > > >> > > > > >> > > It's adapted from one Joel put out on the list > > >> > > last year. My impression is that it works for > > >> > > everyone in the world but me.... > > >> > > > > >> > > All that ever shows up is smbprn.yada.yada... > > >> > > in the printer's history of printed jobs. > > >> > > > > >> > > print command = echo %J %p %s >> /tmp/junkJ;\ > > >> > > a="`echo '%J' | sed "s/^.*- //"`" ;\ > > >> > > echo This is truncated $a >> /tmp/junkJ;\ > > >> > > /usr/local/bin/lpr -P%p -J"$a" -U%m %s;\ > > >> > > rm %s > > >> > > > > >> > > Looking in /tmp/junkJ, the $a is the filename, > > >> > > as it's supposed to be. > > >> > > > > >> > > > > >> > > I'm running OpenBSD 3.2, LPRng 3.8.19. Clients are > > >> > > all Win2k/SP2. The printer(s) are a mix of HP4s, > > >> > > and a new Lanier 2138 (Ricoh 3800c in sheeps clothing). > > >> > > > > >> > > I think something isn't being parsed/passed > > >> > > correctly between Samba and LPRng. > > >> > > > > >> > > Using the standard LPRng Print Command produces the > > >> > > same results (lpr -P%p -r %s), so it almost seems > > >> > > as though the -J%J job info parameter is being > > >> > > ignored (when I add it to the Print Command) > > >> > > > > >> > > Any help would be appreciated. > > >> > > > > >> > > Jim > > >> > > -- > > >> > > To unsubscribe from this list go to the following URL > > and read the > > >> > > instructions: http://lists.samba.org/mailman/listinfo/samba > > >> > > > >> --------------------------------------------------- > > >> > > >> >From Samba 2.2.7pre1's print_generic.c: > > >> > > >> pstrcpy(print_directory, pjob->filename); > > >> p = strrchr(print_directory,'/'); > > >> if (!p) > > >> return 0; > > >> *p++ = 0; > > >> > > >> if (chdir(print_directory) != 0) > > >> return 0; > > >> > > >> pstrcpy(jobname, pjob->jobname); > > >> pstring_sub(jobname, "'", "_"); > > >> slprintf(job_page_count, sizeof(job_page_count)-1, "%d", > > >> pjob->page_count); > > >> slprintf(job_size, sizeof(job_size)-1, "%d", pjob->size); > > >> > > >> /* send it to the system spooler */ > > >> ret = print_run_command(snum, > > >> lp_printcommand(snum), NULL, > > >> "%s", p, > > >> "%J", jobname, > > >> "%f", p, > > >> "%z", job_size, > > >> "%c", job_page_count, > > >> NULL); > > >> > > >> --------------------------------------------------------------- > > >> > > >> I'm confused about what %J holds. > > >> > > >> >From the above, it holds the smbprn.yada.yada filename from > > >> the samba spool directory; not the Win2k-supplied file name. > > >> When I look at the LPRng control file for the job in the > > >> /var/spool/lpd/2138 subdir, Jwinfilename is in there... > > >> but the Lanier History is displaying the smbprn.yada.yada > > >> as the filename. > > >> > > >> Any of these produce the same result; > > >> user=machine name (as it should) > > >> Document Name=smbprn.yada.yada > > >> > > >> Normal Print Command: > > >> /usr/local/bin/lpr -U%m -P%p -r %s > > >> /usr/local/bin/lpr -U%m -J%J -P%p -r %s > > >> > > >> >From scripted section Print Command: > > >> /usr/local/bin/lpr -P%p -J"$a" -U%m %s;\ > > >> /usr/local/bin/lpr -P%p -J"Test by Jim" -U%m %s;\ > > >> /usr/local/bin/lpr -P%p -J$a -U%m %s;\ > > >> /usr/local/bin/lpr -P%p -J%J -U%m %s;\ > > >> /usr/local/bin/lpr -P%p -J"%J" -U%m %s;\ > > >> > > >> But according to /tmp/junkJ, $a is the windows file name, not > > >> the spool file name. So does the control file in the > > >> spool directory. > > >> > > >> If I send a file to the Lanier from the command line, > > >> the file name is always listed as the Document Name. > > >> e.g. > > >> /usr/local/bin/lpr -P2138 -Jlmhosts /etc/samba/lmhosts > > >> /usr/local/bin/lpr -P2138 -J"lmhosts" /etc/samba/lmhosts > > >> /usr/local/bin/lpr -P2138 -J"This is lmhosts" /etc/samba/lmhosts > > >> > > >> lpq shows the file name as either "lmhosts" or > > >> "This is lmhosts", but the Lanier shows it as > > >> /etc/samba/lmhosts > > >> > > >> ---------------------------------------------------- > > >> > > >> Maybe I'm off the mark here...and the Lanier is the bozo. > > >> > > >> I don't think so yet, because it's only displaying what > > >> the samba server/LPRng are passing on to it. Or is it? > > >> How does it get the smbprn.yada.yada as the filename? > > >> > > >> LPRng is sending the right info, as far as lpq shows; but > > >> it isn't sending the right info to the Lanier, as far as > > >> the Doc Name of smbprn.yada.yada shows. > > >> > > >> What part Samba is playing, I'm not sure yet. It all > > >> seems to be working as it should, but I'm not > > >> satisfied. > > >> > > >> Jim > > >> > > -------------------------------------------------------------- > > -------------- > > - > > > > > > -------------------------------------------------------------- > > --------------- > > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST > > The address you post from MUST be your subscription address > > > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests > > or lprng-digest-requests) with the word 'help' in the body. > > For the impatient, > > to subscribe to a list with name LIST, send mail to > > [EMAIL PROTECTED] > > with: | example: > > subscribe LIST <mailaddr> | subscribe lprng-digest > > [EMAIL PROTECTED] > > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] > > > > If you have major problems, send email to > > [EMAIL PROTECTED] with the word > > LPRNGLIST in the SUBJECT line. > > -------------------------------------------------------------- > > --------------- > > > > ----------------------------------------------------------------------------- > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST > The address you post from MUST be your subscription address > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests > or lprng-digest-requests) with the word 'help' in the body. For the impatient, > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] > with: | example: > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] > > If you have major problems, send email to [EMAIL PROTECTED] with the word > LPRNGLIST in the SUBJECT line. > ----------------------------------------------------------------------------- > ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------