[winswitch] Xpra - Docker - Assistance request

Antoine Martin antoine at nagafix.co.uk
Sun Jan 8 07:19:59 GMT 2017


On 08/01/17 07:53, Ali Sadat via shifter-users wrote:
> Hi,
> 
> 
> I appreciate if you could assist me with the following question regarding
> use of xpra inside Docker containers.
> 
> As a part of one of my projects, I have to use xpra inside runc\docker
> containers to access GUI apps. (I understand this is not the best practice)
What makes you think that this is not "the best practice"?

> Xpra works perfectly inside containers, until I have to checkpoint and
> restore the container. It seems CRIU does not like the concept of
> unix-sockets inside containers and requires special IPC to be created
> between processes.
Then I'm not sure how you expect the X11 client applications to survive
the checkpoint and restore. And this would affect VNC the same way.
All X11 applications usually connect to the X11 server using unix domain
sockets (see /tmp/.X11-unix/. You could try switching them to TCP
sockets if that is better supported by the checkpoint code.

> I tried to follow the instructions provided by CRIU for
> VNC in link below. However, could not get xpra to work.
Please always try to provide details and in particular the specific
errors you encounter. "does not work" is not it.

> https://criu.org/VNC
This seems to be using regular displays with unix domain sockets.
So you will really need to clarify the problem(s) you encounter, and the
CRIU issues, if any, with the sockets.

> Tried other approaches too eg: SSH, TCP and... to avoid use of Display
> sockets, but there was not much success there either.
Xpra is a client of the X11 server (Xdummy or Xvfb), so it will also
connect using unix domain sockets.

> I am really stuck !!! and I am just wondering if you can help me with this
> or point me toward the right direction.
If it helps to use TCP sockets instead of unix domain sockets, then you
can try versions newer than this changeset:
https://xpra.org/trac/changeset/14729

And connect xpra to the X11 server using TCP.
Something like this (here for Fedora 25):

/usr/libexec/Xorg -noreset \
    -nolisten unix  -listen tcp \
    +extension GLX +extension RANDR +extension RENDER \
   -logfile /run/user/1000/xpra/Xorg.100.log \
   -configdir /home/antoine/.xpra/xorg.conf.d \
   -config /etc/xpra/xorg.conf :100 &
xpra start \
    --bind=none --bind-tcp=0.0.0.0: \
    --no-daemon --start=xterm \
    --use-display 127.0.0.1:100

> Is there any way to create an IPC been xpra and application inside
> container ?
Not sure what you mean.

> or exit xpra session before checkpoint and reconnect to exit-ed
> session after restore ? or...
I don't see why that wouldn't work.

Cheers
Antoine

> 
> Thanks
> 
> Ali
> _______________________________________________
> 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