From 7ad744a6e3ae5960315ed92f0e4344997dce9b80 Mon Sep 17 00:00:00 2001 From: thelamer Date: Sun, 5 Apr 2026 18:19:17 -0400 Subject: [PATCH 1/3] rebase ubuntu-kde to resolute, force wayland as X11 is deprecated --- Dockerfile | 21 ++++++---- Dockerfile.aarch64 | 17 +++++--- root/defaults/startwm.sh | 53 ------------------------ root/defaults/startwm_wayland.sh | 69 ++++++++++++++++++++++++++++---- 4 files changed, 88 insertions(+), 72 deletions(-) delete mode 100755 root/defaults/startwm.sh diff --git a/Dockerfile b/Dockerfile index 13e7d8e2b..1b8cdb5b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-selkies:ubuntunoble +FROM ghcr.io/linuxserver/baseimage-selkies:ubunturesolute # set version label ARG BUILD_DATE @@ -9,7 +9,8 @@ ARG DEBIAN_FRONTEND="noninteractive" # title ENV TITLE="Ubuntu KDE" \ - NO_GAMEPAD=true + NO_GAMEPAD=true \ + PIXELFLUX_WAYLAND=true RUN \ echo "**** add icon ****" && \ @@ -21,6 +22,7 @@ RUN \ apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends -y \ + cargo \ chromium \ dolphin \ gwenview \ @@ -34,7 +36,6 @@ RUN \ ksystemstats \ kubuntu-settings-desktop \ kubuntu-wallpapers \ - kubuntu-web-shortcuts \ kwin-addons \ kwin-x11 \ kwrite \ @@ -42,18 +43,24 @@ RUN \ plasma-workspace \ qml-module-qt-labs-platform \ systemsettings && \ + cargo install \ + wl-clipboard-rs-tools && \ + echo "**** replace wl-clipboard with rust ****" && \ + mv \ + /config/.cargo/bin/wl-* \ + /usr/bin/ && \ echo "**** application tweaks ****" && \ sed -i \ 's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \ /usr/share/applications/chromium.desktop && \ echo "**** kde tweaks ****" && \ - sed -i \ - 's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \ - /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml && \ + setcap -r \ + /usr/bin/kwin_wayland && \ echo "**** cleanup ****" && \ apt-get autoclean && \ rm -rf \ /config/.cache \ + /config/.cargo \ /config/.launchpadlib \ /var/lib/apt/lists/* \ /var/tmp/* \ @@ -63,5 +70,5 @@ RUN \ COPY /root / # ports and volumes -EXPOSE 3000 +EXPOSE 3001 VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index dbf0e49c8..3c467701b 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -9,7 +9,8 @@ ARG DEBIAN_FRONTEND="noninteractive" # title ENV TITLE="Ubuntu KDE" \ - NO_GAMEPAD=true + NO_GAMEPAD=true \ + PIXELFLUX_WAYLAND=true RUN \ echo "**** add icon ****" && \ @@ -21,6 +22,7 @@ RUN \ apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends -y \ + cargo \ chromium \ dolphin \ gwenview \ @@ -34,7 +36,6 @@ RUN \ ksystemstats \ kubuntu-settings-desktop \ kubuntu-wallpapers \ - kubuntu-web-shortcuts \ kwin-addons \ kwin-x11 \ kwrite \ @@ -42,18 +43,24 @@ RUN \ plasma-workspace \ qml-module-qt-labs-platform \ systemsettings && \ + cargo install \ + wl-clipboard-rs-tools && \ + echo "**** replace wl-clipboard with rust ****" && \ + mv \ + /config/.cargo/bin/wl-* \ + /usr/bin/ && \ echo "**** application tweaks ****" && \ sed -i \ 's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \ /usr/share/applications/chromium.desktop && \ echo "**** kde tweaks ****" && \ - sed -i \ - 's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \ - /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml && \ + setcap -r \ + /usr/bin/kwin_wayland && \ echo "**** cleanup ****" && \ apt-get autoclean && \ rm -rf \ /config/.cache \ + /config/.cargo \ /config/.launchpadlib \ /var/lib/apt/lists/* \ /var/tmp/* \ diff --git a/root/defaults/startwm.sh b/root/defaults/startwm.sh deleted file mode 100755 index 765676064..000000000 --- a/root/defaults/startwm.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -# Disable compositing and screen lock -if [ ! -f $HOME/.config/kwinrc ]; then - kwriteconfig5 --file $HOME/.config/kwinrc --group Compositing --key Enabled false -fi -if [ ! -f $HOME/.config/kscreenlockerrc ]; then - kwriteconfig5 --file $HOME/.config/kscreenlockerrc --group Daemon --key Autolock false -fi - -# Power related -setterm blank 0 -setterm powerdown 0 - -# Directories -sudo rm -f /usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service -mkdir -p "${HOME}/.config/autostart" "${HOME}/.XDG" "${HOME}/.local/share/" -chmod 700 "${HOME}/.XDG" -touch "${HOME}/.local/share/user-places.xbel" - -# Background perm loop -if [ ! -d $HOME/.config/kde.org ]; then - ( - loop_end_time=$((SECONDS + 30)) - while [ $SECONDS -lt $loop_end_time ]; do - find "$HOME/.cache" "$HOME/.config" "$HOME/.local" -type f -perm 000 -exec chmod 644 {} + 2>/dev/null - sleep .1 - done - ) & -fi - -# Create startup script if it does not exist (keep in sync with openbox) -STARTUP_FILE="${HOME}/.config/autostart/autostart.desktop" -if [ ! -f "${STARTUP_FILE}" ]; then - echo "[Desktop Entry]" > $STARTUP_FILE - echo "Exec=bash /config/.config/openbox/autostart" >> $STARTUP_FILE - echo "Icon=dialog-scripts" >> $STARTUP_FILE - echo "Name=autostart" >> $STARTUP_FILE - echo "Path=" >> $STARTUP_FILE - echo "Type=Application" >> $STARTUP_FILE - echo "X-KDE-AutostartScript=true" >> $STARTUP_FILE - chmod +x $STARTUP_FILE -fi - -# Enable Nvidia GPU support if detected -if which nvidia-smi > /dev/null 2>&1 && ls -A /dev/dri 2>/dev/null && [ "${DISABLE_ZINK}" == "false" ]; then - export LIBGL_KOPPER_DRI2=1 - export MESA_LOADER_DRIVER_OVERRIDE=zink - export GALLIUM_DRIVER=zink -fi - -# Start DE -exec dbus-launch --exit-with-session /usr/bin/startplasma-x11 > /dev/null 2>&1 diff --git a/root/defaults/startwm_wayland.sh b/root/defaults/startwm_wayland.sh index e07f92192..5e9fd2f85 100755 --- a/root/defaults/startwm_wayland.sh +++ b/root/defaults/startwm_wayland.sh @@ -1,17 +1,50 @@ #!/bin/bash +ulimit -c 0 -# Disable compositing and screen lock +# Disable compositing and screen locking if [ ! -f $HOME/.config/kwinrc ]; then - kwriteconfig5 --file $HOME/.config/kwinrc --group Compositing --key Enabled false + kwriteconfig6 --file $HOME/.config/kwinrc --group Compositing --key Enabled false fi if [ ! -f $HOME/.config/kscreenlockerrc ]; then - kwriteconfig5 --file $HOME/.config/kscreenlockerrc --group Daemon --key Autolock false + kwriteconfig6 --file $HOME/.config/kscreenlockerrc --group Daemon --key Autolock false fi # Power related setterm blank 0 setterm powerdown 0 +# Setup permissive clipboard rules +KWIN_RULES_FILE="$HOME/.config/kwinrulesrc" +RULE_DESC="wl-clipboard support" +if ! grep -q "$RULE_DESC" "$KWIN_RULES_FILE" 2>/dev/null; then + echo "Applying KWin clipboard rule..." + if command -v uuidgen &> /dev/null; then + RULE_ID=$(uuidgen) + else + RULE_ID=$(cat /proc/sys/kernel/random/uuid) + fi + count=$(kreadconfig6 --file "$KWIN_RULES_FILE" --group General --key count --default 0) + new_count=$((count + 1)) + kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key count "$new_count" + existing_rules=$(kreadconfig6 --file "$KWIN_RULES_FILE" --group General --key rules) + if [ -z "$existing_rules" ]; then + kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key rules "$RULE_ID" + else + kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key rules "$existing_rules,$RULE_ID" + fi + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key Description "$RULE_DESC" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key wmclass "wl-(copy|paste)" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key wmclassmatch 3 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skiptaskbar --type bool "true" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skiptaskbarrule 2 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skipswitcher --type bool "true" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skipswitcherrule 2 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key fsplevel 3 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key fsplevelrule 2 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key noborder --type bool "true" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key noborderrule 2 +fi + # Directories sudo rm -f /usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service mkdir -p "${HOME}/.config/autostart" "${HOME}/.XDG" "${HOME}/.local/share/" @@ -42,7 +75,29 @@ if [ ! -f "${STARTUP_FILE}" ]; then chmod +x $STARTUP_FILE fi -# Start DE -WAYLAND_DISPLAY=wayland-1 Xwayland :1 & -sleep 2 -exec dbus-launch --exit-with-session /usr/bin/startplasma-x11 > /dev/null 2>&1 +# Setup application DB +if [ ! -f "/etc/xdg/menus/applications.menu" ]; then + sudo mv \ + /etc/xdg/menus/plasma-applications.menu \ + /etc/xdg/menus/applications.menu +fi +kbuildsycoca6 + +# Export variables globally so all children inherit them +export QT_QPA_PLATFORM=wayland +export XDG_CURRENT_DESKTOP=KDE +export XDG_SESSION_TYPE=wayland +export KDE_SESSION_VERSION=6 +unset DISPLAY +dbus-run-session bash -c ' + WAYLAND_DISPLAY=wayland-1 kwin_wayland --no-lockscreen & + KWIN_PID=$! + sleep 2 + if [ -f /usr/lib/libexec/polkit-kde-authentication-agent-1 ]; then + /usr/lib/libexec/polkit-kde-authentication-agent-1 & + elif [ -f /usr/libexec/polkit-kde-authentication-agent-1 ]; then + /usr/libexec/polkit-kde-authentication-agent-1 + fi + WAYLAND_DISPLAY=wayland-0 plasmashell + kill $KWIN_PID +' > /dev/null 2>&1 From cbfc05abc8d66ea0797031279c80c65bf206ae55 Mon Sep 17 00:00:00 2001 From: thelamer Date: Sun, 5 Apr 2026 18:26:02 -0400 Subject: [PATCH 2/3] do not apply clipboard fixes to arm --- Dockerfile.aarch64 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 3c467701b..b28b4fe29 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -22,7 +22,6 @@ RUN \ apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends -y \ - cargo \ chromium \ dolphin \ gwenview \ @@ -43,12 +42,6 @@ RUN \ plasma-workspace \ qml-module-qt-labs-platform \ systemsettings && \ - cargo install \ - wl-clipboard-rs-tools && \ - echo "**** replace wl-clipboard with rust ****" && \ - mv \ - /config/.cargo/bin/wl-* \ - /usr/bin/ && \ echo "**** application tweaks ****" && \ sed -i \ 's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \ From c8294a19915bd897bfb4bd5ff8d7e369306b3eab Mon Sep 17 00:00:00 2001 From: thelamer Date: Mon, 6 Apr 2026 09:50:12 -0400 Subject: [PATCH 3/3] actually bump aarch64 to resolute --- Dockerfile.aarch64 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index b28b4fe29..64783ef70 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-selkies:arm64v8-ubuntunoble +FROM ghcr.io/linuxserver/baseimage-selkies:arm64v8-ubunturesolute # set version label ARG BUILD_DATE @@ -22,6 +22,7 @@ RUN \ apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends -y \ + cargo \ chromium \ dolphin \ gwenview \ @@ -42,6 +43,12 @@ RUN \ plasma-workspace \ qml-module-qt-labs-platform \ systemsettings && \ + cargo install \ + wl-clipboard-rs-tools && \ + echo "**** replace wl-clipboard with rust ****" && \ + mv \ + /config/.cargo/bin/wl-* \ + /usr/bin/ && \ echo "**** application tweaks ****" && \ sed -i \ 's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \ @@ -63,5 +70,5 @@ RUN \ COPY /root / # ports and volumes -EXPOSE 3000 +EXPOSE 3001 VOLUME /config