help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Send command to printer


From: Leonid Isaev (ifax)
Subject: Re: Send command to printer
Date: Sat, 21 Aug 2021 20:38:06 +0000
User-agent: Mutt/1.13.4 (2020-02-15)

On Sat, Aug 21, 2021 at 03:27:14PM -0400, Greg Wooledge wrote:
> If you're trying to mock up a Teletype purely in software, I should
> imagine it's more of a terminal-side thing than a shell-side thing.
> Perhaps you should look into finding a terminal emulator which can
> dump a transcript of the session to a printer.  Or perhaps one of
> the terminal multiplexer packages (tmux, screen, and commercial variants
> such as FacetTerm) can do it.

Would something like this work? From "man 1 xterm":
-----8<-----
       print-everything(printer-flags)
               This action sends the entire text history, in addition to the
               text currently visible, to the program given in the
               printerCommand resource.  It allows the same optional
               parameters as the print action.  With a suitable printer
               command, the action can be used to load the text history in an
               editor.
----->8-----

An example ~/.Xresources snippet:
-----8<-----
XTerm*printerCommand: xterm -fa "DejaVu Sans Mono:size=12:antialias=true" \
        -fg lightblue -T history -e /bin/bash -c '/usr/bin/less -r <&3' 3<&0
XTerm*VT100.translations: #override \
        ...
        Ctrl Alt <Key>H: print-everything() \n\
        ...
----->8-----

HTH,

-- 
Leonid Isaev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]