Skip to content

A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.

rootfs(x11): clean stale X server lock at service start

ExTvef8dfabcdf59
diff --git a/build-rootfs/files/etc/init.d/podroid-x11 b/build-rootfs/files/etc/init.d/podroid-x11
index 27effef..f226fb9 100644
--- a/build-rootfs/files/etc/init.d/podroid-x11
+++ b/build-rootfs/files/etc/init.d/podroid-x11
@@ -17,6 +17,12 @@ XVNC_LOGFILE=/var/log/xvnc.log
start() {
ebegin "Starting X11 server (Xvnc + pulseaudio)"
+ # /tmp lives on the persistent ext4 overlay, so a stale X server lock
+ # from a previous boot will block Xvnc with "Server is already active
+ # for display 0". Wipe both the .X0-lock file and the X11 unix socket
+ # so Xvnc starts clean every boot.
+ rm -f /tmp/.X0-lock /tmp/.X11-unix/X0
+
mkdir -p "$PA_RUNTIME"
chmod 755 "$PA_RUNTIME"