Printing & Samba 2.0.7

Joel Hammer Joel at HammersHome.com
Tue Dec 4 17:05:04 GMT 2001


I don't get it.
How can a dos program run on a linux box and function as a server to a windows
client?
Anyway, was there a change in your printer when this happened or in the
printer driver?
To track it down, change your print command in samba to cat %s >
/tmp/CheckIt.
Then, see when kind of ascii code is in this file. 
I assume you are not sending postscript, just dumping ascii text to your
printer. 
It would not be a big thing to hack up a filter, say with tr or some other
linux tool, to convert the ascii code.
A print filter can be as simple as
#!/bin/bash
cat
since input and ouput is handled by the daemon to be the printjob and the lp
defined in printcap, respectively, I think.
You could make it something like:
cat | tr "oldasci......"  "newascii......"(you get the idea)
One trick is that \ refers to the octal value of each character.
As usual, in linux, figuring out the escape characters is 2/3rds the work.
Just send the output to a file while you are troubleshooting eg.
#!/bin/bash
cat | tr "oldasci......"  "newascii......" > TestOut
Joel

Joel
On Wed, Dec 05, 2001 at 11:32:47AM +1100, Shane Machon wrote:
> Greetings,
> 
> The DOS program is client/server program running from the linux server
> and accessed by the windows clients on the network via tcp/ip. There is
> simply a shortcut to the program from each client to access the program
> from the linux box via samba. All printing is contolled by a mapped LPT
> driver on the client computers. The printer configured in samba on the
> linux server is a HP 6L Laserjet.
> 
> The samba server is simply a PDC/fileserver for windows clients on the
> network.
> 
> Hope this is what you are after. Let me know if you need more info.
> 
> 
> > On Tue, Dec 04, 2001 at 03:08:53PM +1100, Shane Machon wrote:
> > > Greetings,
> > >
> > > I have a site that has an old DOS (As in the OS!) program that prints
> > > ASCII characters, since moving it onto a samba server (Used to be on an
> > > old NT Server), it now prints the UNIX equivalent of the DOS ASCII
> > > values output from the program. For example, when the program attempts
> > > to do a - character, it prints a strange accent character (which is the
> > > correct ASCII character for UNIX).
> > >
> > > How do I change Samba to use DOS ASCII instead it's traditional UNIX
> > > ASCII?
> > >
> > > I have tried changing the character set in smb.conf to 'client code page
> > > = 437', which is what the windows clients are using. However this did
> > > not fix the problem.
> > >
> > > Im running debian 2.2 with samba 2.0.7 & PDC support.
> > >




More information about the samba mailing list