LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to take a screenshot from another X server (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-take-a-screenshot-from-another-x-server-812123/)

jsjones85 06-04-2010 07:14 AM

How to take a screenshot from another X server
 
Hi, I started a second X server and I am trying to take a screenshot of the original display from the second X server. This is what I have tried

import -window root -display :0 screenshot.png

If I run this from display :0 then all is fine, but if I run it from display :1, then I get an image that is almost all black (a few icons in the upper right shows up - namely the volume, laptop battery status, and wireless connection status - but that's it).

Can someone please tell me what I am doing wrong?

Thank you very much for your help.

fruttenboel 06-05-2010 03:53 AM

Quote:

Originally Posted by jsjones85 (Post 3992314)
Hi, I started a second X server and I am trying to take a screenshot of the original display from the second X server. This is what I have tried

import -window root -display :0 screenshot.png

If I run this from display :0 then all is fine, but if I run it from display :1, then I get an image that is almost all black (a few icons in the upper right shows up - namely the volume, laptop battery status, and wireless connection status - but that's it).

Can someone please tell me what I am doing wrong?

Thank you very much for your help.

Olympus make very fine equipment for this.. :o)

jsjones85 06-07-2010 06:38 AM

Are you saying it is a problem with my machine?

HasC 06-07-2010 07:26 AM

Quote:

Originally Posted by jsjones85 (Post 3995233)
Are you saying it is a problem with my machine?

He's saying you can use an Olympus *photographic camera*

theNbomr 06-08-2010 09:43 AM

To me, this sounds like a bug, somewhere. In principle, I see nothing wrong with what you are trying to do, and that you get something captured suggests that your method is at least mostly right. What is the nature of your two X server setup? Are both X servers displaying concurrently, or is one of them 'backgrounded' (probably incorrect jargonolgy) while the other occupies the screen? I don't know exactly what your end goal is, but perhaps you can use an X virtual frambuffer, Xvfb as your second X server. It never displays on a screen, but does satisfy the requirements of X clients. Xvfb was developed for the purpose that it sounds like you're after.
One question that I had when I first read your post was about ownership of the X servers, and of the processes using the server(s). Not too sure how that matters exactly, but I feel certain that if the same uid owns both servers, you would stand a better chance of success. The question of X server authorization/security might come into play, I suppose. Sorry for being a bit vague; I'm kind of spitballing on that last part.

--- rod.

jsjones85 06-09-2010 04:31 AM

Thanks theNbomr! Xvfb is my ideal solution and I've checked that the screenshots work.


All times are GMT -5. The time now is 09:56 AM.