in computers/default/docker.py [0:0]
def screenshot(self) -> str:
"""
Takes a screenshot with ImageMagick (import), returning base64-encoded PNG.
Requires 'import'.
"""
# cmd = (
# f"export DISPLAY={self.display} && "
# "import -window root /tmp/screenshot.png && "
# "base64 /tmp/screenshot.png"
# )
cmd = (
f"export DISPLAY={self.display} && "
"import -window root png:- | base64 -w 0"
)
return self._exec(cmd)