X11docker: Run multiple applications in a container without --desktop

Created on 13 Jan 2021  路  4Comments  路  Source: mviereck/x11docker

Is it possible to use x11docker to emulate the behaviour of qubes in Qubes OS, where a single container runs multiple applications? From #91 I know of the option of adding window decorations to distinguish between different containers. But it seems I only have the opportunity to run a single application in a container in seamless mode, or a full desktop environment with --desktop. What I want is something in-between where the full desktop environment is run "under the hood", where multiple applications can be started, but each will show up as a window in the host OS.

question

Most helpful comment

Just one further idea that might be useful in some cases:
You can run additional container applications with docker exec.
Example:

x11docker --name=lxde x11docker/lxde lxpanel &
sleep 20
docker exec lxde lxterminal

or:

read id < <(x11docker --showid x11docker/lxde lxpanel)
docker exec $id lxterminal

All 4 comments

You can run a panel or some other sort of launcher in a container.
For example, I have an Xfce desktop on host with the Xfce panel on top.
If I run x11docker x11docker/lxde lxpanel, I get a containerized LXDE panel at the bottom.
From this panel I can run arbitrary container applications.

I'd say that x11docker supports running multiple applications regardless of the --desktop option. The point is the entrypoint you use. If your entrypoint is a single application, that's what you get. The proposal by @mviereck does indeed start one single app (lxpanel). Anyway, if you start a container with x11docker in interactive mode, then you can run as many GUI apps as you want and all of them will be shown. You might probably do it in the start command (without interactive mode) too: x11docker [OPTIONS] IMAGE sh -c 'app_1 &; app_2 &; app3 &;'.

Thank you both for your swift replies. I believe both approaches would serve my intended purpose.

Just one further idea that might be useful in some cases:
You can run additional container applications with docker exec.
Example:

x11docker --name=lxde x11docker/lxde lxpanel &
sleep 20
docker exec lxde lxterminal

or:

read id < <(x11docker --showid x11docker/lxde lxpanel)
docker exec $id lxterminal
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mviereck picture mviereck  路  6Comments

sotnikov-link picture sotnikov-link  路  3Comments

vincent-163 picture vincent-163  路  9Comments

pahansen95 picture pahansen95  路  7Comments

sandrokeil picture sandrokeil  路  3Comments