Hi Ryan,
Okay ... When you SSH, you aren't connecting to the container
namespace, but the host namespace. Take a look at:
https://github.com/sylabs/examples/blob/master/machinelearning/spark/spark.def
In that we're installing dropbear, and in the `%startscript`,
starting up dropbear on port 2222 . When you run 'instance start' it
will start the dropbear process. So then, when you then do:
ssh -X -p 2222 containers
You would connect to the container dropbear session, so you would be
in that instance namespace. Otherwise you're in the host namespace.
This behavior comes from our preference of integration over isolation.
We want to integrate better with the host resources, instead of being
isolated from them.
-J
On Wed, Apr 10, 2019 at 8:13 PM Ryan McCully <
rmccu...@gmail.com> wrote:
>
> Hi
>
> I've installed open-ssh on a Ubuntu 18.04 Docker image used with a Singularity container with the goal of forwarding X11 via SSH from the container to the host (running Ubuntu 18.04 Xfce).
>
> I've started my singularity container like so:
>
> singularity instance start --writable singularity-office container1
>
> SSH to the container works perfectly fine via the host's IP (ssh -X root@hostip) and an output is shown for 'echo $DISPLAY' of 'containers:13.0' ('containers' being the host's hostname).
>
> I then proceeded to run some GUI applications such as libreoffice (/usr/lib/libreoffice/program/soffice.bin --writer --splash-pipe=5 --norestore) with the expectation that the graphical interface would pop up on the host however it doesn't, no errors show inside the Singularity container suggesting the X11 forwarding is having issues, it's almost like it's going to another display somewhere.
>
> I'm aware you can forward X11 without SSH but my requirements mean it must be possible to forward remotely too hence why I'm trying this over SSH.
>
> Does anyone have any ideas? The same exact thing works perfectly with Docker for example over SSH.
>
> Singularityfile I built from:
https://pastebin.com/raw/1rkr9m7Z
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups "singularity" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
singularity...@lbl.gov.