I tried taking screenshots with both
xpra screenshot and imagemagick, both fail (black screen with imagemagick, xpra: "screenshot: window 1 could not be captured
screenshot is empty and has not been saved (maybe there are no windows or they are not currently shown)")
Please specify your full command lines, OS, version, etc.. as per wiki/ReportingBugs. Does it work with a plain xterm? screenshot works fine here.
xpra start-desktop --resize-display=no --start="xrandr -s 1920x1080" --daemon=no --exit-with-children=yes --socket-dir=$HOME/.xpra --start-child="xterm"works
xpra start --resize-display=no --start="xrandr -s 1920x1080" --daemon=no --exit-with-children=yes --socket-dir=$HOME/.xpra --start-child="xterm"does not work
I switched to start as start-desktop was error when the child exited.
I got some weird output from the tool, so my manual info:
When I run start-desktop, then exit the child, the xpra server terminates as expected, but with exit code 1, and an error:
2018-07-06 11:42:32,584 child 'xterm' with pid 1166 has terminated 2018-07-06 11:42:32,584 all children have exited and --exit-with-children was specified, exiting 2018-07-06 11:42:32,585 Disconnecting client Protocol(unix-domain socket:/home/chrome/.xpra/85d3f5123030-0): 2018-07-06 11:42:32,586 server shutdown 2018-07-06 11:42:32,591 xpra client 1 disconnected. 2018-07-06 11:42:32,592 sound source stopping 2018-07-06 11:42:33,102 killing xvfb with pid 1107 2018-07-06 11:42:33,102 removing socket /home/chrome/.xpra/85d3f5123030-0 (II) Server terminated successfully (0). Closing log file. Xpra: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
I switched to start as start-desktop was error when the child exited. (..) When I run start-desktop, then exit the child, the xpra server terminates as expected, but with exit code 1, and an error:
"xpra screenshot" works fine for me with "start-desktop".
As for "start" mode, the windows are not mapped on the virtual screen unless they are also mapped on one of the client(s) if one is connected.
sync-xvfb does not change that, it only paints the virtual xvfb so that other tools can be used to take screenshots. (imagemagick, scrot, etc)
r19877 makes it possible to force the server to show all the windows even when no clients are connected, but you have to use dbus to call it and this requires finding out the dbus session address:
$ xpra start --start-child=xterm --exit-with-children :100 (..) $ xpra info :100 | grep DBUS_SESSION_BUS_ADDRESS env.DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Ktrg2L9DAk,guid=32fea6050ebf2535f534a7515b41c5bb $ DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Ktrg2L9DAk,guid=32fea6050ebf2535f534a7515b41c5bb \ qdbus --session --type=method_call org.xpra.Server100 /org/xpra/Server org.xpra.Server.ShowAllWindows $ xpra screenshot test.png :100 $ eog test.png
Please close if that works for you. Feel free to create a new ticket to make the "ShowAllWindows" call more user friendly, an "xpra control" command would do the job.
r19899 makes it easier to show all the windows, ie for
xpra control :100 show-all-windows xpra screenshot :100 test.png
I'm closing as fixed because things are working as intended and you have a way to make sure that the windows are visible for the screenshot.
There are beta build for stretch with these changes here: https://xpra.org/beta/.
Feel free to re-open if I've missed something.
I think it would be good to have these screenshot quirks somewhere documented? I can't find it anywhere. I will open a ticket for the other bugs I spoke about in this ticket
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1904