LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-17-2011, 09:22 AM   #1
laredotornado
Member
 
Registered: Apr 2011
Posts: 71

Rep: Reputation: 0
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
 
Old 05-17-2011, 03:53 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,137

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
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.
 
Old 05-18-2011, 03:49 AM   #3
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
Use ImageMagick:

Quote:
$ /usr/bin/import -display localhost:15.0 -window root screenshot_filename.jpg
 
Old 05-18-2011, 10:40 AM   #4
laredotornado
Member
 
Registered: Apr 2011
Posts: 71

Original Poster
Rep: Reputation: 0
Thanks for the replies. The xwd worked for me. Sadly, the ImageMagick command only generated blank screens. - Dave
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to take a screen shot? galapogos Mandriva 10 03-25-2009 09:42 PM
How do you take a screen shot? soulwatcher1974 Linux - General 2 02-17-2005 10:37 PM
Using IMAGEMAGICK How To Screen Shot bpellet314 Linux - Software 2 11-17-2004 04:29 PM
How do I take a Screen Shot podollb Linux - Software 6 10-14-2003 03:43 AM
screen shot enzo250gto Linux - General 2 10-28-2001 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:01 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