Skip to content

Draft: debian/default/grub: Add GRUB_THEME field as default

Matheus Polkorny requested to merge polkorny/grub:master into master

I'm not sure if this is the best way to discuss this, if not, I apologize.

By default in /usr/share/grub/default the GRUB_THEME is not defined, and the project itself defines a theme called "starfield". It is not used, but it is available for use.

However, if the user wants to use it, they will have to open /etc/default/grub/ and add the GRUB_THEME field pointing to the theme in /usr/share/grub/themes/starfield/theme.txt. This, in my opinion, is not trivial not only because they have to open the file and change the field but also because in a grub-pc package update it would be checked that the /etc/default/grub/ file has been changed and would ask if they want to keep it or follow the same.

My suggestion: Set the GRUB_THEME field by default in /usr/share/grub/default and point to a symbolic link default or that is GRUB_THEME="/usr/share/grub/themes/default/theme.txt"

This way, if the user wants to use a different theme like starfield or breeze, they wouldn't have to change any package files, just create the symbolic link in /usr/share/grub/themes/. In fact, it would be possible to add to the postinst of the packages that change the theme the creation of this symbolic link, since it would not be conflicting.

In my tests, if the GRUB_THEME is defined but there is no theme, the default debian theme was loaded. I don't know the impact of this on other architectures, but I believe that in this way, in addition to allowing easier customization for the user, it also allows the creation of numerous packages that want to customize GRUB, since there would be no more conflicts and the theme would be changed automatically.

Edited by Matheus Polkorny

Merge request reports

Loading