I would like to, every 30 seconds or so, copy all text of a certain terminal or terminal emulator to a file, and display it in conky. I'm not talking about simple redirection (command > file), which doesn't work for ncurses programs or games such as NetHack.

How could I go about doing this?

  • if it's a console terminal, you can get the contents from /dev/vcs* – Jasen Nov 9 '15 at 8:57
  • That'll work! Is it possible to open more than the default 6 (or whatever your distro uses)? – IBPX Nov 9 '15 at 17:53
  • You want text, so the accepted screen answer is indeed right. But for others who land here looking for a graphic screenshot of a Linux console running without X or any GUI, there is fbgrab as suggested in askubuntu.com/a/558588/8822 – mivk Jan 9 '18 at 12:25

There is no portable way to ask a terminal emulator to do screen dumps. You can work around this by running your application in GNU screen or tmux and using them to carry out the screen-dumps.

GNU screen can do this:

Likewise, there is a plugin for tmux to do screen captures.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.