LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 11-20-2007, 11:54 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Fedora ,Open Suse
Posts: 122
Thanked: 0
how to take snapshot in linux from terminal


[Log in to get rid of this advertisement]
I want to take a screen shot on a linux terminal by a shell script and also want this script to be run by a php script is there any way to do this
tkmsr is offline     Reply With Quote
Old 11-20-2007, 12:52 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,495
Thanked: 6
When you say screen shot, do you mean text-mode screen dump (i.e. a text file containing what is visible on the tty), or a graphical screenshot?

Is the PHP interpreter running in the terminal, or as a separate process (e.g. run by a web server?)

Assuming the answer to those question are "graphical" and "separate process", here's how to do it:

The traditional X-Windows way to save a screenshot of a window is with the xwd program. Usually this program has the user select the window to dump using the mouse, but you can also specify it using the X window ID.

The overview of the process is therefore like this:
  • Get the window-id of the terminal
  • Call xwd for the window-id
  • Post process dump file (e.g. translate to a format like png)

The trick will be getting the window-id...
matthewg42 is offline  
Tag This Post , ,
Reply With Quote

Reply

Bookmarks


Thread Tools

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
snapshot of installation open diameter on linux redhat 9 tufailfifa Programming 1 12-19-2006 09:00 AM
LXer: Snapshot of the embedded Linux market -- May, 2006 LXer Syndicated Linux News 0 05-27-2006 05:21 AM
How to snapshot and restore Linux? yitzhakbg Linux - Software 0 12-14-2004 11:37 AM
Linux - File Snapshot-Tool kgk Linux - General 2 08-14-2003 04:30 AM


All times are GMT -5. The time now is 12:01 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration