Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-selkies:ubuntunoble
FROM ghcr.io/linuxserver/baseimage-selkies:ubunturesolute

# set version label
ARG BUILD_DATE
Expand All @@ -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 ****" && \
Expand All @@ -21,6 +22,7 @@ RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
cargo \
chromium \
dolphin \
gwenview \
Expand All @@ -34,26 +36,31 @@ RUN \
ksystemstats \
kubuntu-settings-desktop \
kubuntu-wallpapers \
kubuntu-web-shortcuts \
kwin-addons \
kwin-x11 \
kwrite \
plasma-desktop \
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/* \
Expand All @@ -63,5 +70,5 @@ RUN \
COPY /root /

# ports and volumes
EXPOSE 3000
EXPOSE 3001
VOLUME /config
21 changes: 14 additions & 7 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 ****" && \
Expand All @@ -21,6 +22,7 @@ RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
cargo \
chromium \
dolphin \
gwenview \
Expand All @@ -34,26 +36,31 @@ RUN \
ksystemstats \
kubuntu-settings-desktop \
kubuntu-wallpapers \
kubuntu-web-shortcuts \
kwin-addons \
kwin-x11 \
kwrite \
plasma-desktop \
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/* \
Expand All @@ -63,5 +70,5 @@ RUN \
COPY /root /

# ports and volumes
EXPOSE 3000
EXPOSE 3001
VOLUME /config
53 changes: 0 additions & 53 deletions root/defaults/startwm.sh

This file was deleted.

69 changes: 62 additions & 7 deletions root/defaults/startwm_wayland.sh
Original file line number Diff line number Diff line change
@@ -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/"
Expand Down Expand Up @@ -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