Skip to content

Commit

Permalink
Edit KDE installation
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Jul 26, 2024
1 parent 9f94545 commit 98ff158
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -365,7 +365,7 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \
haveged \
hunspell \
im-config \
kate \
kwrite \
kcalc \
kcharselect \
kdeadmin \
Expand All @@ -377,7 +377,9 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \
kde-spectacle \
kdf \
kdialog \
kfind \
kget \
khotkeys \
kimageformat-plugins \
kinfocenter \
kio \
Expand All @@ -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 \
Expand Down Expand Up @@ -436,26 +440,26 @@ 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 \
libreoffice \
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/') && \
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98ff158

Please sign in to comment.