I feel like this must be in the documentation somewhere, but I can't seem to find it. Is there any way to make Samba send WinPopUp notification when a document finishes printing, like Windows NT does? I'm doing some custom work with a print filter where this would be really handy. Alternatively, is there any way to make smbclient send a message to a username instead of to a machine name? If so I could incorporate the notification into my filter script. The problem is that the print filter knows the username of the person doing the printing, but doesn't have any way of finding out the machine name. ---------- David Brodbeck, System Administrator InterClean Equipment, Inc. Ann Arbor, Michigan davidb@mail.interclean.com (734) 975-2967 x221
What values to you see with set > shellvalues in your print filter. Would using email an OK way to notify them? Joel Fri, Feb 01, 2002 at 08:46:49AM -0500, David Brodbeck wrote:> I feel like this must be in the documentation somewhere, but I can't seem to > find it. > > Is there any way to make Samba send WinPopUp notification when a document > finishes printing, like Windows NT does? I'm doing some custom work with a > print filter where this would be really handy. Alternatively, is there any > way to make smbclient send a message to a username instead of to a machine > name? If so I could incorporate the notification into my filter script. > The problem is that the print filter knows the username of the person doing > the printing, but doesn't have any way of finding out the machine name. > > ---------- > > David Brodbeck, System Administrator > InterClean Equipment, Inc. > Ann Arbor, Michigan > davidb@mail.interclean.com > (734) 975-2967 x221 > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: lists.samba.org/mailman/listinfo/samba
Either you can pass the machine name (and/or ipaddress) to your script, otherwise if you use wins, you could use IP=$nmblookup -U $WINS_SERVER -R "$USER#03"|grep "<03>"|awk '{print $1}') (just replace $WINS_SERVER with the IP address of your wins server, or set the environment variable somewhere). to get the IP address, and the do: echo "Your print job has finished" |smbclient -M $USER -I $IP We use something like this in a procmail script to notify users of new mail. Buchan > Message: 20 Date: Fri, 1 Feb 2002 09:09:01 -0500 From: Joel Hammer <Joel@HammersHome.com> To: David Brodbeck <DavidB@mail.interclean.com>, samba@lists.samba.org Subject: Re: [Samba] Printing notification What values to you see with set > shellvalues in your print filter. Would using email an OK way to notify them? Joel Fri, Feb 01, 2002 at 08:46:49AM -0500, David Brodbeck wrote:> >> I feel like this must be in the documentation somewhere, but I can't seem to >> find it. >> >> Is there any way to make Samba send WinPopUp notification when a document >> finishes printing, like Windows NT does? I'm doing some custom work with a >> print filter where this would be really handy. Alternatively, is there any >> way to make smbclient send a message to a username instead of to a machine >> name? If so I could incorporate the notification into my filter script. >> The problem is that the print filter knows the username of the person doing >> the printing, but doesn't have any way of finding out the machine name. >> >> ---------- >> >> David Brodbeck, System Administrator >> InterClean Equipment, Inc. >> Ann Arbor, Michigan >> davidb@mail.interclean.com >> (734) 975-2967 x221 >> >> >> >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: lists.samba.org/mailman/listinfo/samba >-- |----------------Registered Linux User #182071-----------------| Buchan Milne Mechanical Engineer, Network Manager Cellphone * Work +27 82 472 2231 * +27 21 808 2497 ext 202 Stellenbosch Automotive Engineering cae.co.za
Lateral approach : from the print filter use grep and sed on smbstatus to broadcast the message to all the machines that user is logged in from. Logical approach : possibly get the source for smbclient and see if you can change it to do this. I'm not part of the samba team, but I am a programmer. Martyn At 08:46 AM 2/1/02 -0500, David Brodbeck wrote:>I feel like this must be in the documentation somewhere, but I can't seem to >find it. > >Is there any way to make Samba send WinPopUp notification when a document >finishes printing, like Windows NT does? I'm doing some custom work with a >print filter where this would be really handy. Alternatively, is there any >way to make smbclient send a message to a username instead of to a machine >name? If so I could incorporate the notification into my filter script. >The problem is that the print filter knows the username of the person doing >the printing, but doesn't have any way of finding out the machine name. > >---------- > >David Brodbeck, System Administrator >InterClean Equipment, Inc. >Ann Arbor, Michigan >davidb@mail.interclean.com >(734) 975-2967 x221 > > > >-- >To unsubscribe from this list go to the following URL and read the >instructions: lists.samba.org/mailman/listinfo/samba=============Martyn Ranyard
ooh, another thought, you could use a preexec command to write the machine name to a file before the job prints. Martyn At 08:46 AM 2/1/02 -0500, you wrote:>I feel like this must be in the documentation somewhere, but I can't seem to >find it. > >Is there any way to make Samba send WinPopUp notification when a document >finishes printing, like Windows NT does? I'm doing some custom work with a >print filter where this would be really handy. Alternatively, is there any >way to make smbclient send a message to a username instead of to a machine >name? If so I could incorporate the notification into my filter script. >The problem is that the print filter knows the username of the person doing >the printing, but doesn't have any way of finding out the machine name. > >---------- > >David Brodbeck, System Administrator >InterClean Equipment, Inc. >Ann Arbor, Michigan >davidb@mail.interclean.com >(734) 975-2967 x221 > > > >-- >To unsubscribe from this list go to the following URL and read the >instructions: lists.samba.org/mailman/listinfo/samba=============Martyn Ranyard