LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to take a screenshot of a tty without actually being in that tty? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-take-a-screenshot-of-a-tty-without-actually-being-in-that-tty-877093/)

trusktr 04-26-2011 01:59 AM

How to take a screenshot of a tty without actually being in that tty?
 
If I'm in tty1, is it possible to take a screenshot of tty2?

If I'm in tty1, can I take a screenshot of tty7 (which has xorg running in it)?

micxz 04-26-2011 02:08 AM

I don't think you can. But why not just redirect the >output to a file.

colucix 04-26-2011 02:29 AM

Actually you can take a snapshot of a running X server from a virtual console using an application that let you specify the DISPLAY, as in this tip. Unfortunately using the same method you can't capture a virtual console, since it does not run X.

Anyway, if you're interested only to the text written in the console, you can access it directly by means of the special devices /dev/vcs1.../dev/vcs7, but they require root's privileges, e.g.
Code:

# cat /dev/vcs1 | some parsing and reformatting code here > tty1.txt

trusktr 04-27-2011 12:46 AM

Cool, nice tips guys!


All times are GMT -5. The time now is 10:57 AM.