From 8ce2c3138098b2a07a4075397f2f7297b94c9762 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 11 Dec 2023 10:02:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E4=B8=8A=E6=97=A0=E6=B3=95=E5=87=BA=E7=8E=B0?= =?UTF-8?q?desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DEBIAN/control | 4 ++-- src/etc/X11/Xsession.d/20ACE-Bookworm | 17 +++++++++++++++++ src/etc/profile.d/ACE-Bookworm.sh | 1 - .../user-environment-generators/60-ACE-Bookworm | 17 +++++++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100755 src/etc/X11/Xsession.d/20ACE-Bookworm create mode 100755 src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm diff --git a/src/DEBIAN/control b/src/DEBIAN/control index a74e9b0..09293e7 100755 --- a/src/DEBIAN/control +++ b/src/DEBIAN/control @@ -1,8 +1,8 @@ Package: cn.flamescion.bookworm-compatibility-mode -Version: 12.4 +Version: 12.4.3 Section: misc Priority: optional Depends: bubblewrap,xdg-desktop-portal | flatpak,zenity,policykit-1,gcc Maintainer: shenmo -Architecture: arm64 +Architecture: amd64 Description: bwrap wrapper for install and running debs inside a bookworm container diff --git a/src/etc/X11/Xsession.d/20ACE-Bookworm b/src/etc/X11/Xsession.d/20ACE-Bookworm new file mode 100755 index 0000000..97b379c --- /dev/null +++ b/src/etc/X11/Xsession.d/20ACE-Bookworm @@ -0,0 +1,17 @@ + + + + +# Ensure base distro defaults xdg path are set if nothing filed up some +# defaults yet. +if [ -z "$XDG_DATA_DIRS" ]; then + export XDG_DATA_DIRS="/usr/local/share:/usr/share" +fi + +# Desktop files (used by desktop environments within both X11 and Wayland) are +# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE +ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/" +if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then + export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}" +fi + diff --git a/src/etc/profile.d/ACE-Bookworm.sh b/src/etc/profile.d/ACE-Bookworm.sh index a2b5a49..de52baa 100755 --- a/src/etc/profile.d/ACE-Bookworm.sh +++ b/src/etc/profile.d/ACE-Bookworm.sh @@ -1,4 +1,3 @@ -# shellcheck shell=sh diff --git a/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm b/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm new file mode 100755 index 0000000..85a6ecd --- /dev/null +++ b/src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm @@ -0,0 +1,17 @@ +#!/bin/bash + + + +# Ensure base distro defaults xdg path are set if nothing filed up some +# defaults yet. +if [ -z "$XDG_DATA_DIRS" ]; then + export XDG_DATA_DIRS="/usr/local/share:/usr/share" +fi + +# Desktop files (used by desktop environments within both X11 and Wayland) are +# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE +ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/" +if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then + export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}" +fi +