LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2008, 03:13 PM   #1
tanuki33
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
Angry Dumping Gnome Terminal Buffer to a text file


Hi All,
I have run into a rather odd problem. I simply want to be able to dump the screen buffer from gnome-terminal like I can from a virtual terminal with screendump. It turns out it is not so simple.
After discovering I could not use screendump for say, /dev/pts/0, my first inclination was to redirect the command using (command >file 2>&1). Because the program dynamically updated the screen the file grew quickly and was full of command codes and just garbled in general. Using sed or grep did not help to keep it all straight. The tee utility did not help either.
Does anyone know of a way to simply dump the contents of a gnome-terminal into a text file?
arrrg!!
 
Old 01-21-2008, 03:40 PM   #2
droxim
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Rep: Reputation: 0
You could try a utility called 'script'. Once the 'script' command is started it dumps all input and output from the current terminal to a file called typescript. Use Ctrl-D to end the session.
 
Old 01-21-2008, 04:12 PM   #3
tanuki33
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Same thing as tee. Thanks though.

Quote:
Originally Posted by droxim View Post
You could try a utility called 'script'. Once the 'script' command is started it dumps all input and output from the current terminal to a file called typescript. Use Ctrl-D to end the session.
I tried it just in case but it does the same thing as tee. What I need is something to capture the buffer after the program is run.
I am looking into <sys/ioctl.h> now to see if this will do what I want. Something to do with the video buffer. should be "fun"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create text file from terminal acidjuice Linux - Software 8 09-03-2010 03:46 AM
Problems dumping raw text to lpt port lsutiger Linux - General 1 08-18-2007 02:53 PM
config file for gnome terminal [ubuntu] ZiTriX Linux - Newbie 2 11-25-2006 08:42 PM
gnome-terminal command history file?? kushalkoolwal Debian 1 03-07-2006 06:39 PM
Squid dumping text to sreen Palula Linux - Software 2 11-24-2005 09:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration