From d09e421a51906ac482a9b7e7b5b74b6676abf2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 11 Sep 2023 16:49:45 +0200 Subject: [PATCH] Remove dbus (#55) * remove dbus. * xfce needs dbus installed. --- .devcontainer/Dockerfile | 6 ++---- Dockerfile | 3 +-- Dockerfile.nvidia | 3 +-- dev/runtime/Dockerfile | 2 +- runtime/dbus | 11 ----------- runtime/supervisord.conf | 10 ---------- 6 files changed, 5 insertions(+), 30 deletions(-) delete mode 100755 runtime/dbus diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7bb676fc..d69c04b5 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -58,7 +58,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ wget ca-certificates supervisor \ - pulseaudio dbus-x11 xserver-xorg-video-dummy \ + pulseaudio xserver-xorg-video-dummy \ libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6 \ # # needed for profile upload preStop hook @@ -122,7 +122,6 @@ COPY --from=xorg-deps /usr/local/lib/xorg/modules/drivers/dummy_drv.so /usr/lib/ COPY --from=xorg-deps /usr/local/lib/xorg/modules/input/neko_drv.so /usr/lib/xorg/modules/input/neko_drv.so # copy runtime files -COPY runtime/dbus /usr/bin/dbus COPY runtime/default.pa /etc/pulse/default.pa COPY runtime/supervisord.conf /etc/neko/supervisord.conf COPY runtime/xorg.conf /etc/neko/xorg.conf @@ -133,8 +132,7 @@ COPY dev/runtime/config.yml /etc/neko/neko.yml COPY dev/runtime/supervisord.conf /etc/neko/supervisord/dev.conf # customized scripts -RUN chmod +x /usr/bin/dbus;\ - echo '#!/bin/sh\nsleep infinity' > /usr/bin/neko; \ +RUN echo '#!/bin/sh\nsleep infinity' > /usr/bin/neko; \ chmod +x /usr/bin/neko; \ echo '#!/bin/sh\nsudo sh -c "export USER='$USERNAME'\nexport HOME=/home/'$USERNAME'\n/usr/bin/supervisord -c /etc/neko/supervisord.conf"' > /usr/bin/deps; \ chmod +x /usr/bin/deps; \ diff --git a/Dockerfile b/Dockerfile index 1cc3995c..d1f0d0ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,7 +79,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ wget ca-certificates supervisor \ - pulseaudio dbus-x11 xserver-xorg-video-dummy \ + pulseaudio xserver-xorg-video-dummy \ libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx7 libxcvt0 \ # # needed for profile upload preStop hook @@ -133,7 +133,6 @@ COPY --from=xorg-deps /usr/local/lib/xorg/modules/input/neko_drv.so /usr/lib/xor # # copy runtime configs COPY --chown=neko:neko runtime/.Xresources /home/$USERNAME/.Xresources -COPY runtime/dbus /usr/bin/dbus COPY runtime/default.pa /etc/pulse/default.pa COPY runtime/supervisord.conf /etc/neko/supervisord.conf COPY runtime/xorg.conf /etc/neko/xorg.conf diff --git a/Dockerfile.nvidia b/Dockerfile.nvidia index 2a395544..947e4ed5 100644 --- a/Dockerfile.nvidia +++ b/Dockerfile.nvidia @@ -189,7 +189,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ wget ca-certificates supervisor \ - pulseaudio dbus-x11 xserver-xorg-video-dummy \ + pulseaudio xserver-xorg-video-dummy \ libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx7 libx264-163 libvo-aacenc0 librtmp1 libxcvt0 \ libgtk-3-bin software-properties-common cabextract aptitude vim curl \ # @@ -279,7 +279,6 @@ RUN set -eux; \ # # copy runtime configs COPY --chown=neko:neko runtime/.Xresources /home/$USERNAME/.Xresources -COPY runtime/dbus /usr/bin/dbus COPY runtime/default.pa /etc/pulse/default.pa COPY runtime/supervisord.conf /etc/neko/supervisord.conf COPY runtime/xorg.conf /etc/neko/xorg.conf diff --git a/dev/runtime/Dockerfile b/dev/runtime/Dockerfile index 0eab10e8..c6c3b99b 100644 --- a/dev/runtime/Dockerfile +++ b/dev/runtime/Dockerfile @@ -7,7 +7,7 @@ ARG SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux64&lan # install xfce and firefox RUN set -eux; apt-get update; \ apt-get install -y --no-install-recommends \ - xfce4 xfce4-terminal sudo \ + dbus-x11 xfce4 xfce4-terminal sudo \ xz-utils bzip2 libgtk-3-0 libdbus-glib-1-2; \ # # fetch latest firefox release diff --git a/runtime/dbus b/runtime/dbus deleted file mode 100755 index bf0d4375..00000000 --- a/runtime/dbus +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if [ ! -d /var/run/dbus ]; then - mkdir -p /var/run/dbus -fi - -if [ -f /var/run/dbus/pid ]; then - rm -f /var/run/dbus/pid -fi - -/usr/bin/dbus-daemon --nofork --print-pid --config-file=/usr/share/dbus-1/system.conf diff --git a/runtime/supervisord.conf b/runtime/supervisord.conf index 6ba51b81..d7c2ec20 100644 --- a/runtime/supervisord.conf +++ b/runtime/supervisord.conf @@ -8,16 +8,6 @@ logfile_maxbytes=0 [include] files=/etc/neko/supervisord/*.conf -[program:dbus] -environment=HOME="/root",USER="root" -command=/usr/bin/dbus -autorestart=true -priority=100 -user=root -stdout_logfile=/dev/stderr -stdout_logfile_maxbytes=0 -redirect_stderr=true - [program:x-server] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s" command=/usr/bin/X %(ENV_DISPLAY)s -config /etc/neko/xorg.conf -noreset -nolisten tcp