From Robert Ancell:
"When the greeter quits (i.e. closes the X connection) all the resources of that client are removed (i.e. X windows). So what happens is the root window reverts to its default background.
What Unity Greeter (and GDM) does is to set the root window to be a Pixmap (an X primitive) that shows the background of the user. So you have to mark the X connection that has the Pixmap as "RetainPermanent" so its resources stick around. You have to be careful not to leave anything else around except the pixmap (and I think the session has to explicitly destroy the pixmap so that isn't leaked).
Why not just keep the greeter there? It was my original attempt,
however the window manager starting up and just generally everything
changing this can interact badly with your greeter application.
There's some code for indicating to the greeter when to close, and
this can still be connected up. Perhaps you can get [Gala] to
handle this better, but I'd recommend you set the background and quit
the greeter as it gets messy anyway."
Supposedly the vala code for this already exists in Unity Greeter, so we can just steal it ;D
Bounty on Bountysource https:/ /www.bountysour ce.com/ issues/ 445987- set-root- window- as-pixmap- with-retainperm anent