Review Request: Support for GRUB2 submenus

Konstantinos Smanis konstantinos.smanis at
Sun Jul 29 21:30:39 BST 2012

This is an automatically generated e-mail. To reply, visit:

(Updated July 29, 2012, 8:30 p.m.)

Review request for KDE Runtime and Oswald Buddenhagen.


Recent versions of GRUB2 introduce submenus which allow for nesting levels to appear (instead of the flat list in the past).
This patch consists of two parts: the parsing part in KDM (bootman.c) and creating a menu structure from the parsed list in ksmserver (shutdowndlg.*)
The parsing part produces a list like this:

Gentoo GNU/Linux
Advanced options for Gentoo GNU/Linux
Advanced options for Gentoo GNU/Linux>Gentoo GNU/Linux, with Linux 3.4.4
Advanced options for Gentoo GNU/Linux>Gentoo GNU/Linux, with Linux 3.4.4 (recovery mode)
Windows 7 (loader) (on /dev/sda2)
???? ?????????

which is then converted into the menu structure. These full identifiers can be properly used with `grub2-reboot`.

More info about submenus:
Also check the related bug.

The parsing part of the patch can be applied in the KDE/4.9 and master branches as well (tested and working in KDE 4.8.95 and 4.9.x). ksmserver has migrated to QML since then however, and the menu structure has to wait. Currently it looks like this:
Related ML-discussion:
Update: There is a proper fix now for KDE/4.9 and master:

This addresses bug 297209.

Diffs (updated)

  kdm/backend/bootman.c 8b834d2 
  kdm/backend/dm.h 13e7b45 
  kdm/backend/util.c 6cd93ef 
  ksmserver/shutdowndlg.h e5f0942 
  ksmserver/shutdowndlg.cpp a09a1a7 



Works with the menu file produced in my system with `grub2-mkconfig`.
Also works with a custom menu file I made (as shown in the second screenshot).


Distribution's stock menu file
A custom menu file for testing


Konstantinos Smanis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list