diff --git a/Dockerfile b/Dockerfile index 51982170..7991db41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm +FROM ghcr.io/linuxserver/baseimage-selkies:debianbookworm # set version label ARG BUILD_DATE @@ -10,10 +10,6 @@ LABEL maintainer="thelamer" ENV TITLE="Debian KDE" RUN \ - echo "**** add icon ****" && \ - curl -o \ - /kclient/public/icon.png \ - https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png && \ echo "**** install packages ****" && \ apt-get update && \ DEBIAN_FRONTEND=noninteractive \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index fbe792af..25fc687c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm +FROM ghcr.io/linuxserver/baseimage-selkies:arm64v8-debianbookworm # set version label ARG BUILD_DATE diff --git a/root/defaults/autostart b/root/defaults/autostart new file mode 100644 index 00000000..ca916d09 --- /dev/null +++ b/root/defaults/autostart @@ -0,0 +1 @@ +exit 0 diff --git a/root/defaults/startwm.sh b/root/defaults/startwm.sh index e1ea0af6..6af53a51 100755 --- a/root/defaults/startwm.sh +++ b/root/defaults/startwm.sh @@ -1,21 +1,51 @@ #!/bin/bash -# Enable Nvidia GPU support if detected -if which nvidia-smi; then - export LIBGL_KOPPER_DRI2=1 - export MESA_LOADER_DRIVER_OVERRIDE=zink - export GALLIUM_DRIVER=zink -fi - -# 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 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 -# Launch DE -/usr/bin/startplasma-x11 > /dev/null 2>&1 +# Direcotries +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 +( + 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 +) & + +# 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; then +# export LIBGL_KOPPER_DRI2=1 +# export MESA_LOADER_DRIVER_OVERRIDE=zink +# export GALLIUM_DRIVER=zink +#fi + +# Start DE +dbus-launch /usr/bin/startplasma-x11 > /dev/null 2>&1 diff --git a/root/usr/local/bin/wrapped-chromium b/root/usr/local/bin/wrapped-chromium index bfad4dad..e8cc2a0a 100755 --- a/root/usr/local/bin/wrapped-chromium +++ b/root/usr/local/bin/wrapped-chromium @@ -1,6 +1,12 @@ #! /bin/bash BIN=/usr/bin/chromium +# Enable Nvidia GPU support if detected +if which nvidia-smi; then + export LIBGL_KOPPER_DRI2=1 + export MESA_LOADER_DRIVER_OVERRIDE=zink + export GALLIUM_DRIVER=zink +fi # Cleanup if ! pgrep chromium > /dev/null;then