How to take a screenshot of a window that is not visible in batch mode?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Sorry - The last post is a manual technique, but the OP appears to want an unattended scriptable solution.
Yes, exactly. I don't want to perform any mouse clicks on a window to take the screenshot of it, I just want to pass its id to a screenshot taking tool. Again, it should happen in another workspace, not the active one, fully in background. And it should not interfere with the currently active workspace or any windows from it.
The problem is that when window is in another workspace, it's not displayed so its pixels are not in current display memory. At this point no screenshot can be made until you switch to the workspace when window resides and the pixel are drawn to the screen
The problem is that when window is in another workspace, it's not displayed so its pixels are not in current display memory. At this point no screenshot can be made until you switch to the workspace when window resides and the pixel are drawn to the screen
I can understand this. But since the window is still alive, its content must be somewhere in memory, no?
Data content yes but to get a graphical view you have to draw lines, colors, points etc on screen
I mean screenshot programs don't draw from evaluated data, they copy screen pixels in a file
Screen capture programs assume that they need to access the active buffer.
So in my dual monitor setup I can access the active buffer on the alternate display.
With a single screen, the only method that I can conceive that could create an alternative active buffer would be to use Xnest to create a second Xserver.
I have played with Xnest, but cannot offer any advice for this use case.
Another idea would be to put the window temporarly in the same workspace but under a background image which would give the illusion of a non visible window
Very interesting, could you please test if it works the opposite way? I mean, run the screenshot software in Xephyr and see if you can capture a screen from main session. I will definitely test this too soon, but I'm concerned since I've read that running apps like OpenGL ones in Xnest/Xephyr may have performance penalties. So perhaps it's possible to run the screenshot software in another session, not the app that generates window that needs to be screenshotted.
from a terminal in the Xephyr session only works if the window to be captured from the primary display is in the same workspace as the Xephyr session.
The attached screenshot may clarify.
@FlinchX, just curious did you try the commands in post #2 ?
It's my highest priority pet project for this weekend, hopefully I will provide feedback until the weekend is over, on your suggestion and the one about using Xephyr. Sometimes it takes a few days, but I value the help I get in this forum and I always try to provide feedback to people who spend their time trying to help me. You can see it from my post history.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.