Screen shot in unix

In Windows, the [PrintScreen] key gets a screen shot (the current image on the screen).
How do you do the same in Unix?

I'd be interested especially in an answer which covers most flavours of Unix.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Unix doesn't have anything like the "print screen" key (at least I've never seen one that did). Solaris' CDE has something close that allows you to mark text and drag it onto the printer icon on the task bar. Every X implementation on Unix has a way to generate a snapshot of the screen or any portion of the visisble screen. The utilities for doing so are platform dependent, check the docs for your platform to see how it does it.
Vin32Author Commented:
Sorry, jlevie, I just want other inputs... if I do find your answer correct later, you can have the points.
Vin32Author Commented:
I am woking primarily on SCO OpenServer 5.0.5, by  the way.
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Assuming you're running X Windows, you can use the xwd utility to dump all or part of the screen.  You can then use xpr  to transform the resulting XBM into a printable format such as PostScript.

Something like this:

  xwd -root | xpr -device ps -height 10 -width 7.5 -top .5 -left .5 | lp

See the xwd, xpr, and lp man pages for full details.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If you have posibility to run the unix thru a PC with "exeed" or something similar, then you can take the screenshots in the PC instead.
That's what I do.
(don't know any method in unix directly)
Vin32Author Commented:

Thanx, chris_calabrese! That does work, but my application was a command line utility launching forms with some enterable fields. I wanted a screen shot of it in command line mode, not in X-Windows.
The screen shots are needed for making the users' manual.
I give you the points because it nevertheless increased my knowledge.

And jlevie, this was much more specific than your comment.

But tryno also has a valid point there which I had already thought of. The problem there is this : you have to edit the screenshot images to remove the extra window (of "exceed" or other such). That is quite a bit of work when you consider many screens.

Anyway, thanx once again to all of you!
Instead of doing 'xwd -root', you can do 'xwd', which then lets you click the mouse on an individual window to dump.
Vin32Author Commented:
Thanks, but i've already explored the options in the man pages.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.