manual="Show me the commands; I'll handle it myself"
if dialog --question --text="League of Legends' client UI launch much faster with some modification to your system. but as far as this script can detect, the setting has not been changed yet.\n\nWould you like to change the setting now?"
then
# I tried to embed the command in the dialog and run the output, but
# parsing variables with embedded quotes is an excercise in frustration.
pkexec sh -c 'echo "kernel.yama.ptrace_scope=0" >> /etc/sysctl.conf && sysctl -p'
;;
"$manual")
dialog --info --no-wrap --text="To change the setting (a kernel parameter) until next boot, run:\n\nsudo sh -c 'sysctl -w kernel.yama.ptrace_scope=0'\n\nTo persist the setting between reboots, run:\n\nsudo sh -c 'echo \"kernel.yama.ptrace_scope=0\" >> /etc/sysctl.conf && sysctl -p'\nChange the setting then press OK or script will NOT work."
;;
*)
echo"Dialog canceled or unknown option selected: $RESULT"