Skip to content


Subversion checkout URL

You can clone with
Download ZIP
GUI to choose the grub default boot entry.
Python C Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


|                                                     |
|                                                                            |
| Copyright 2007, David Mohr <>                                |
|                                                                            |
| Version 0.2, 2007-07-28                                                    |
|                                                                            |
| Released under the GNU GPL v2 or higher                                    |
| This is free software; see the source for copying conditions. There is NO  |
|                                                                            |

A simple python GUI program to set your grub default for the next reboot.
It should run fine both under Linux and Windows. Note though that under Windows
you need to get filesystem access to your /boot to modify the grub 
configuration files. At the moment this seems to be only possible with an 
ext2/3 partition (

What it does is:
1. Check your configuration file to have the required 'default saved' setting
2. Display your boot menu options, highlighting the current default
3. After clicking on one of the buttons, the new default will be saved in
   grub's 'default' file
4. If reboot mode is enabled, and the appropriate support script is used,
   you will be prompted to reboot

It uses Tkinter, because that's included in every python installation.

* Reboot

Because each root access is needed to change the grub default and/or 
configuration, it is not possible to initiate the desktop reboot sequence from 
within the script. Also each Linux desktop environment has its own way of 
initiating a reboot, so the reboot is not handled by the script. Instead when a
reboot should happen, grub-choose-default prints a message to standard output.
A script can parse the output and search for 'reboot'. If the string is found,
then it should initiate a reboot, otherwise it should not. Return codes can't
be used here, because gksudo always exists with 0 when the authorization
See some included scripts in the reboot/ subdirectory. If you use a way to
reboot not included there, please send me the script and I'll add it in. Note
that the button to reboot is not shown by default under Linux, instead,
run grub-choose-default with '-r' if you want this functionality.

Under Windows the reboot functionality is included, because there is only one
way to shut down (actually, that's a lie: win9x & co. use a different method,
but I won't include that until someone complains to me, as that's rare

Please email me with any questions, comments or if you should find a bug at
Something went wrong with that request. Please try again.