All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: How to redirect LPT1 output to a disk file?
@ 2017-02-28 14:46 Peća Nešovanović
  0 siblings, 0 replies; 4+ messages in thread
From: Peća Nešovanović @ 2017-02-28 14:46 UTC (permalink / raw)
  To: linux-msdos


>
> # $_lpt1 = "lpr -l"
> # $_lpt2 = "lpr -l -P lpt2"
> # $_lpt3 = ""
> 
> # idle time in seconds before spooling out. Default: (20)
> 
> # $_printer_timeout = (20)
> 
> ##############################################################################
> 
> However, these lines are not at all clear to me.  What changes are needed so
> that lpt1 output goes to a disk file?


well, you could try to capture LPT output in file, convert to PDF and mail to yourself

/HOME/USERNAME/.dosemurc

----------------------
$_lpt1 = "tmpprn"
$_printer_timeout = (30)
----------------------



/USR/LOCAL/BIN/tmpprn

---------------------
#!/bin/bash
#
#
TMP1=`mktemp /home/$USER/epson.XXXXX` || exit 1
TMP2=`mktemp /home/$USER/outps.XXXXX` || exit 1
TMP3=`mktemp /home/$USER/pdf.XXXXX` || exit 1
#
date > ~/dt.txt
#
# write out data into TMP1
#
cat "$@" > $TMP1
cd /usr/local/bin
#
epsonps -q -ta4-12 -o$TMP2 $TMP1
gs -sDEVICE=pdfwrite -sPAPERSIZE=a4 -sOutputFile=$TMP3 -dBATCH -dNOPAUSE $TMP2 $
sleep 2
#
mv $TMP3 $TMP3.pdf
/usr/bin/mutt -a $TMP3.pdf -s "DOS PRINT" $USER@localhost < ~/dt.txt
#
sleep 2
#cleanup
rm -f $TMP1
rm -f $TMP2
rm -f $TMP3.pdf
rm -f ~/dt.txt
------------------------

Hope this lead you to right way



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to redirect LPT1 output to a disk file?
  2017-02-27 22:52 ` Stas Sergeev
@ 2017-03-01 23:43   ` Roger House
  0 siblings, 0 replies; 4+ messages in thread
From: Roger House @ 2017-03-01 23:43 UTC (permalink / raw)
  To: Stas Sergeev, linux-msdos

This worked great!  Thank you very much.

Roger House

Try:
> $_lpt1 = "cat > /tmp/file_name"
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to redirect LPT1 output to a disk file?
  2017-02-27 22:32 Roger House
@ 2017-02-27 22:52 ` Stas Sergeev
  2017-03-01 23:43   ` Roger House
  0 siblings, 1 reply; 4+ messages in thread
From: Stas Sergeev @ 2017-02-27 22:52 UTC (permalink / raw)
  To: Roger House, linux-msdos

28.02.2017 01:32, Roger House пишет:
> # $_lpt1 = "lpr -l"
> # $_lpt2 = "lpr -l -P lpt2"
> # $_lpt3 = ""
>
> # idle time in seconds before spooling out. Default: (20)
>
> # $_printer_timeout = (20)
>
> ############################################################################## 
>
>
> However, these lines are not at all clear to me.  What changes are 
> needed so
> that lpt1 output goes to a disk file? 
Try:
$_lpt1 = "cat > /tmp/file_name"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* How to redirect LPT1 output to a disk file?
@ 2017-02-27 22:32 Roger House
  2017-02-27 22:52 ` Stas Sergeev
  0 siblings, 1 reply; 4+ messages in thread
From: Roger House @ 2017-02-27 22:32 UTC (permalink / raw)
  To: linux-msdos


I am using dosemu 1.4.0.8 to run QuickBasic programs that are some 20+ 
years
old. Except for one issue this has been working great.  The problem is the
LPRINT statement, which I believe sends output to the parallel port.  I 
would
like to capture this output into a disk file.

At http://dosemu.org/docs/HOWTO/x246.html#AEN248 there is a section called
"How can I get the parallel ports to work?" which says

     The dosemu.conf has lines at the end to redirect printers to either
     lpr or a file.

On my computer these lines from /etc/dosemu/dosemu.conf seem to be what is
referred to:

##############################################################################
## Printer and parallel port settings

# Print commands to use for LPT1, LPT2 and LPT3.
# Default: "lpr -l", "lpr -l -P lpt2", and "" (disabled)
# Which means: use the default print queue for LPT1, "lpt2" queue for LPT2.
# "-l" means raw printing mode (no preprocessing).

# $_lpt1 = "lpr -l"
# $_lpt2 = "lpr -l -P lpt2"
# $_lpt3 = ""

# idle time in seconds before spooling out. Default: (20)

# $_printer_timeout = (20)

##############################################################################

However, these lines are not at all clear to me.  What changes are needed so
that lpt1 output goes to a disk file?

Thank you for your attention.

Roger House
Software Developer


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-01 23:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 14:46 How to redirect LPT1 output to a disk file? Peća Nešovanović
  -- strict thread matches above, loose matches on Subject: below --
2017-02-27 22:32 Roger House
2017-02-27 22:52 ` Stas Sergeev
2017-03-01 23:43   ` Roger House

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.