From 8beeeac4903345f54f4045cb8e387f74472060e6 Mon Sep 17 00:00:00 2001 From: Rod Wright Date: Thu, 5 Mar 2026 14:03:00 -0500 Subject: [PATCH] Created right click menu handler --- distfiles/usr/local/bin/kiosk_rightclickmenu | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 distfiles/usr/local/bin/kiosk_rightclickmenu diff --git a/distfiles/usr/local/bin/kiosk_rightclickmenu b/distfiles/usr/local/bin/kiosk_rightclickmenu new file mode 100755 index 0000000..30071d1 --- /dev/null +++ b/distfiles/usr/local/bin/kiosk_rightclickmenu @@ -0,0 +1,23 @@ +#!/bin/bash + +xmessage -buttons "Cancel:0,Reload:1,Reboot:2,Power off:3" -default "Cancel" -center -file /etc/openkiosk/help.txt + +# Check the exit code of the button pressed +case $? in + 0) + true + ;; + 1) + pkill chromium + pkill xpdf + ;; + 2) + /usr/sbin/shutdown -r now + ;; + 3) + /usr/sbin/shutdown -P now + ;; + *) + false + ;; +esac