RE: LPRng: RE: How do I get the @#$$% job name to show instead ofsmbprn.yad a.yada?

2003-02-26 Thread Ryan Novosielski
I use:

print command = /opt/LPRng/bin/lpr -P%p -U%U -J'%J' -r %s

...I had the same problem you are having until I added:

-J'%J' -- I don't remember whether I used -J%J and that didn't work, but
I would tend to use double quotes so there may be a reason why I didn't
here. Give this one a whack (well, with the correct PATH to lpr,
obviously, minus the options you don't want (though IMHO, you want them
all)) and let me know if it works...

...unless of course, you solved this one already, in which case I
apologize. Too many things keeping me busy to read a mailing list on a
regular basis! :)

 _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
|$| |__| |  | |__/ | \| _|  | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent. | IST/ACS - New Jersey Medical School - C630

On Sat, 18 Jan 2003 [EMAIL PROTECTED] wrote:

 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: [EMAIL PROTECTED] (printing disabled) (dest [EMAIL PROTECTED],spoola)
  Queue: 2 printable jobs
  Server: no server active
  Status: job '[EMAIL PROTECTED]' removed at 13:57:34.865
  Rank   Owner/ID  Class Job Files Size
 Time
 1  [EMAIL PROTECTED] A   273 (stdin)  5
 13:02:13

 [pcx1839] / $ echo test | lpr -J name -Ptestp5
 [pcx1839] / $ lpq
 Printer: [EMAIL PROTECTED] (printing disabled) (dest [EMAIL PROTECTED],spoola)
  Queue: 2 printable jobs
  Server: no server active
  Status: job '[EMAIL PROTECTED]' removed at 13:57:34.865
  Rank   Owner/ID  Class Job Files Size
 Time
 1  [EMAIL PROTECTED] A   273 (stdin)  5
 13:02:13
 2  [EMAIL PROTECTED] 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: 

RE: LPRng: RE: How do I get the @#$$% job name to show instead ofsmbprn.yad a.yada?

2003-01-18 Thread christoph . beyer
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 

RE: LPRng: RE: How do I get the @#$$% job name to show instead ofsmbprn.yad a.yada?

2003-01-17 Thread Van Sickler, Jim
 -Original Message-
 From: Joel Hammer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 16, 2003 6: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.

Using the SmartnetMonitor's History diplay;  alternatively there's a
web browser interface that also displays the History .
 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
 
That sounds like it might work.

 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
 
I believe so...oddly, on the Lanier driver, all jobs shown in the
Windows status box have 12/31/1969 as the date.  The Lanier's
History shows the correct info.

 Does the user printing have permissions to use lpq?
 
I think so-otherwise no info would be displayed?  Print jobs can be
cancelled (lprm) and the printers paused.

 Have you specifed which printing system (lprng) you are using 
 in your smb.conf file?
 BSD is the default, or, at least it was.
yes
 
 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
 
I had a flash at about 5:30 this morning. The -J/-U in lpr's
command line affects the Banner info...which may be different
from what's being parsed/sent as the job info?

If so, why does the Banner option for the user (-U)
change info in the Lanier's History, but the
jobname (-J) doesn't?

It happens whether I'm sending jobs through Samba or
from the command line.

Jim
 
 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  -JThis 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, 

RE: LPRng: RE: How do I get the @#$$% job name to show instead ofsmbprn.yad a.yada?

2003-01-17 Thread Van Sickler, Jim
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  -JThis is my banner FileToPrint
  
   lpq should show something like this:
  
Rank   Owner/ID   Class Job  Files
   Size Time