I want to do a simple full screen capture from a bash script in ubuntu. This:
import -window root screen.png
from imagemagick worked fine, untill--- I switched to a laptop with an external display connected. Now the captured image is not what is shown on the screen, but instead it shows the different windows. Is there a way to control this behavior of import
, or do I need another tool?
Edit:
It is very important for me that no mouse-click is needed, as the script is run without human interaction.
Edit:
The real problem is not what I original thought, but it is an error of import
- It can not handle maximized or minimized windows correctly.
Specifying display and window will remove the need for mouse click:
import -display :0.1 -window root -colorspace RGB -quality 80 screendump.jpg
Tell it to use a specific screen.
import -display :0.1 ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With