How do I capture a screen with xwd?
by lucmove from LinuxQuestions.org on (#566KY)
I need to capture a window with xwd:
$ xwd -out /home/me/dump
I run it, I get a crosshair pointer, click on the target window and the screenshot is dumped. I can view it with xwud.
Now, I need to do that non-interactively.
$ xprop WM_NAME
I get a crosshair pointer, click on the target window and the output tells me:
WM_NAME(STRING) = "Name of application"
So I run:
$ xwd -name "Name of application" -out /home/me/dump
Then I try to view it with xwud and the result is a completely black screen. There seems to be a thin gray frame around it.
What am I doing wrong?


$ xwd -out /home/me/dump
I run it, I get a crosshair pointer, click on the target window and the screenshot is dumped. I can view it with xwud.
Now, I need to do that non-interactively.
$ xprop WM_NAME
I get a crosshair pointer, click on the target window and the output tells me:
WM_NAME(STRING) = "Name of application"
So I run:
$ xwd -name "Name of application" -out /home/me/dump
Then I try to view it with xwud and the result is a completely black screen. There seems to be a thin gray frame around it.
What am I doing wrong?