1

I cannot understand the examples in manual:

`lpr' or `cat > /tmp/scrprint'.

How can you use the ":printcmd"-command in GNU Screen? How can use the command to print the Stdout with lpr? Please, have examples.

  • What is your question exactly? – random Nov 7 '09 at 13:23
2

The printcmd in GNU screen defines the command called when the ANSI escape sequence ESC[5i is called. This is the vt100 sequence for "start print log". Check out the URL for a list of the sequences - http://ascii-table.com/ansi-escape-sequences-vt-100.php.

It is defined in your .screenrc as a configuration variable and doesn't actually do any printing.

Calling it without any arguments will display the current command assigned. It cites as examples 'lpr' and 'cat' which will feed to the unix line printer protocol and cat to a file respectively.

If I want to capture the full STDOUT of a command I find it easier to run script then feed the typescript (or whatever file you specified) to the appropriate printing utility, whether it be lpr or another printing utility.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy