Hello! Situation: I have hylafax and Sambafax installed, and i want to send a error popup to the win clients if the fax fails, for that i have to run a file when somone is faxing/printing. If i put the print command in there, i can?t print anymore, if i comment it out, it works! Any Ideas why? This is my whole conf file: #; ; /etc/samba/smb.conf ; ; Copyright (c) 1999 SuSE GmbH Nuernberg, Germany. ; [global] workgroup = workgroup guest account = nobody keep alive = 30 os level = 2 kernel oplocks = false security = user printer admin = @ntadmin printer driver file = /usr/local/samba/printers log file = /var/log/samba.%h ; Uncomment the following, if you want to use an existing ; NT-Server to authenticate users, but don't forget that ; you also have to create them locally!!! ; security = server ; password server = 192.168.1.10 encrypt passwords = yes # printing = bsd printcap name = /etc/printcap # load printers = yes socket options = TCP_NODELAY map to guest = Bad User ; If you want Samba to act as a wins server, please set ; 'wins support = yes' wins support = no wins server = 192.168.10.1 write list = @ntadmin,root [printers] comment = All Printers path = /var/spool/lpd/lp browseable = no printable = yes public = yes writable = no create mode = 0700 directory = /tmp print command = /var/spool/fax/bin/faxclient [share] comment = %m browseable = yes public = yes readonly = no creat mode = 0755 directory = /share [Faxe] comment = Angenommene Faxe browseable = yes public = yes readonly = no creat mode = 0755 directory = /var/spool/fax/recvq/ Thanks a lot! Mario Ohnewald
Hello! i am trying to get this working since HOURS! *grrr* ;P why wont that work? print command = /tmp/run; echo %m > /tmp/print.log; lpr -P %p %s; rm %s I had to add lpr -P %p %s; rm %s cause otherwise it wont print at all! (found it in an example on the web, i have no clue what it is actually doing) Cheers,, Mario Ohnewald
The print command is the exact command samba runs when you request it to do a print job. What command is in /tmp/run? What do you have for your printing = parameter? Keep things simple. Try something like: /usr/bin/lpr -PRealPrintQueueName %s as your print command. It is best to include the entire path for your print command. Make sure you have the right printing= parameter for your system. Joel On Fri, Apr 12, 2002 at 04:21:27PM +0200, spiekey wrote:> Hello! > i am trying to get this working since HOURS! *grrr* ;P > why wont that work? > print command = /tmp/run; echo %m > /tmp/print.log; lpr -P %p %s; rm %s > > I had to add lpr -P %p %s; rm %s cause otherwise it wont print at all! > (found it in an example on the web, i have no clue what it is actually > doing) > > > Cheers,, Mario Ohnewald > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Hallo List! Can someone please post me an example of a simple "print command" when i wanna execute a script?! This works, but then it prints it 3 times!! ----------------------------------------- print command = /var/spool/fax/bestaetigung %m; echo %m > /tmp/print.log; lpr -P %p %s; rm %s Here it works, but it wont print my job --------------------------------------- print command = /var/spool/fax/bestaetigung %m; echo %m > /tmp/print.log ANY ideas? Thanks!! Mario Ohnewald
Hi Is there are % variable which is the name of the job as seen on the windows print manager. So that I can use the -J option with lprng and get it displayed on the printer screen. Thanks Jeffrey Borg
Good. Glad something worked twice. The sed stuff is to get rid of the long prefixes you sometimes get, like: Microsoft Word document-etc. They can take up most of the available space in the queue panel. Joel Tue, Sep 10, 2002 at 09:33:01AM +1000, Jeffrey Borg wrote:> Worked a treat. Now the Laserjet 5si prints the username + job name on the > screen :-) Though I didn't bother with the sed stuff just used %J straight > into lpr > > > ----- Original Message ----- > From: "Joel Hammer" <Joel@HammersHome.com> > To: "Jeffrey Borg" <jeffreyb@futureschool.com.au>; <samba@lists.samba.org> > Sent: Tuesday, September 10, 2002 9:19 AM > Subject: Re: [Samba] Print Command > > > > Yes. It is %J > > Here is what I do and it works with lprng. > > Joel > > > > [lp] > > comment = Raw Printer for Z53 > > path = /tmp > > create mask = 0700 > > guest ok = yes > > hosts allow = 192.168. > > printable = Yes > > printing = lprng > > print command = echo %J %p %s >> /tmp/junkJ;\ > > a="`echo '%J' | sed "s/^.*- //"`" ;\ > > echo This is truncated $a >> /tmp/junkJ;\ > > /usr/bin/lpr -Plp -J"$a" %s;\ > > rm %s > > lpq command = /usr/bin/lpq -Plp > > lprm command = /usr/bin/lprm -Plp %j > > lppause command = /usr/sbin/lpc hold -Plp %j > > lpresume command = /usr/sbin/lpc release -Plp %j > > printer name = lp > > share modes = No > > > > On Tue, Sep 10, 2002 at 08:56:43AM +1000, Jeffrey Borg wrote: > > > Hi > > > > > > Is there are % variable which is the name of the job as seen on the > windows > > > print manager. So that I can use the -J option with lprng and get it > > > displayed on the printer screen. > > > > > > Thanks > > > Jeffrey Borg > > > > > > > > > -- > > > To unsubscribe from this list go to the following URL and read the > > > instructions: http://lists.samba.org/mailman/listinfo/samba > >