Skip to content

Erratic behavior on non-root setups #181

Description

@matebuteler

Describe the bug
The container does not support running as a non-root user when using X11 Forwarding to XWayland. This implies both running in Rootless mode and running with USER != 0 fail.

To Reproduce
Steps to reproduce the behavior:

  1. Download Docker in Rootless mode
  2. Run ./start_x.sh
    The container will start and then exit immediately, with "Cannot connect to DISPLAY :0" on Docker logs.

OR

  1. Download Docker in regular mode
  2. Start the container as USER. This fails as a user can't start a Docker container

OR

  1. Download Docker in regular mode
  2. Start the container as root. The container will fall back to X11 mode as it will not find the Wayland socket; I think XDG_RUNTIME_DIR might not be set.
  3. X11 mode will work but the container will be run as root with UID 0 and eda/designs folder owned by root.

Expected behavior
An xfce4-terminal pops up.

Environment:

  • OS: Linux
  • Operating mode: X11
  • Version tag: Tried with multiple versions, currently running from source

Additional context

** I found a simple workaround to make things work. On a non-rootless Docker install, adding sudo to the docker run command enables all variables and PARAMS to be solved as $USER, therefore starting the container with the relevant and correct environment vars (such as $XDG_RUNTIME_DIR -> /run/user/1000), while starting the container with USER=1000 (example) in a non-privileged fashion. **

I should try to run the container from a user inside the docker group, but my system doesn't include this feature for security reasons.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions