Solved

Linux X screenshot using xwd

Posted on 2004-09-24
9
2,079 Views
Last Modified: 2013-12-27
I'm trying to get the console (X display) screenshot from remote machine.
usera is login on the console and use display 0.0.
I want to get his screenshot.
I'm login using ssh as root, trying to:

prompt> xwd -root -out screenshot.xwd -display 0:0
Xlib: connection to "0:0.0" refused by server
Xlib: No protocol specified
xwd:  unable to open display '0:0'

The same for:
prompt> xwd -root -out screenshot.xwd -display 127.0.0.1:0

Adding all  to the xhost list fail:
prompt> xhost +
xhost:  unable to open display ""
The system os in redhat 8 Linux.

Regards,
Addady
0
Comment
Question by:addady
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 25 total points
ID: 12141103
DISPLAY=:0.0 export DISPLAY
I'm not sure you've got you : and . correct
0
 
LVL 11

Expert Comment

by:griessh
ID: 12141783
liddler is right.

First step: set the DISPLAY variable on your target system: DISPLAY=:0.0 (:0 is the device, .0 is the screen)
Second step: xhost +

To enable a remote name by default, the name can be defined in the /etc/X?.hosts file, where ? is the display number to which you enable access.
0
 
LVL 20

Assisted Solution

by:Gns
Gns earned 25 total points
ID: 12194768
This is (as you correctly deduce) a problem related to the remote X seerver denying you access. There is no way for you to amend this other that to intruct usera to allow localhost access (blithely letting remotes "in" isn't recommeded.... at least not by me:-). Havi him/her do
xhost + localhost
in an xterm, then do the "localhost xwd" above.

-- Glenn
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:Gns
ID: 12548736
As far as I can see I'm correct here... Although liddler is right that the first instance of the xwd command (in the Q) has a flawed display specification, the second (127.0.0.1:0) is equivalent to setting it to :0 ... And since that doesn't work, one can surmise that root lacks the proper credentials. Ergo, Adaddy needs do what I say (for the running instance... and perhaps add an explicit xhost + localhost in a suitable X startup script),

-- Glenn
0
 
LVL 18

Expert Comment

by:liddler
ID: 12960302
Venabili,
I think this one has been missed in a cleanup
0
 
LVL 20

Expert Comment

by:Venabili
ID: 14362612
liddler ,

Yeah... And after that I reduced my work as a CV for a while...
Handled now :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question