[winswitch] "Simultanuous" start/upgrade

Antoine Martin antoine at nagafix.co.uk
Sun Nov 30 07:30:37 GMT 2014

On 29/11/14 22:20, Lukas Haase wrote:
> Hi,
> Unfortunately xpra is not so stable for me :-( - in two ways:
> 1.) Sometimes something on the client goes wrong and manually doing "xpra upgrade" helps
> 2.) Often xpra on the server crashes but leaving the X-server intact s "xpra upgrade" is possible.
If you report those, then we can fix them.
Since we're not aware of crashes, I suspect it may well be platform or
configuration specific problem you're hitting.
There is only one known issue in 0.14.x that can cause crashes, and
disabling sound and/or clipboard avoids it.
Client-side issues are usually opengl, sound or clipboard related -
which can be worked around.
> My plan is to create a script that I run within screen and does the following:
> 1.) Starting xpra with a certain child. If the session already exists, upgrade
> 2.) Only if the child exits, the script should exit
> 3.) Otherwise (e.g., xpra crashes), xpra upgrade should run in a loop.
> Would xpra provide "xpra upgrade-or-start :1111" this would be cheesy :-)
We don't normally do band aids, but this feature could be useful on its own.
> Other than that I am asking myself what is the best way to achieve it otherwise. My current idea is:
> xpra start :1111 --no-daemon --session-name=MATLAB --no-mdns --start-child="/opt/matlab/bin/matlab -desktop" --exit-with-children
> if [ $? -eq 0 ]
> then
>         echo "xpra exited with status 0. Exiting ..."
>         exit 0
> fi
> while true
> do
>         echo xpra died, doing upgrade ...
>         xpra upgrade :1111 --no-daemon --session-name=MATLAB --no-mdns --start-child="/opt/matlab/bin/matlab -desktop" --exit-with-children
>         if [ $? -eq 0 ]
>         then
>                 echo "xpra exited with status 0. Exiting ..."
>                 exit 0
>         fi
>         echo "xpra exited with nonzero status, re-running the loop ..."
>         sleep 3
> done
Implementing upgrade-or-start is probably easier than that, and more
importantly, reliable.
> Can I be sure that xpra returns 0 only if the child exited and nonzero otherwise (=crash, unexpected exit, ...)?
There is a ticket for that.
> Is it better/more stable to query a session with something like "xpra list | grep :1111" and the do either start or upgrade?
> How do I best implement the behavior that the script upgrades if it is ran twice and continues the loop but starts if it not?
If you really want to script it, you can just use:
xpra version :1111
And check the exit code.

> Thanks for creative suggestions
> Lukas
> _______________________________________________
> 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