Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.