Add support for running a container using only a XvFB framebuffer for the X server

As requested by a user, this gives the option to run a headless steam for the purpose of downloading games and not for playing them.
This commit is contained in:
Josh.5
2022-02-08 08:03:56 +13:00
parent 73a4af0f5c
commit 168c46ae72
3 changed files with 28 additions and 18 deletions

View File

@@ -63,8 +63,10 @@ function configure_x_server {
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/xorg.ini
elif [ "${MODE}" == "fb" ] | [ "${MODE}" == "framebuffer" ]; then
echo "Configure container to use a virtual framebuffer as the X server"
# Disable supervisord script
# Disable xorg supervisord script
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/xorg.ini
# Enable xvfb supervisord script
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/xvfb.ini
fi
# Make startup script executable
chmod +x /usr/bin/start-xorg.sh

View File

@@ -0,0 +1,13 @@
[program:xvfb]
autostart=false
autorestart=true
priority=20
user=root
command=/usr/bin/Xvfb %(ENV_DISPLAY)s -screen 0 "%(ENV_DISPLAY_SIZEW)sx%(ENV_DISPLAY_SIZEH)sx24"
environment=DISPLAY="%(ENV_DISPLAY)s"
stopsignal=QUIT
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=7
stderr_logfile_maxbytes=10MB
stderr_logfile_backups=7