LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-04-2010, 07:14 AM   #1
jsjones85
LQ Newbie
 
Registered: May 2010
Posts: 15

Rep: Reputation: 0
Question 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.
 
Old 06-05-2010, 03:53 AM   #2
fruttenboel
Member
 
Registered: Jul 2008
Location: Tilburg NL
Distribution: Slackware 14.2 ciurrent, kernel 3.18.11
Posts: 270

Rep: Reputation: 48
Quote:
Originally Posted by jsjones85 View Post
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.. )
 
Old 06-07-2010, 06:38 AM   #3
jsjones85
LQ Newbie
 
Registered: May 2010
Posts: 15

Original Poster
Rep: Reputation: 0
Are you saying it is a problem with my machine?
 
Old 06-07-2010, 07:26 AM   #4
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by jsjones85 View Post
Are you saying it is a problem with my machine?
He's saying you can use an Olympus *photographic camera*
 
Old 06-08-2010, 09:43 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

Last edited by theNbomr; 06-08-2010 at 09:44 AM.
 
1 members found this post helpful.
Old 06-09-2010, 04:31 AM   #6
jsjones85
LQ Newbie
 
Registered: May 2010
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks theNbomr! Xvfb is my ideal solution and I've checked that the screenshots work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Commanding The X server to take a .png screenshot through ssh? Infernal211283 Linux - General 11 06-27-2008 09:51 PM
Screenshot mohit dhawan Linux - Newbie 4 04-05-2005 03:25 PM
screenshot xviddivxoggmp3 Slackware 2 03-18-2004 07:34 PM
screenshot Deer Linux - Newbie 3 09-16-2003 11:55 AM
screenshot uttamsaxena Linux - General 4 07-26-2002 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration