Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 -

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

You must log in to answer this question.