Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run multiple applications in a container without --desktop #317

Closed
hrjakobsen opened this issue Jan 13, 2021 · 4 comments
Closed

Run multiple applications in a container without --desktop #317

hrjakobsen opened this issue Jan 13, 2021 · 4 comments
Labels

Comments

@hrjakobsen
Copy link

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.

@mviereck
Copy link
Owner

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.

@eine
Copy link
Contributor

eine commented Jan 13, 2021

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 &;'.

@hrjakobsen
Copy link
Author

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

@mviereck
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants