Spool filename. ( What is the problem? )
Joel Hammer
jhammer2 at home.com
Wed Nov 21 11:06:05 GMT 2001
Using samba 2.2.2.
Well, I fooled around some more. I DO see a truncated file name with lpq
when I use:
print command = /usr/bin/lpr -Plp -J'%J' %s; rm %s
Now, it is confusing. Even though I restarted smbd with kill -1 (SIGHUP),
this change didn't take effect until I had stopped and restarted Word.
If you set the log level to 6, this appears in the log:
Running the command `/usr/bin/lpr -Plp -J'Microsoft Word - Testing J.doc'
smbprn.000079.qxDL2N; rm smbprn.000079.qxDL2N' gave 0
Ergo, -J is working and the entire windows file name is passed.
If you use this for your print command:
print command = echo %J %p %s >> /tmp/junkJ; /usr/bin/lpr -Plp -J'%J' %s;
rm %s
/tmp/junkJ will have:
Microsoft Word - Log Level one.doc lp smbprn.000086.TEZLS3
I tried to use the pid %j, too, but I couldn't get it to work then. Maybe,
%j isn't defined until after lpr runs.
So, all the info is available that your boss wants to have. You will just
have to be creative in getting this information displayed easily. I don't
see right off how to do this, so, I'll just leave that as an exercise for the reader.
The only drawback to the -J option is now the person sitting at the windows
client will see only a truncated print name in his queue.
Joel
On Wed, Nov 21, 2001 at 11:28:53AM -0500, Joel Hammer wrote:
> In 2.2.2 %s will hold a somewhat truncated version of the windows file, not
> the smb.XXXXX job name. I am using windows 98. Have you just tried dropping the -J paramater and
> see what happens?
> I have never seen the J variable in any samba documentation. Undocumented
> things tend to get lost over time, IMHO.
> Joel
> On Wed, Nov 21, 2001 at 12:23:01PM -0300, Daniel William Schultz wrote:
> > Here is my printer config:
> >
> > printing = lprng
> > load printers = yes
> > use client driver = yes
> > printer admin = @edutec, root
> > printcap name = /etc/printcap
> > print command = lpr -U%U@%M -r -P%p -J'%J' %s
> > lpq command = lpq -P%p
> > lprm command = lprm -U%U@%M -P%p %j
> > lppause command = /usr/sbin/lpc -U%U@%M hold %p %j
> > lpresume command =/usr/sbin/lpc -U%U@%M release %p %j
> > queuepause command = /usr/sbin/lpc -U%U@%M -P%p stop
> > queueresume command = /usr/sbin/lpc -U%U@%M -P%p start
> >
> >
> > On the print command I have put the variable %J , to get the original
> > filename, but it's empty...
> > On samba 2.2.1a it worked, but now in 2.2.2 seems to not work.
> > This variable get deprecated ?
> > Please, any help is welcome, my boss is asking me all the time about
> > this, and I don't want to downgrade to 2.2.1a to have oplock problems
> > again :)
>
More information about the samba
mailing list