diff --git a/0001-kiosk-script-Copy-and-run-the-script-from-XDG_RUNTIM.patch b/0001-kiosk-script-Copy-and-run-the-script-from-XDG_RUNTIM.patch new file mode 100644 index 0000000..e15afb0 --- /dev/null +++ b/0001-kiosk-script-Copy-and-run-the-script-from-XDG_RUNTIM.patch @@ -0,0 +1,56 @@ +From 9497651214baaae6dabe7cc1971a1799633983a6 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Fri, 22 Nov 2024 17:04:09 +0100 +Subject: [PATCH] kiosk-script: Copy and run the script from XDG_RUNTIME_DIR + +Some setup may enforce the noexec flag on the HOME directories. + +That prevents any executable placed in the HOME directory from running, +including the GNOME Kiosk script session. + +To work around such an issue, copy and execute the script from the +XDG_RUNTIME_DIR instead. + +Signed-off-by: Olivier Fourdan +--- + kiosk-script/gnome-kiosk-script | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/kiosk-script/gnome-kiosk-script b/kiosk-script/gnome-kiosk-script +index e45438d..c4ab176 100755 +--- a/kiosk-script/gnome-kiosk-script ++++ b/kiosk-script/gnome-kiosk-script +@@ -1,8 +1,10 @@ + #!/usr/bin/sh + +-if [ ! -e ~/.local/bin/gnome-kiosk-script ]; then +- mkdir -p ~/.local/bin ~/.config +- cat > ~/.local/bin/gnome-kiosk-script <<- "EOF" ++EXECDIR=~/.local/bin ++ ++if [ ! -e $EXECDIR/gnome-kiosk-script ]; then ++ mkdir -p $EXECDIR ~/.config ++ cat > $EXECDIR/gnome-kiosk-script <<- "EOF" + #!/bin/sh + # This script is located in ~/.local/bin. + # It's provided as an example script to show how +@@ -16,8 +18,14 @@ if [ ! -e ~/.local/bin/gnome-kiosk-script ]; then + exec "$0" "$@" + EOF + +- chmod +x ~/.local/bin/gnome-kiosk-script ++ chmod +x $EXECDIR/gnome-kiosk-script + touch ~/.config/gnome-initial-setup-done + fi + +-exec ~/.local/bin/gnome-kiosk-script "$@" ++# Copy and run the script from the XDG_RUNTIME_DIR directory if that exists ++if [ -d $XDG_RUNTIME_DIR ]; then ++ cp $EXECDIR/gnome-kiosk-script $XDG_RUNTIME_DIR/ ++ EXECDIR=$XDG_RUNTIME_DIR ++fi ++ ++exec $EXECDIR/gnome-kiosk-script "$@" +-- +2.47.1 + diff --git a/gnome-kiosk.spec b/gnome-kiosk.spec index d054280..0b1568c 100644 --- a/gnome-kiosk.spec +++ b/gnome-kiosk.spec @@ -43,6 +43,8 @@ Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas Patch0: 0001-kiosk-app-Do-not-add-the-window-in-kiosk_app_new_for.patch # https://issues.redhat.com/browse/RHEL-36521 Patch1: 0001-search-app-Use-firefox-from-flatpak.patch +# https://issues.redhat.com/browse/RHEL-71757 +Patch2: 0001-kiosk-script-Copy-and-run-the-script-from-XDG_RUNTIM.patch %description GNOME Kiosk provides a desktop enviroment suitable for fixed purpose, or