diff --git a/Containerfile b/Containerfile index 102de1d..0c1c930 100644 --- a/Containerfile +++ b/Containerfile @@ -113,7 +113,9 @@ RUN chmod 0644 /etc/containers/policy.json /etc/pki/containers/cosign.pub && \ python3 -m json.tool /etc/containers/auth.json > /dev/null # 2. Kopiere die Systemd-Overrides als Vendor-Drop-ins (kein /etc/-Override im Image) -# --chmod=0644: keine world-writable Units (systemd warnt sonst im Journal) +# --chmod=0644: keine world-writable Units (systemd warnt sonst im Journal). +# HINWEIS: Zurueckgesetzt wird nur ExecStart. Kuenftige Upstream-ExecStartPre/ +# ExecCondition-Zeilen liefen weiter (bewusst: kein Over-Override). COPY --chmod=0644 configs/bootc-timer-override.conf /usr/lib/systemd/system/bootc-fetch-apply-updates.timer.d/override.conf COPY --chmod=0644 configs/bootc-override.conf /usr/lib/systemd/system/bootc-fetch-apply-updates.service.d/override.conf COPY --chmod=0644 configs/remount-fs-ostree-skip.conf /usr/lib/systemd/system/systemd-remount-fs.service.d/skip-on-ostree.conf @@ -134,12 +136,12 @@ COPY --chmod=0644 configs/applications/bing-wallpaper-toggle.desktop /usr/share/ # User-Units (Bing-Wallpaper-Timer). --chmod: In-Image-Units muessen 644 # sein (world-writable Units warnt systemd lautstark an). -COPY --chmod=644 configs/systemd/user/bing-wallpaper.service /usr/lib/systemd/user/bing-wallpaper.service -COPY --chmod=644 configs/systemd/user/bing-wallpaper.timer /usr/lib/systemd/user/bing-wallpaper.timer +COPY --chmod=0644 configs/systemd/user/bing-wallpaper.service /usr/lib/systemd/user/bing-wallpaper.service +COPY --chmod=0644 configs/systemd/user/bing-wallpaper.timer /usr/lib/systemd/user/bing-wallpaper.timer # Session-Target: zieht graphical-session.target hoch (Details in der Datei). # Braucht kein enable (wird aus dem labwc-Autostart gestartet, kein [Install] # noetig). --chmod wie oben: 644, keine world-writable Units. -COPY --chmod=644 configs/systemd/user/labwc-session.target /usr/lib/systemd/user/labwc-session.target +COPY --chmod=0644 configs/systemd/user/labwc-session.target /usr/lib/systemd/user/labwc-session.target # labwc/kanshi-Defaults fuer neue Benutzer (Bestand bleibt via seed-labwc-skel) COPY configs/skel/ /etc/skel/ @@ -190,7 +192,7 @@ RUN set -u; \ # ============================================================================= # 4. Kopiere den Systemd-Service für den Erst-Boot von Flatpak -COPY --chmod=644 configs/flatpak-preinstall.service /usr/lib/systemd/system/flatpak-preinstall.service +COPY --chmod=0644 configs/flatpak-preinstall.service /usr/lib/systemd/system/flatpak-preinstall.service # 5. Aktiviere Services (Presets greifen nicht bei COPY-Dateien) # HINWEIS: greetd wird bereits in 21-greetd.sh enabled; hier als @@ -206,9 +208,9 @@ RUN systemctl enable \ # User-Units (Bing) liegen bereit, werden aber NICHT global aktiviert: # Bing-Timer ist Opt-in per Launcher-App "Bing-Wallpaper an/aus". -# SELinux-Labels fuer Greeter/Skel/Sessions (Fehler tolerieren, Labels -# werden beim Deployment ggf. erneut gesetzt) -RUN restorecon -Rv /etc/greetd /etc/skel /usr/share/wayland-sessions 2>/dev/null || true +# SELinux-Labels fuer Greeter/Skel/Sessions/Greeter-Defaults/Skripte +# (Fehler tolerieren, Labels werden beim Deployment ggf. erneut gesetzt) +RUN restorecon -Rv /etc/greetd /etc/skel /usr/share/wayland-sessions /usr/share/noctalia-greeter /usr/bin/noctalia-greeter-session /usr/bin/kanshi-autoconfig /usr/bin/seed-labwc-skel /usr/bin/labwc-appmenu /usr/bin/bing-wallpaper.sh /usr/bin/bing-wallpaper-toggle.sh 2>/dev/null || true ############################################################################### # PRE-FINAL CLEANUP diff --git a/configs/skel/.config/labwc/environment b/configs/skel/.config/labwc/environment index e6e0f25..8039afe 100644 --- a/configs/skel/.config/labwc/environment +++ b/configs/skel/.config/labwc/environment @@ -7,6 +7,9 @@ XKB_DEFAULT_LAYOUT=de XKB_DEFAULT_VARIANT=nodeadkeys QT_QPA_PLATFORM=wayland GDK_BACKEND=wayland +# Native Electron-Apps (Brave nativ, VS Code u.a.) direkt auf Wayland +# statt XWayland-Umweg. Flatpaks bringen eigenes Env mit (unberuehrt). +ELECTRON_OZONE_PLATFORM_HINT=wayland # Cursor: Adwaita ist im Image installiert; ohne diese Vars meckert labwc # bei jedem Start ("$XCURSOR_SIZE/_THEME not set, ignoring"). XCURSOR_SIZE=24 diff --git a/scripts/__pycache__/labwc-appmenucpython-314.pyc b/scripts/__pycache__/labwc-appmenucpython-314.pyc index 60af11d..b8e94c4 100644 Binary files a/scripts/__pycache__/labwc-appmenucpython-314.pyc and b/scripts/__pycache__/labwc-appmenucpython-314.pyc differ diff --git a/scripts/labwc-appmenu b/scripts/labwc-appmenu index 11b42d6..8d8861b 100755 --- a/scripts/labwc-appmenu +++ b/scripts/labwc-appmenu @@ -14,6 +14,8 @@ Pipe-Menues nur, solange das Menue offen ist) - neu installierte Apps """ import configparser import os +import re +import shlex import shutil import sys import xml.sax.saxutils as sax @@ -50,8 +52,25 @@ FIELD_CODES = { def clean_exec(exec_line): - parts = [p for p in exec_line.split() if p not in FIELD_CODES] - return " ".join(parts).strip() + # shlex statt naive split (gequotete Pfade mit Leerzeichen bleiben ganz). + # Exakte Field-Codes fliegen raus; angeklebte Reste (%U, etc.) werden + # entfernt, leere Tokens gedroppt. Trade-off: ein legitimes "%f" als + # Teil eines Arguments (praktisch inexistent in Exec-Zeilen) wuerde + # mit entfernt - akzeptiert zugunsten robuster Menue-Commands. + try: + parts = shlex.split(exec_line) + except ValueError: + parts = exec_line.split() + cleaned = [] + for p in parts: + if p in FIELD_CODES: + continue + p = re.sub(r"%[fFuUdDnNickvm]", "", p) + if p: + cleaned.append(p) + # shlex.join: Tokens mit Leerzeichen werden gequotet, damit labwc + # (Execute laeuft ueber die Shell) sie wieder als ein Argument sieht. + return shlex.join(cleaned).strip() def read_desktop(path): diff --git a/scripts/seed-labwc-skel.sh b/scripts/seed-labwc-skel.sh index fb2a3e9..dc686be 100755 --- a/scripts/seed-labwc-skel.sh +++ b/scripts/seed-labwc-skel.sh @@ -294,6 +294,12 @@ if [[ -f "${ENV_FILE}" ]] && ! grep -q '^XCURSOR_THEME=' "${ENV_FILE}"; then printf '%s\n' 'XCURSOR_SIZE=24' 'XCURSOR_THEME=Adwaita' >> "${ENV_FILE}" echo "migriert: XCURSOR-Vars in ${ENV_FILE} ergaenzt (Backup .bak)" fi +# Migration: Native Electron-Apps direkt auf Wayland (statt XWayland). +if [[ -f "${ENV_FILE}" ]] && ! grep -q '^ELECTRON_OZONE_PLATFORM_HINT=' "${ENV_FILE}"; then + backup_file "${ENV_FILE}" + printf '%s\n' 'ELECTRON_OZONE_PLATFORM_HINT=wayland' >> "${ENV_FILE}" + echo "migriert: ELECTRON_OZONE_PLATFORM_HINT in ${ENV_FILE} ergaenzt (Backup .bak)" +fi # Migration: Noctalia Window-Switcher auf Alt+Tab (statt labwc-Default aus # ).