修复 部分桌面上无法出现desktop

This commit is contained in:
shenmo 2023-12-11 10:02:38 +08:00
parent f57e80c61a
commit 8ce2c31380
4 changed files with 36 additions and 3 deletions
src
DEBIAN
etc
X11/Xsession.d
profile.d
usr/lib/systemd/user-environment-generators

@ -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 <shenmo@spark-app.store>
Architecture: arm64
Architecture: amd64
Description: bwrap wrapper for install and running debs inside a bookworm container

@ -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

@ -1,4 +1,3 @@
# shellcheck shell=sh

@ -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