Beispiel #1
0
def reset_all_setttings():
    set_setting_item("GRUB_TIMEOUT", "10")
    remove_item("GRUB_GFXMODE")
    remove_item("GRUB_MENU_PICTURE")
    remove_item("GRUB_COLOR_HIGHLIGHT")
    remove_item("GRUB_COLOR_NORMAL")
    remove_item("GRUB_FONT")
Beispiel #2
0
def set_item_color(color_fg, color_bg, is_highlight_item=False):
    '''
    Set the color of grub items
    '''
    if is_highlight_item:
        set_setting_item("GRUB_COLOR_HIGHLIGHT", "%s/%s" % (color_fg, color_bg))
    else:
        set_setting_item("GRUB_COLOR_NORMAL", "%s/%s" % (color_fg, color_bg))
Beispiel #3
0
def set_font(font_size, font_file):
    run_command("sudo grub-mkfont -s %s -o /boot/grub/unicode.pf2 %s" % (font_size, font_file))
    set_setting_item("GRUB_FONT", "/boot/grub/unicode.pf2")
Beispiel #4
0
def set_background_image(valid_img_file):
    """
    Set grub background
    """
    set_setting_item("GRUB_MENU_PICTURE", valid_img_file)
Beispiel #5
0
def set_resolution(resolution):
    '''
    Set resolution.
    '''
    set_setting_item("GRUB_GFXMODE", resolution)
Beispiel #6
0
def set_default_delay(delay_time):
    set_setting_item("GRUB_TIMEOUT", delay_time)