From 98ff158c64efe4ed5057b1ede2e69872f2d727e9 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:33:21 +0900 Subject: [PATCH] Edit KDE installation --- Dockerfile | 20 ++++++++++++-------- entrypoint.sh | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2add19..6c521e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -313,8 +313,8 @@ ENV KDE_FULL_SESSION=true ENV KDE_APPLICATIONS_AS_SCOPE=1 ENV KWIN_COMPOSE=N ENV KWIN_X11_NO_SYNC_TO_VBLANK=1 -# Use sudoedit to change protected files instead of using sudo on kate -ENV SUDO_EDITOR=kate +# Use sudoedit to change protected files instead of using sudo on kwrite +ENV SUDO_EDITOR=kwrite # Set input to fcitx ENV GTK_IM_MODULE=fcitx ENV QT_IM_MODULE=fcitx @@ -365,7 +365,7 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \ haveged \ hunspell \ im-config \ - kate \ + kwrite \ kcalc \ kcharselect \ kdeadmin \ @@ -377,7 +377,9 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \ kde-spectacle \ kdf \ kdialog \ + kfind \ kget \ + khotkeys \ kimageformat-plugins \ kinfocenter \ kio \ @@ -387,7 +389,9 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \ kmix \ kmousetool \ kmouth \ + knewstuff-dialog \ ksshaskpass \ + ksystemstats \ ktimer \ kwayland-integration \ kwin-addons \ @@ -436,15 +440,14 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \ systemsettings \ ubuntu-drivers-common \ vlc \ - vlc-l10n \ vlc-plugin-access-extra \ vlc-plugin-notify \ vlc-plugin-samba \ vlc-plugin-skins2 \ vlc-plugin-video-splitter \ vlc-plugin-visualization \ - xdg-desktop-portal-kde \ xdg-user-dirs \ + xdg-utils \ firefox \ transmission-qt && \ apt-get install --install-recommends -y \ @@ -452,10 +455,11 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \ libreoffice-kf5 \ libreoffice-plasma \ libreoffice-style-breeze && \ - # Install Google Chrome for supported architectures - if [ "$(dpkg --print-architecture)" = "amd64" ]; then cd /tmp && curl -o google-chrome-stable.deb -fsSL "https://dl.google.com/linux/direct/google-chrome-stable_current_$(dpkg --print-architecture).deb" && apt-get update && apt-get install --no-install-recommends -y ./google-chrome-stable.deb && rm -f google-chrome-stable.deb && sed -i '/^Exec=/ s/$/ --password-store=basic --in-process-gpu/' /usr/share/applications/google-chrome.desktop; fi && \ # Ensure Firefox as the default web browser update-alternatives --set x-www-browser /usr/bin/firefox && \ + xdg-settings set default-web-browser firefox.desktop && \ + # Install Google Chrome for supported architectures + if [ "$(dpkg --print-architecture)" = "amd64" ]; then cd /tmp && curl -o google-chrome-stable.deb -fsSL "https://dl.google.com/linux/direct/google-chrome-stable_current_$(dpkg --print-architecture).deb" && apt-get update && apt-get install --no-install-recommends -y ./google-chrome-stable.deb && rm -f google-chrome-stable.deb && sed -i '/^Exec=/ s/$/ --password-store=basic --in-process-gpu/' /usr/share/applications/google-chrome.desktop; fi && \ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* /var/log/* /tmp/* /var/tmp/* && \ # Fix KDE startup permissions issues in containers MULTI_ARCH=$(dpkg --print-architecture | sed -e 's/arm64/aarch64-linux-gnu/' -e 's/armhf/arm-linux-gnueabihf/' -e 's/riscv64/riscv64-linux-gnu/' -e 's/ppc64el/powerpc64le-linux-gnu/' -e 's/s390x/s390x-linux-gnu/' -e 's/i.*86/i386-linux-gnu/' -e 's/amd64/x86_64-linux-gnu/' -e 's/unknown/x86_64-linux-gnu/') && \ @@ -627,7 +631,7 @@ ENV PULSE_RUNTIME_PATH="${PULSE_RUNTIME_PATH:-${XDG_RUNTIME_DIR:-/tmp}/pulse}" ENV PULSE_SERVER="${PULSE_SERVER:-unix:${PULSE_RUNTIME_PATH:-${XDG_RUNTIME_DIR:-/tmp}/pulse}/native}" # dbus-daemon to the below address is required during startup -ENV DBUS_SYSTEM_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR:-/tmp}/dbus-session-bus" +ENV DBUS_SYSTEM_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR:-/tmp}/dbus-system-bus" USER 1000 ENV SHELL=/bin/bash diff --git a/entrypoint.sh b/entrypoint.sh index 31bb6fe..04161ff 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -94,9 +94,9 @@ export XDG_SESSION_ID="${DISPLAY#*:}" export QT_LOGGING_RULES='*.debug=false;qt.qpa.*=false' if [ -n "$(nvidia-smi --query-gpu=uuid --format=csv,noheader | head -n1)" ] || [ -n "$(ls -A /dev/dri 2>/dev/null)" ]; then export VGL_FPS="${DISPLAY_REFRESH}" - /usr/bin/vglrun -d "${VGL_DISPLAY:-egl}" +wm /usr/bin/dbus-launch /usr/bin/startplasma-x11 & + /usr/bin/vglrun -d "${VGL_DISPLAY:-egl}" +wm /usr/bin/dbus-launch --exit-with-session /usr/bin/startplasma-x11 & else - /usr/bin/dbus-launch /usr/bin/startplasma-x11 & + /usr/bin/dbus-launch --exit-with-session /usr/bin/startplasma-x11 & fi # Start Fcitx input method framework