Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Print Screen on keyboard works in Windows. I havent tried it in Linux.
Registered linux user #467324
ALL HUMAN ACTIONS ARE EQUIVALENT...............................
AND ALL ARE ON PRINCIPLE DOOMED 2 FAILURE
The question is - do you want to make an x-windows screen dump, or just capture the input and output of a terminal session?
For a screen dump of x-windows, both gnome and kde have scren capture programs. ksnapshot is the one usually installed with KDE. I don't remember the gnome one now, perhaps someone else can furnish you with the name.
Failing that you can use the command line tool xwd (x-window-dump). See the xwd manual page for more details.
For saving the text output of a terminal session you also have several options.
Use script. This saves the input and output of a shell to a file, e.g.
Then perform any actions you with to log, and finally press control-D to end the script session.
Start a screen session, do what you want to do, and then press control-A h to write a "hardcopy" of the screen to a file.
If you are using a Linux VT (i.e. not running X), use gpm to enable mouse copy-paste.
If you are using an xterm or other, just copy paste to a file.
In linux, if you want a screen dump of a virtual console (e.g., tty1), you can use the character vcs chardevs. Upon a read they output virtual console memory. No linebreaks are present, so you will either have to know the console’s column width or just use the same column width when reading.
cat /dev/vcs1 > screendump
Or if you want to force linebreaks for an 80-char terminal
fold -w 80 /dev/vcs1 > screendump
I can do this kind of thing from an ssh session to a server whose console I cannot physically see.
thanks for your answer but with "cat /dev/tty1 > /var/tmp/console" capture only the text when press key not error/information output from host. If use a script or screen the login is open. I want capture monitor output of the console for error and information messages.