[winswitch] Proper way of determining when an XPRA server is ready

Antoine Martin antoine at nagafix.co.uk
Mon Oct 5 08:23:06 BST 2015


On 04/10/15 20:07, Timothy Hobbs wrote:
> What is the proper way of programatically finding out if the XPRA
> server is ready for clients to connect to it?
>
> Right now, subuser waits for the xpra socket to exist, but apparently
> that doesn't work.
>
> https://github.com/subuser-security/subuser/issues/224
>
> Is waiting for the xpra server to write |"||xpra is ready." a valid
> method?
It is.
Not very elegant, but this is also used by winswitch so we'll try not to
break it.
>
> |Basically, what subuser does, is it first launches xpra server in a
> container, then it launches xpra client in a container, and then it
> launches an application in a third container and gives that
> application access to the xpra server's x11 server.
You should be able to run a command line client and check for the return
code.
xpra version :10; echo $?

The default socket timeout is 10 seconds, which may be a little high
when polling if it ever needs to reach this timeout value (it doesn't
seem to with local unix domain sockets when I try).
You can change this timeout with:
XPRA_SOCKET_TIMEOUT=N xpra ...

Cheers
Antoine

>
> Thanks for your advice,
>
> Timothy Hobbs - author of subuser
> _______________________________________________
> shifter-users mailing list
> shifter-users at lists.devloop.org.uk
> http://lists.devloop.org.uk/mailman/listinfo/shifter-users





More information about the shifter-users mailing list