1

I want to capture the screenshot of a remote computer using paramiko. I am using the following code for that

import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('10.93.80.63', username='root', password='bohica')
ssh.exec_command("xwd -display :0 -silent -root > myscreen.xwd")
ssh.close()

The issue is that the file myscreen.xwd is created but the size is 0. Could you please let me know how I can capture the screenshot.

4

1 回答 1

0

Resolved this issue. The issue was that xwd was not executable and was not in the standard path. Resolved this issue by moving xwd to the standard path.

于 2012-11-22T10:35:12.650 回答