Coder Social home page Coder Social logo

Comments (3)

nucleardreamer avatar nucleardreamer commented on September 26, 2024

@danclimasevschi haven't run into that yet! I am assuming that the xserver didn't have time to cleanup before the container was shut down (only a guess).

That fix looks solid, I will get it merged today! Thank you!

from xserver.

danclimasevschi avatar danclimasevschi commented on September 26, 2024

It looks the bash style string substitution doesn’t work. Needs to be replaced with something like this:

result=$(echo "$firstString" | sed "s/Suzi/$secondString/")

from xserver.

danclimasevschi avatar danclimasevschi commented on September 26, 2024

@nucleardreamer
This solution fixes the problem, here's the patchfile:

From 8a3d53ce3f120f7f567cd9c96bea294147b880b0 Mon Sep 17 00:00:00 2001
From: Dan Climasevschi <[email protected]>
Date: Fri, 6 May 2022 08:51:17 +0200
Subject: [PATCH] Fixes #16

---
 src/entry.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/entry.sh b/src/entry.sh
index 9501a3f..1509a6e 100644
--- a/src/entry.sh
+++ b/src/entry.sh
@@ -7,6 +7,13 @@ rm -r /tmp/.X11-unix 2>/dev/null
 
 echo "Setting initial display to FORCE_DISPLAY - $FORCE_DISPLAY"
 
+DISP_NUM=$(echo "$FORCE_DISPLAY" | sed "s/://")
+LOCK_FILE="/tmp/.X${DISP_NUM}-lock"
+if [ -f "$LOCK_FILE" ]; then
+    echo "Removing lockfile $LOCK_FILE"
+    rm -f "$LOCK_FILE" &> /dev/null
+fi
+
 export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
 
 echo "balenaBlocks xserver version: $(cat VERSION)"
-- 
2.35.1

from xserver.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.