Open darkdragon-001 opened 5 years ago
environment variables need to be handled specifically in systemd services
You can specify environment variables for all systemd services in /etc/systemd/system.conf.d/myenvvars.conf
.
x11docker creates such a file and shares it with the container. Sample file content:
[Manager]
DefaultEnvironment=container=docker XAUTHORITY=/x11docker/Xclientcookie DISPLAY=:252 XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
All variables must be in one line. I don't understand this entirely, but it works.
Edit:
systemd
clears all environment variables set with --env
.
Alternatively, the image could be set up with runit
, dbus
and elogind
to allow --env
again.
runit
replaces systemd
and elogind
replaces systemd-logind
.
Basically Gnome 3 needs a logind service and DBus.
Edit2: Thinking again about this: Maybe not a great idea. elogind
needs a cgroup that needs either to be mounted on host or created in container with capability SYS_ADMIN
.
Dockerfile
to newly createdentrypoint.sh
.-geometry
(resolution) and-depth
(color depth) with environment variable intigervnc.service
(NOTE environment variables need to be handled specifically in systemd services)