I tried using
DISPLAY=:0 import -window root "$HOME/Pictures/screenshot.png" (
import is part of the ImageMagick suite), but that just displays a black screen.
I want to do this as I wanted to automate opening an app and taking screenshots of it in different languages, and to change languages, I need to restart lightdm. therefore, run on a tty so your script continues running...