Dear gentlemen,

today I've tested some ideas... one worked, one did not.

1) put a UNIX-domain named pipe in the Samba share, locally on the 
server:

        cd /mnt/samba
        mknod print.q p
        chmod 666 print.q

The above needs to run as user root.
The following can run as an unprivileged user:

To test the idea (dry run):

        while true; do cat print.q; echo "\n Another one:"; done

To actually run the print jobs though the printer back end:

        while true; do lpr -P PRNTEST < print.q; done

In the DOS client, having a drive G: mapped to the network share, I 
can do this (either works):

        echo "Howdy :-)" >> G:\print.q
        type autoexec.bat >> G:\print.q
        copy /Y /B autoexec.bat G:\print.q
        
Before trying this, I was a little worried that especially the "copy" 
would erase the pipe and replace it with a plain file - that did not 
happen, the pipe still exists and functions.

The named pipe provides a clear job start and job end, inherently, by 
closing the pipe to the "consumer" process (lpr) when the "producer" 
has closed his file copy/append operation. In our case, the 
"producer" runs in DOS, and sends output to the pipe via the CIFS/SMB 
network filesystem.

Note that after some time, lpr times out waiting for data (and exits, 
and gets respawned). This is normal and probably harmless. As far as 
I could observe, an lpr waiting for a print job to come does not 
"block the CUPS queue" in any way.

I've also tried prn2file:
https://board.flatassembler.net/download.php?id=1086
Unfortunately, this doesn't seem to work right over a Samba share.
Nothing ever got printed.
The prn2file.com gets loaded, I can configure the port to hook, but 
when I copy a file to LPT2, it does not fall out of the pipe in the 
Samba server machine. Interestingly, smbstatus indicates that the 
pipe is locked in RW mode by something running in the DOS client...

Frank


_______________________________________________
Freedos-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to