Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
What is your question exactly? –  random Nov 7 '09 at 13:23

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.