0

How can I create a screenshot of a specific program such as a text editor with a basic hello world printing script in linux. I've looked at Imagemagick but that only seems to do the whole window or coordinates of a window.

I'm either looking for a way to get the coordinates of a program, then pass that to imagemagick or a way to do it simply with a python module.

1 Answers1

0

I think scrot is best for you.

scrot -u

this will get the screen shot of the current active window. if you need some time and get the screenshot then you can do like this like

sleep 2; scrot -u

this command will wait for 2 sec then take the screenshot.

NOTE: This command only take the current window which is focused on.

r4vanan
  • 51
  • 5