here it is. please feel free to correct me.
--- Patrick Powell <[EMAIL PROTECTED]> wrote: > Right. On the list.
Could I get the following:
a) explanation of how the popup on Windows works (for the recipe).
b) Samba configuration changes (if any) to make this work.
a) explanation of how the popup on Windows works (for the recipe).
On windows 95 or 98, WinPopup need to be running to receive WinPopup messages. With Windows NT or Windows XP, you can receive message without starting it. Message will automatically appear in a
small dialog box on the scren when received.
Windows popup message gives users quick feedback about what is going on with their print jobs.
For Windows 95/98, justpop.exe is a good choice if you don't want to run Winpopup on client
machine.
Find it here (no need to install). http://www.zinkwazi.com/tools/justpop.exe
b) Samba configuration changes (if any) to make this work.
Add one option to the 'print command' in smb.conf like this:
print command = lpr -r -CREMOTEIP=%I -P%p %s
then in accounting.pl, use following line to get the hostname
$host = scalar gethostbyaddr(inet_aton($remote_ip),AF_INET) if (($remote_ip) = $opt{C}=~ /REMOTEIP=(.*)/);
I must thank Ryan Novosielski and Rick Cochran for sharing justpop.exe and this idea of getting remote hostname with us.
Qiang
My original problem was that I we have just bought the Pharos/Uniprint print accounting system which runs on MSSQL on a Windows 2000 server! I am using LPRng to spool the jobs prior to being forwards to the windows server and needed the jobs to appear to have come from the originating client rather than the Samba server. To do this I
a) (similar to Qiang above) added the line
print command = lpr -P%p -r -Cclient=%M %s
to the Samba configuration.
b) added the following line to the printcap entries
:control_filter=/usr/local/sbin/ckhost
where /usr/local/sbin/ckhost is the following script
#! /bin/bash
sort | awk '{
if ( check == "no" ) { print ; next }
ctrl=substr($1,1,1)
if ( ctrl == "C" ) {
if ( substr($1,2,7) == "client=" ) {
host=substr($1,9)
print "CA"
}
else {
check="no"
print
}
next
}
if ( ctrl == "H" ) {
print "H"host
check == "no"
next
}
print
}'This rewrites the host (H) and class (C) lines if the class line is of the form 'Cclient=hostname'. Note that I had to sort the control lines as LPRng presents them in what appears to be an arbitrary order with the C line after the H line!
-- Derek _________________________________________________________________ Dr. D. Wanless Tel: +44 (0)1782 583071 Computing Services Fax: +44 (0)1782 584234 Keele University Email: [EMAIL PROTECTED] Keele,Staffs. ST5 5BG
----------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------
