LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How do I take a screen shot of a XWindow? (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-take-a-screen-shot-of-a-xwindow-881210/)

laredotornado 05-17-2011 09:22 AM

How do I take a screen shot of a XWindow?
 
Hi,

I'm using Ubuntu 11.04. In a startup script, I have

Code:

start() {
        log_daemon_msg "Starting selenium-server server: "
        export DISPLAY=localhost:15.0
        /usr/bin/Xvfb :15 -ac -screen 0 1024x768x16 &

From the console, how do I take a screen shot of the display at localhost:15.0 -- my DISPLAY above?

Thanks, - Dave

smallpond 05-17-2011 03:53 PM

Code:

xwd -display localhost:15.0 -out /tmp/desk.xwd -root
xwd format isn't readable by everything but can be converted by common graphics programs like the Gimp.

zordrak 05-18-2011 03:49 AM

Use ImageMagick:

Quote:

$ /usr/bin/import -display localhost:15.0 -window root screenshot_filename.jpg

laredotornado 05-18-2011 10:40 AM

Thanks for the replies. The xwd worked for me. Sadly, the ImageMagick command only generated blank screens. - Dave


All times are GMT -5. The time now is 03:08 PM.