I have a shell script that I created to change the next EFI boot then execute a reboot. If I execute it in a terminal window it works fine, but if I execute it using an Icon in KDE it reboots, but does not change the next efiboot. I have tried setting the Icon to run as root, but that didn't make a difference.
Here is the script
#!/bin/bash kdialog --title "Reboot to Windows Prompt" --yesno "Are you sure you want to reboot to Windows?"; if [ $? = 0 ]; then sudo efibootmgr -n 0 reboot else kdialog --msgbox "Reboot aborted by user" fi
Someone even suggested having a pause between the efibootmgr and the reboot, but that didn't work either.