Page 1 of 1

Command to force system reboot

Posted: Fri Sep 25, 2009 3:25 am
by tbreina
I'm writing an installer program and need to force a system reboot. I suppose I could do this through wxExecute, but wanted to know if there was a better (cross-platform?) method to restart the computer from my program.

Thanks.
-Tony

Posted: Fri Sep 25, 2009 7:46 am
by doublemax

Posted: Fri Sep 25, 2009 1:42 pm
by tbreina
How could I have missed that!

Thanks.
-Tony
:oops:

Re: Command to force system reboot

Posted: Thu Jan 09, 2020 3:59 pm
by Parduz
I would like to update the given link (which is dead):
https://docs.wxwidgets.org/3.0/group__g ... 8fefa7e5c8

...then ask: there's an example about how to get the access rights under Linux to use this function to reboot?
(sorry for the necrothreading but i think this one is still relevant)

Re: Command to force system reboot

Posted: Thu Jan 09, 2020 5:30 pm
by DavidHart
I would like to update the given link (which is dead):
https://docs.wxwidgets.org/3.0/group__g ... 8fefa7e5c8
Safer to write 'stable' rather than specifying '3.0', which won't be stable forever:
https://docs.wxwidgets.org/stable/group ... 8fefa7e5c8
how to get the access rights under Linux to use this function to reboot?
There used to be lots of helper programs to do that: gksu, gnomesu, kdesu... For some reason they are now unfashionable and tend to disappear without notice. However this post should help.

Or see this wxForum thread.