A GUI application is started by the normal user. It's doing stuff with the bootloader and then asks for reboot.
The question is how to implement the second part: after reboot and login into the graphical session, the application must start again automatically.
it could probably add itself to the autostart of the session, but it'll start in the next session even if there was no reboot
add to the autostart and also look at the time of the last boot, but it's not reliable
add to the autostart and create a tmp file, so it will be cleared by the reboot (is it guaranteed?)
add to the autostart and add a
@rebootcron job (is it working? does it run before the
~/.config/autostart/of the GUI session?)
What is the best way?