Operating System - HP-UX
1752292 Members
4529 Online
108786 Solutions
New Discussion юеВ

How to take a screenshot and save it to a file.

 
SOLVED
Go to solution
Mark Stewart
Frequent Advisor

How to take a screenshot and save it to a file.

I am running a program under HP-UX 11.x and need to take a screen shot of one of the program's windows. Even getting a screenshot of the entire screen would suffice. Is there a way to do this under HP-UX? What command would I use? Also, is there a place I can paste it to and save it as a file somehow?

Thanks!
10 REPLIES 10
Paul Sperry
Honored Contributor
Solution

Re: How to take a screenshot and save it to a file.

xwd - dump an image of an X window

Xwd is an X Window System window dumping utility. Xwd allows X users
to store window images in a specially formatted dump file. This file
can then be read by various other X utilities for redisplay, printing,
editing, formatting, archiving, image processing, etc. The target
window is selected by clicking the pointer in the desired window. The
keyboard bell is rung once at the beginning of the dump and twice when
the dump is completed.
James R. Ferguson
Acclaimed Contributor

Re: How to take a screenshot and save it to a file.

Hi Mark:

# script -a myscreen

See the man pages for 'script' for more information.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: How to take a screenshot and save it to a file.

Well it makes a big difference if this is X or simply a terminal. If X then xwd is your boy; if a terminal the you can use tee to copy the stdout or the script command can prove very useful.

Of course, your other option is to use one of the advanced operating systems and run a terminal emulator or an X server like Reflection X and then copying the snapshots is easy.
If it ain't broke, I can fix that.
Leif Halvarsson_2
Honored Contributor

Re: How to take a screenshot and save it to a file.

Hi,
There is a user-friendly version of xwd,
/opt/screencapture/bin/capture
Caesar_3
Esteemed Contributor

Re: How to take a screenshot and save it to a file.

Hello!

You can dump the X with xwd command will save
in X format.
You can download xv and use the capture there
download from : hpux.connect.org.uk

Caesar
Martin Johnson
Honored Contributor

Re: How to take a screenshot and save it to a file.

You can also try /usr/contrib/bin/xxprint if it is on your system.

HTH
Marty
Tom Ward_1
Honored Contributor

Re: How to take a screenshot and save it to a file.

Since no one mentioned it, if you're running Exceed on a PC for your X server, you can just get focus in the X appplicaiton and use Alt-Print Screen to get a copy. Then paste it into Word or Paint. Not all applications will take the graphic buffer. Netscape works for me, but Mozilla does not.
Mark Stewart
Frequent Advisor

Re: How to take a screenshot and save it to a file.

Ok, I have Xwd on my system and it appears to be doing its job (heard the beeps). Now, where is it "dumping" the screen to? Or I guess a better question is, how can I access the image it grabbed? Is there another specific X related command for this?
A. Clay Stephenson
Acclaimed Contributor

Re: How to take a screenshot and save it to a file.

Unless you used a -out myfile parameter, xwd dumps to stdout.
If it ain't broke, I can fix that.