%J to print filename in windows 2000

Jonathan Michael Hawkins spiritu at northwestern.edu
Thu Oct 10 06:54:01 GMT 2002


Hello--

I've been perusing the lists searching for a solution to my problem.  
This problem exists in Samba 2.2.2 and Samba 2.2.5 with LPRng 3.7.4 on a
RedHat Linux 7.2 server, with Windows 2000 and Windows XP clients.

What's happening is that filenames are not getting passed to lpr.  After 
perusing the lists and newsgroups I found that adding "-J'%J'" to the lpr 
command is supposed to fix the issue.

However, this is not what appears to be occurring.  Instead, in 2.2.2 it 
remains "smb.prn" or "smbprn.XXXXXX" with XXXXXX being a pseudo-random 
number.  I'd hope that it is possible to have, say "mydocument.doc" come 
up when I'm printing that, in order to facilitate job logging and printer 
accounting.

My instincts tell me this is an NT issue, but it's one that would be nice 
to have resolved.  Can anyone give me some pointers on where to begin 
searching the code for NT printing, or have any ideas?  I've looked 
through and found where the %J option gets set by Samba in printing.c, but 
have not been able to track down where that's supposed to get passed from 
nor why it's not happening.

Pointers to documentation, etc., or a solution, would be greatly 
appreciated.

Thanks!

Jonathan Hawkins




More information about the samba-technical mailing list