From d58426a15c3234d07a8ed34b086e0798f4fbdbd9 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sun, 3 Nov 2024 13:29:07 +0200 Subject: [PATCH 1/2] Run cmdline fixes for splash screen only on raspberrypi boards --- src/modules/fullpageos/start_chroot_script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/fullpageos/start_chroot_script b/src/modules/fullpageos/start_chroot_script index c624ff4..871e72b 100755 --- a/src/modules/fullpageos/start_chroot_script +++ b/src/modules/fullpageos/start_chroot_script @@ -19,7 +19,9 @@ apt-get update if [ "$FULLPAGEOS_CUSTOM_SPLASHSCREEN" == "yes" ] then apt-get install -y fbi - sed -i 's/$/ logo.nologo consoleblank=0 loglevel=0 quiet/' /"${BASE_BOOT_MOUNT_PATH}"/cmdline.txt + if [ "${BASE_BOARD}" == raspberrypi* ]; then + sed -i 's/$/ logo.nologo consoleblank=0 loglevel=0 quiet/' /"${BASE_BOOT_MOUNT_PATH}"/cmdline.txt + fi echo "disable_splash=1" >> /"${BASE_BOOT_MOUNT_PATH}"/config.txt systemctl enable splashscreen.service systemctl disable getty@tty1 From 7a8f438593fcf7a7c1c6c678877d45be95ba0d2f Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sun, 3 Nov 2024 13:51:44 +0200 Subject: [PATCH 2/2] VNC support for not user pi Fixes #571 --- .../etc/systemd/system/x11vnc.service | 6 +++--- src/modules/fullpageos/start_chroot_script | 21 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/modules/fullpageos/filesystem/root_init/etc/systemd/system/x11vnc.service b/src/modules/fullpageos/filesystem/root_init/etc/systemd/system/x11vnc.service index fef207c..3b7fd67 100644 --- a/src/modules/fullpageos/filesystem/root_init/etc/systemd/system/x11vnc.service +++ b/src/modules/fullpageos/filesystem/root_init/etc/systemd/system/x11vnc.service @@ -1,13 +1,13 @@ [Unit] Description=VNC Server for X11 -ConditionPathExists=/home/pi/.vnc/passwd +ConditionPathExists=/opt/custompios/vnc/passwd Requires=display-manager.service [Service] -ExecStart=/usr/bin/x11vnc -display :0 -auth guess -many -noxdamage -rfbauth /home/pi/.vnc/passwd -rfbport 5900 -shared +ExecStart=/usr/bin/x11vnc -display :0 -auth guess -many -noxdamage -rfbauth /opt/custompios/vnc/passwd -rfbport 5900 -shared ExecStop=/usr/bin/x11vnc -R stop Restart=on-failure RestartSec=2 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/src/modules/fullpageos/start_chroot_script b/src/modules/fullpageos/start_chroot_script index 871e72b..b192f6a 100755 --- a/src/modules/fullpageos/start_chroot_script +++ b/src/modules/fullpageos/start_chroot_script @@ -123,17 +123,20 @@ if [ "$FULLPAGEOS_INCLUDE_X11VNC" == "yes" ] then apt-get install -y --force-yes x11vnc + mkdir -p /opt/custompios/vnc + chown "${BASE_USER}":"${BASE_USER}" + # Set x11vnc password if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" != "default" ] then sudo -u pi /opt/custompios/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD" sync - if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then - echo "/home/pi/.vnc/passwd was not created. Trying again." + if [ ! -f /opt/custompios/vnc/passwd ] || [ ! -s /opt/custompios/vnc/passwd ]; then + echo "/opt/custompios/vnc/passwd was not created. Trying again." sudo -u pi /opt/custompios/scripts/setX11vncPass "$FULLPAGEOS_OVERRIDE_PASSWORD" sync - if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then - echo "/home/pi/.vnc/passwd was not created again. Giving up." + if [ ! -f /opt/custompios/vnc/passwd ] || [ ! -s /opt/custompios/vnc/passwd ]; then + echo "/opt/custompios/vnc/passwd was not created again. Giving up." echo "Failed to set a VNC password. Aborting build." exit 1 fi @@ -141,18 +144,18 @@ then else sudo -u pi /opt/custompios/scripts/setX11vncPass raspberry sync - if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then - echo "/home/pi/.vnc/passwd was not created. Trying again." + if [ ! -f /opt/custompios/vnc/passwd ] || [ ! -s /opt/custompios/vnc/passwd ]; then + echo "/opt/custompios/vnc/passwd was not created. Trying again." sudo -u pi /opt/custompios/scripts/setX11vncPass raspberry sync - if [ ! -f /home/pi/.vnc/passwd ] || [ ! -s /home/pi/.vnc/passwd ]; then - echo "/home/pi/.vnc/passwd was not created again. Giving up." + if [ ! -f /opt/custompios/vnc/passwd ] || [ ! -s /opt/custompios/vnc/passwd ]; then + echo "/opt/custompios/vnc/passwd was not created again. Giving up." echo "Failed to set a VNC password. Aborting build." exit 1 fi fi fi - ls -l /home/pi/.vnc/passwd + ls -l /opt/custompios/vnc/passwd #Enable x11vnc service systemctl enable x11vnc.service