From d8643cd7ce507a9a0e7bc6c2bc34eadfc9c04b91 Mon Sep 17 00:00:00 2001 From: leonardpitzu Date: Thu, 26 Sep 2019 10:10:37 +0300 Subject: [PATCH 1/2] fixes resolution setup If the resolution is different from 1024x768 the script does not update the resolution any more. This update allows the resolution and depth to be updated regardless of the current value. --- rootfs/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 941520a58..22416094c 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -17,7 +17,7 @@ if [ -n "$OPENBOX_ARGS" ]; then fi if [ -n "$RESOLUTION" ]; then - sed -i "s/1024x768/$RESOLUTION/" /usr/local/bin/xvfb.sh + sed -i "s/.*exec /usr/bin/Xvfb :1 -screen.*/exec /usr/bin/Xvfb :1 -screen 0 $RESOLUTION/" /usr/local/bin/xvfb.sh fi USER=${USER:-root} From 5a576ec35f2ac6be8e6ee95e59894c59b5f060a6 Mon Sep 17 00:00:00 2001 From: leonardpitzu Date: Fri, 11 Oct 2019 20:57:50 +0300 Subject: [PATCH 2/2] Update startup.sh --- rootfs/startup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 22416094c..3857da0ec 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -17,7 +17,8 @@ if [ -n "$OPENBOX_ARGS" ]; then fi if [ -n "$RESOLUTION" ]; then - sed -i "s/.*exec /usr/bin/Xvfb :1 -screen.*/exec /usr/bin/Xvfb :1 -screen 0 $RESOLUTION/" /usr/local/bin/xvfb.sh + NEW=$(echo "exec /usr/bin/Xvfb :1 -screen 0 $RESOLUTION" | sed 's/\//\\\//g') + sed -i '/'"-screen"'/s/.*/'"${NEW}"'/' /usr/local/bin/xvfb.sh fi USER=${USER:-root}