fix wayland init

This commit is contained in:
thelamer 2026-01-04 19:09:34 -05:00
parent 496b7075ca
commit c519451380
No known key found for this signature in database
3 changed files with 43 additions and 13 deletions

View File

@ -10,7 +10,8 @@ LABEL maintainer="thelamer"
# title
ENV TITLE="Kali Linux" \
NO_GAMEPAD=true
NO_GAMEPAD=true \
SELKIES_WAYLAND_SOCKET_INDEX=1
RUN \
echo "**** add icon ****" && \
@ -56,6 +57,17 @@ RUN \
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 && \
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 "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \

View File

@ -10,7 +10,8 @@ LABEL maintainer="thelamer"
# title
ENV TITLE="Kali Linux" \
NO_GAMEPAD=true
NO_GAMEPAD=true \
SELKIES_WAYLAND_SOCKET_INDEX=1
RUN \
echo "**** add icon ****" && \
@ -56,6 +57,17 @@ RUN \
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 && \
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 "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \

View File

@ -48,15 +48,21 @@ sudo mv \
/etc/xdg/menus/applications.menu
kbuildsycoca6
# Wayland Hacks
# 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
sudo setcap -r /usr/bin/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/
# 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
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