Fix LTX Desktop restart after profile switches

This commit is contained in:
Mikei386 committed 2026-09-15 21:44:16 +02:00
1 parent eb799107e3
commit 6cacfc1dc8
3 files changed
+13 -1

No files matched your search

+8 -1
View File
@@ -11,6 +11,13 @@ trap cleanup EXIT INT TERM
# A stopped container keeps its writable layer. Remove stale X11 state so the
# same container can be started again by the profile controller.
rm -f /tmp/.X0-lock /tmp/.X11-unix/X0
# Keep Chromium session data ephemeral. LTX models, settings, authentication and
# outputs remain in /data/LTXDesktop through XDG_DATA_HOME.
rm -rf /tmp/ltx-electron-profile
# Electron keeps its single-instance markers in the persistent LTX data path.
# They point at the stopped container and must not survive a profile switch.
rm -f /data/LTXDesktop/SingletonCookie /data/LTXDesktop/SingletonLock /data/LTXDesktop/SingletonSocket
Xvfb :0 -screen 0 1600x1000x24 -nolisten tcp &
x_pid=$!
for _ in $(seq 1 50); do
@@ -29,7 +36,7 @@ web_pid=$!
export APPDIR=/opt/ltx-desktop/squashfs-root
cd "$APPDIR"
./AppRun --no-sandbox --disable-gpu-sandbox \
--disable-dev-shm-usage >/data/ltx-desktop.log 2>&1 &
--disable-dev-shm-usage --user-data-dir=/tmp/ltx-electron-profile >/data/ltx-desktop.log 2>&1 &
app_pid=$!
wait "$app_pid"