-
Notifications
You must be signed in to change notification settings - Fork 379
Display manager entry for x11docker
mviereck edited this page Jul 3, 2019
·
3 revisions
It is possible to run x11docker immediatly from display managers like lightdm
or sddm
.
Different setups are possible.
Note: Entries for display managers can be stored at two different locations:
-
/usr/share/xsessions
: For entries in this folder the display manager will provide an X server. -
/usr/share/wayland-sessions
: Entries in this folder have to set up the X server or wayland compositor on themselves.
This is the recommended setup.
- Create a file in
/usr/share/wayland-sessions
, e.g./usr/share/wayland-sessions/x11docker-xfce
with this content:[Desktop Entry] Name=x11docker/xfce (--xorg) Comment=Xfce in docker image Exec=/usr/local/bin/x11docker-xfce-xorg Terminal=false Type=Application
- Create a file
/usr/local/bin/x11docker-xfce-xorg
and make it executeable withchmod +x
:Note: It makes sense to specify the desired tty/vt with#! /bin/bash x11docker --xorg --desktop --gpu --vt=7 x11docker/xfce
--vt=7
or another vt number. You can switch between different ttys withCTRL+SHIFT+F1..F12
. -
Allow unprivileged users to run
Xorg
.
This setup is discouraged because it degrades container isolation due to limitations of option --hostdisplay
.
- Create a file in
/usr/share/xsessions
, e.g./usr/share/xsessions/x11docker-xfce
with this content:[Desktop Entry] Name=x11docker/xfce (--hostdisplay) Comment=Xfce in docker image Exec=/usr/local/bin/x11docker-xfce-hostdisplay Terminal=false Type=Application
- Create a file
/usr/local/bin/x11docker-xfce-hostdisplay
and make it executeable withchmod +x
:#! /bin/bash x11docker --hostdisplay --gpu x11docker/xfce