Add an explicit switch to signal fake uinput devices.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Make sure the child is able to connect to the X server before exiting the mainline.

This allows the vdagent to be used in the Xsetup phase of an xdm session;
otherwise, it's X11 connection fails because of the greeter display grab.

The issue is that we daemonize before attempting the X connection.
We then immediately exit the main process; xdm then goes on to invoke the
greeter which performs an exclusive grab on the X server, so the child
connection fails.

The change is to have the main process wait for up to 10 seconds for an 'all clear'
message from the client.  This lets us return a correct status on a real X
error, as well as letting our child successfully connect to the X server.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Add an option such that the daemon will exit after processing a single session.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Reply to TIMESTAMP requests

Add TIMESTAMP handling,
This is to please vncviewer.

https://bugzilla.redhat.com/show_bug.cgi?id=1117764
Handle STRING selection type

This is to please vncviewer.

https://bugzilla.redhat.com/show_bug.cgi?id=1117764