diff --git a/Dockerfile b/Dockerfile index 9a11c8e8..c7480242 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ LABEL maintainer="thelamer" # title ENV TITLE="Fedora KDE" \ - NO_GAMEPAD=true + NO_GAMEPAD=true \ + SELKIES_WAYLAND_SOCKET_INDEX=1 RUN \ echo "**** add icon ****" && \ @@ -38,6 +39,17 @@ RUN \ sed -i \ 's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \ /usr/share/applications/chromium-browser.desktop && \ + setcap -r \ + /usr/sbin/kwin_wayland && \ + rm -f \ + /usr/bin/wl-paste \ + /usr/bin/wl-copy && \ + echo "#! /bin/bash" > \ + /tmp/wl-paste && \ + echo "#! /bin/bash" > \ + /tmp/wl-copy && \ + chmod +x /tmp/wl-* && \ + cp /tmp/wl-* /usr/bin/ && \ echo "**** kde tweaks ****" && \ sed -i \ 's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 08ae34c5..71b5139c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -8,7 +8,8 @@ LABEL maintainer="thelamer" # title ENV TITLE="Fedora KDE" \ - NO_GAMEPAD=true + NO_GAMEPAD=true \ + SELKIES_WAYLAND_SOCKET_INDEX=1 RUN \ echo "**** add icon ****" && \ @@ -38,6 +39,17 @@ RUN \ sed -i \ 's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \ /usr/share/applications/chromium-browser.desktop && \ + setcap -r \ + /usr/sbin/kwin_wayland && \ + rm -f \ + /usr/bin/wl-paste \ + /usr/bin/wl-copy && \ + echo "#! /bin/bash" > \ + /tmp/wl-paste && \ + echo "#! /bin/bash" > \ + /tmp/wl-copy && \ + chmod +x /tmp/wl-* && \ + cp /tmp/wl-* /usr/bin/ && \ echo "**** kde tweaks ****" && \ sed -i \ 's/applications:org.kde.discover.desktop,/applications:org.kde.konsole.desktop,/g' \ diff --git a/root/defaults/startwm_wayland.sh b/root/defaults/startwm_wayland.sh index c43d0071..72ad9f5d 100755 --- a/root/defaults/startwm_wayland.sh +++ b/root/defaults/startwm_wayland.sh @@ -52,18 +52,25 @@ sudo mv \ kbuildsycoca6 # Wayland Hacks -unset DISPLAY -sudo setcap -r /usr/sbin/kwin_wayland -sudo rm -f /usr/bin/wl-paste /usr/bin/wl-copy -echo "#! /bin/bash" > /tmp/wl-paste && chmod +x /tmp/wl-paste -echo "#! /bin/bash" > /tmp/wl-copy && chmod +x /tmp/wl-copy -sudo cp /tmp/wl-* /usr/bin/ if ! grep -q "ozone-platform" /usr/local/bin/wrapped-chromium > /dev/null 2>&1; then sudo sed -i 's/--password/--ozone-platform=wayland --password/g' /usr/local/bin/wrapped-chromium fi -sudo rm -f /usr/share/applications/chromium-browser.desktop -# Start DE -WAYLAND_DISPLAY=wayland-1 dbus-run-session kwin_wayland & -sleep 2 -WAYLAND_DISPLAY=wayland-0 exec dbus-run-session /usr/bin/plasmashell > /dev/null 2>&1 +# 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