Jobnames displayed by lpq: Fixed a bit
Christopher Odenbach
odenbach at math.uni-paderborn.de
Mon Dec 3 03:29:02 GMT 2001
Hi,
> There has been some correspondence about getting the file names displayed
> with lpq instead of the smbXXXXX name. The -J option works, but, with some
> documents, notably Microsoft Word and Corel WP9, the application sends a
> long preamble, such that the file name is never seen in the queue when
> listed with lpq.
[...]
OK - accepted as workaround, but not really a nice solution.
I just wondered whether the long jobname gets truncated by lpq or
anywhere else.
Look:
odenbach at robin[~]>>echo bla | lpr -J '12345678901234567890123456789012345678901234567890'
odenbach at robin[~]>>lpq
Printer: lw_sw_rbg_1_F0_113 at pooh (dest lw_sw_rbg_1_F0_113 at pooh) 'HP LaserJet 5MP in F0.113' (printin)
Queue: 1 printable job
Server: no server active
Status: server finished at 11:49:56
Rank Owner/ID Class Job Files Size Time
1 odenbach at robin+120 A 120 12345678901234567890123 4 12:18:16
But:
root at pooh[lpd]# grep '^J' lw_sw_rbg_1_F0_113/cfA120robin
J12345678901234567890123456789012345678901234567890
Hey, so the lpd really has the long name! Leaves the question: Is it the lpd
that truncates the jobname, or is it lpq? Which one should be patched? :-)
This just gives me another idea: If the samba server has somehow access
to the filesystem containing the spool directory of the lpd (e.g. they
are both on one machine which makes sense very often), then one could
quickly hack a script that grabs the 'J'-line from the control file of
the spool dir. This would lead to an lpq-wrapper.
If I have time, I'll give it a try.
So long,
Christopher
More information about the samba
mailing list