LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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

Reply
 
Search this Thread
Old 11-20-2007, 11:54 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
how to take snapshot in linux from terminal


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
 
Old 11-20-2007, 12:52 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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...
 
  


Reply

Tags
screenshot, xwindows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:08 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration