Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

GUI to choose the grub default boot entry.

Fetching latest commit…

Cannot retrieve the latest commit at this time

README
/============================================================================\
| grub-choose-default.py                                                     |
|                                                                            |
| Copyright 2007-2008, David Mohr <david@mcbf.net>                           |
|                                                                            |
| Version 0.4, 2010-03-XX                                                    |
|                                                                            |
| Released under the GNU GPL v2 or higher                                    |
| This is free software; see the source for copying conditions. There is NO  |
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.|
|                                                                            |
\============================================================================/

Homepage: http://ds.mcbf.net/wiki/GrubChooseDefault

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 (http://www.fs-driver.org/).

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
succeeded. 
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
nowadays).


*****************************************************************************

This version only works with grub2 (grub-pc). If you are using grub-0.9x
(grub-legacy), then please use the v0.3 release.


Please email me with any questions, comments or if you should find a bug at 
david@mcbf.net.


Many thanks to Kjell Braden for sending some patches and getting 
grub-choose-default into debian!
Something went wrong with that request. Please try again.