Skip to content

Commit 7e3eeba

Browse files
committed
feat: set XDG_RUNTIME_DIR
1 parent 3383ec6 commit 7e3eeba

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

scripts/apps/uptime-kuma-2/ampstart.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ fi
9090
# Addition for Uptime Kuma 2 (for embedded MariaDB server)
9191
chown -R amp:amp /var/lib/mysql
9292

93+
# Set XDG_RUNTIME_DIR (stop Wine/Proton whining)
94+
XDG_RUNTIME_DIR="/run/user/${AMPUSERID}"
95+
install -d -m 0700 -o amp -g amp "${XDG_RUNTIME_DIR}"
96+
9397
# Handoff
9498
echo "[Info] Starting AMP..."
9599
ARGS=$@
@@ -99,6 +103,7 @@ keep_env=(
99103
LANG="${LANG:-en_US.UTF-8}" LANGUAGE="${LANGUAGE:-en_US:en}" LC_ALL="${LC_ALL:-en_US.UTF-8}"
100104
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
101105
MAIL=/var/mail/amp
106+
XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}"
102107
)
103108
# Always keep these AMP_ env vars if set
104109
for v in AMPHOSTPLATFORM AMP_CONTAINER AMP_CONTAINER_HOST_NETWORK AMPMEMORYLIMIT AMPSWAPLIMIT AMPCONTAINERCPUS; do

scripts/base/ampstart.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ if [[ -f "/AMP/customstart.sh" ]]; then
8787
( set +e; /AMP/customstart.sh; rc=$?; ((rc==0)) || echo "[Warn] customstart.sh exited with $rc; continuing" )
8888
fi
8989

90+
# Set XDG_RUNTIME_DIR (stop Wine/Proton whining)
91+
XDG_RUNTIME_DIR="/run/user/${AMPUSERID}"
92+
install -d -m 0700 -o amp -g amp "${XDG_RUNTIME_DIR}"
93+
9094
# Handoff
9195
echo "[Info] Starting AMP..."
9296
ARGS=$@
@@ -96,6 +100,7 @@ keep_env=(
96100
LANG="${LANG:-en_US.UTF-8}" LANGUAGE="${LANGUAGE:-en_US:en}" LC_ALL="${LC_ALL:-en_US.UTF-8}"
97101
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
98102
MAIL=/var/mail/amp
103+
XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}"
99104
)
100105
# Always keep these AMP_ env vars if set
101106
for v in AMPHOSTPLATFORM AMP_CONTAINER AMP_CONTAINER_HOST_NETWORK AMPMEMORYLIMIT AMPSWAPLIMIT AMPCONTAINERCPUS; do

0 commit comments

Comments
 (0)