User A is using Ubuntu desktop. I want to SSH remotely (as User A) and take a screenshot of the desktop from the terminal.


A very quick google search shows up a lot of answers for how to do this.

Most of them are something like this command:

xwd -out screenshot.xwd -root -display :0.0

For example: https://superuser.com/questions/224875


Install scrot, and run the following command line when logged in remotely via ssh (in Ubuntu desktop 18.04.1 LTS),

DISPLAY=:0 scrot

and the dumpfile will be written in the current directory (in the server), like


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.