diff --git a/.docker/files/chromium/supervisord.conf b/.docker/files/chromium/supervisord.conf index 459472e1..da86a77b 100644 --- a/.docker/files/chromium/supervisord.conf +++ b/.docker/files/chromium/supervisord.conf @@ -2,7 +2,7 @@ # https://peter.sh/experiments/chromium-command-line-switches/ --no-sandbox [program:chromium] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" -command=/usr/lib/chromium/chromium --window-position=0,0 --window-size=%(ENV_SCREEN_WIDTH)s,%(ENV_SCREEN_HEIGHT)s --display=%(ENV_DISPLAY)s --start-maximized --bwsi --test-type --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage +command=/usr/lib/chromium/chromium --window-position=0,0 --display=%(ENV_DISPLAY)s --start-maximized --bwsi --test-type --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage autorestart=true priority=800 user=%(ENV_USER)s diff --git a/.docker/files/firefox/supervisord.conf b/.docker/files/firefox/supervisord.conf index db3ce1a4..312ef888 100644 --- a/.docker/files/firefox/supervisord.conf +++ b/.docker/files/firefox/supervisord.conf @@ -1,7 +1,7 @@ [program:firefox-esr] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" -command=/usr/lib/firefox-esr/firefox-esr --display=%(ENV_DISPLAY)s --setDefaultBrowser -width %(ENV_SCREEN_WIDTH)s -height %(ENV_SCREEN_HEIGHT)s +command=/usr/lib/firefox-esr/firefox-esr --display=%(ENV_DISPLAY)s -setDefaultBrowser -width 1280 -height 720 autorestart=true priority=800 user=%(ENV_USER)s diff --git a/.docker/files/supervisord.conf b/.docker/files/supervisord.conf index afdf7878..b132c556 100644 --- a/.docker/files/supervisord.conf +++ b/.docker/files/supervisord.conf @@ -18,23 +18,17 @@ stdout_logfile=/var/log/neko/dbus.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 redirect_stderr=true -stderr_logfile=/var/log/neko/dbus.err.log -stderr_logfile_maxbytes=100MB -stderr_logfile_backups=10 -[program:xvfb] +[program:x-server] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s" -command=/usr/bin/Xvfb %(ENV_DISPLAY)s -screen 0 %(ENV_SCREEN_WIDTH)sx%(ENV_SCREEN_HEIGHT)sx%(ENV_SCREEN_DEPTH)s +command=/usr/bin/X -config /etc/neko/xorg.conf %(ENV_DISPLAY)s autorestart=true priority=300 user=%(ENV_USER)s -stdout_logfile=/var/log/neko/xvfb.log +stdout_logfile=/var/log/neko/xorg.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 redirect_stderr=true -stderr_logfile=/var/log/neko/xvfb.err.log -stderr_logfile_maxbytes=100MB -stderr_logfile_backups=10 [program:pulseaudio] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" @@ -46,9 +40,6 @@ stdout_logfile=/var/log/neko/pulseaudio.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 redirect_stderr=true -stderr_logfile=/var/log/neko/pulseaudio.err.log -stderr_logfile_maxbytes=100MB -stderr_logfile_backups=10 [program:openbox] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" @@ -60,6 +51,3 @@ stdout_logfile=/var/log/neko/openbox.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 redirect_stderr=true -stderr_logfile=/var/log/neko/openbox.err.log -stderr_logfile_maxbytes=100MB -stderr_logfile_backups=10 diff --git a/.docker/files/xorg.conf b/.docker/files/xorg.conf new file mode 100644 index 00000000..89cee560 --- /dev/null +++ b/.docker/files/xorg.conf @@ -0,0 +1,66 @@ +# This xorg configuration file is meant to be used by xpra +# to start a dummy X11 server. +# For details, please see: +# https://xpra.org/Xdummy.html + +Section "ServerFlags" + Option "DontVTSwitch" "true" + Option "AllowMouseOpenFail" "true" + Option "PciForceNone" "true" + Option "AutoEnableDevices" "false" + Option "AutoAddDevices" "false" +EndSection + +Section "InputDevice" + Identifier "dummy_mouse" + Option "CorePointer" "true" + Driver "void" +EndSection + +Section "InputDevice" + Identifier "dummy_keyboard" + Option "CoreKeyboard" "true" + Driver "void" +EndSection + +Section "Device" + Identifier "dummy_videocard" + Driver "dummy" + Option "ConstantDPI" "true" + #VideoRam 4096000 + #VideoRam 256000 + VideoRam 192000 +EndSection + +Section "Monitor" + Identifier "dummy_monitor" + HorizSync 5.0 - 1000.0 + VertRefresh 5.0 - 200.0 + #This can be used to get a specific DPI, but only for the default resolution: + #DisplaySize 508 317 + #NOTE: the highest modes will not work without increasing the VideoRam + # for the dummy video card. + # https://arachnoid.com/modelines/ + # 1280x720 @ 30.00 Hz (GTF) hsync: 21.99 kHz; pclk: 33.78 MHz + Modeline "1280x720_30.00" 33.78 1280 1288 1408 1536 720 721 724 733 -HSync +Vsync +EndSection + +Section "Screen" + Identifier "dummy_screen" + Device "dummy_videocard" + Monitor "dummy_monitor" + DefaultDepth 24 + SubSection "Display" + Viewport 0 0 + Depth 24 + Modes "1280x720_30.00" + Virtual 1280 720 + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "dummy_layout" + Screen "dummy_screen" + InputDevice "dummy_mouse" + InputDevice "dummy_keyboard" +EndSection \ No newline at end of file diff --git a/.docker/test b/.docker/test index 8bdd4ced..6c331811 100755 --- a/.docker/test +++ b/.docker/test @@ -38,6 +38,7 @@ mkdir -p /etc/neko/supervisord cp files/dbus /usr/bin/dbus cp files/default.pa /etc/pulse/default.pa cp files/supervisord.conf /etc/neko/supervisord.conf +cp files/xorg.conf /etc/neko/xorg.conf cp files/openbox.xml /etc/neko/openbox.xml chmod +x /usr/bin/dbus diff --git a/Dockerfile b/Dockerfile index bdac0adb..5ab2c9dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN set -eux; apt-get update; \ # # install neko dependencies RUN set -eux; apt-get update; \ - apt-get install -y --no-install-recommends wget ca-certificates pulseaudio openbox dbus-x11 xvfb supervisor; \ + apt-get install -y --no-install-recommends wget ca-certificates pulseaudio openbox dbus-x11 xserver-xorg-video-dummy supervisor; \ apt-get install -y --no-install-recommends libxv1 libopus0 libvpx4; \ # # create a non-root user @@ -66,9 +66,6 @@ COPY .build/gst/local /gst/local/ # # env ENV USER=$USERNAME -ENV SCREEN_WIDTH=1280 -ENV SCREEN_HEIGHT=720 -ENV SCREEN_DEPTH=24 ENV DISPLAY=:99.0 # @@ -77,6 +74,7 @@ COPY .docker/files/dbus /usr/bin/dbus COPY .docker/files/openbox.xml /etc/neko/openbox.xml COPY .docker/files/neko/supervisord.conf /etc/neko/supervisord/neko.conf COPY .docker/files/supervisord.conf /etc/neko/supervisord.conf +COPY .docker/files/xorg.conf /etc/neko/xorg.conf COPY .docker/files/default.pa /etc/pulse/default.pa #