How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
Hello devs,
The new installer of the Slint Linux distribution that I maintain allows in guided mode to fully (minus the BiosBoot partition and the ESP) encrypt the drive where Slint is installed, if this drive is dedicated to Slint.
As the layout of the partition table then includes just one partition (and optionally an additional one if there is enough space on the drive), we store a LUKS keyfile in the initrd and use cryptmount so that GRUB asks the passprase, no need to type it several times.
So far, so good.
To help blind users GRUB plays a tune when it displays its menu.
But in case of an encrypted drive this tune is played after decryption, thus blind users don't know if/when GRUB asks the passphrase, and if they type it blindly but don't hear the tune associated with the display of the boot menu in a reasonable amount of time (10 or 15 seconds or so), they don't know what
happened: was the passphrase wrong, was it not asked for some reason, or did GRUB ask to press Enter after a warning to continue?
I'd like that GRUB play a sound when asking the passphrase and/or in case of events like: the passphrase doesn't match, or another issue require an user intervention like pressing Enter to acknowledge a warning.
Is it already possible through some setting I didn't find? Or can the above be considered as a feature request? In that latter case I am of course ready to test a patch.
Best regards,
Didier
I don't know if Grub currently has any sound or accessibility support. How about having a config option to send some ASCII bell characters "\x07" to the terminal upon the events that you described? That would make a sound, but far from being a "tune". Would such a simple solution be good enough?
Regards,
Hanson
Quoted 47 lines · Didier Spaier
Hello devs,
The new installer of the Slint Linux distribution that I maintain allows in guided mode to fully (minus the BiosBoot partition and the ESP) encrypt the drive where Slint is installed, if this drive is dedicated to Slint.
As the layout of the partition table then includes just one partition (and optionally an additional one if there is enough space on the drive), we store
a LUKS keyfile in the initrd and use cryptmount so that GRUB asks the passprase, no need to type it several times.So far, so good.
To help blind users GRUB plays a tune when it displays its menu.
But in case of an encrypted drive this tune is played after decryption, thus
blind users don't know if/when GRUB asks the passphrase, and if they type it
blindly but don't hear the tune associated with the display of the boot menu
in a reasonable amount of time (10 or 15 seconds or so), they don't know what
happened: was the passphrase wrong, was it not asked for some reason, or did
GRUB ask to press Enter after a warning to continue?I'd like that GRUB play a sound when asking the passphrase and/or in case of
events like: the passphrase doesn't match, or another issue require an user intervention like pressing Enter to acknowledge a warning.Is it already possible through some setting I didn't find? Or can the above be considered as a feature request? In that latter case I am of course ready
to test a patch.Best regards,
Didier
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 4 lines · Hanson Char
I don't know if Grub currently has any sound or accessibility support. How about having a config option to send some ASCII bell characters "\x07" to the terminal upon the events that you described? That would make a sound, but far from being a "tune". Would such a simple solution be good enough?
What terminal? Might work for serial consoles but I suspect most people are using VGA and grub has to implement that terminal itself and how to play sound becomes very architecture specific.
Signature · 1 line
Len Sorensen
чт, 4 февр. 2021 г., 16:25 Lennart Sorensen <[email protected]>:
Quoted 5 lines · Hanson Char
Quoted 1 line
I don't know if Grub currently has any sound or accessibility support.
How
Quoted 2 lines
about having a config option to send some ASCII bell characters "\x07" to the terminal upon the events that you described? That would make a
Quoted 8 lines
sound,
Quoted 1 line
but far from being a "tune". Would such a simple solution be good
enough?
What terminal? Might work for serial consoles but I suspect most people are using VGA and grub has to implement that terminal itself and how to play sound becomes very architecture specific.
GRUB has following ways to play a sound:
* Sending \x7 to terminal. If you use serial or BIOS terminal it will work. With GFX terminal it will result in a character instead. Other terminals the answer varies
* Using play command you can play any sound but it works only on i386-pc and uses speaker/PIT. Many systems don't have speakers or they are not connected to motherboards
* Using morse terminal. Same limitations as play command
* Spkmodem. It's not intended for end-user sounds
There's no proper way to hook up sound to described events but there're 2 workarounds:
* Add \x7 to the messages, e.g. through using of .po/.mo translation
* Use morse terminal.
Proper implementation is a feature request
Quoted 9 lines
--
Len Sorensen_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Hi, thanks both for responding.
Le 04/02/2021 à 17:39, Vladimir 'phcoder' Serbinenko a écrit :
Quoted 17 lines
чт, 4 февр. 2021 г., 16:25 Lennart Sorensen <[email protected] <mailto:[email protected]>>:
On Wed, Feb 03, 2021 at 10:54:28PM -0800, Hanson Char wrote:
> I don't know if Grub currently has any sound or accessibility
support. How
> about having a config option to send some ASCII bell characters
"\x07" to
> the terminal upon the events that you described? That would make
a sound,
> but far from being a "tune". Would such a simple solution be
good enough?What terminal? Might work for serial consoles but I suspect most people are using VGA and grub has to implement that terminal itself and how to play sound becomes very architecture specific.
Quoted 5 lines
GRUB has following ways to play a sound:
* Sending \x7 to terminal. If you use serial or BIOS terminal it will work. With GFX terminal it will result in a character instead. Other terminals the answer varies
* Using play command you can play any sound but it works only on i386-pc and uses speaker/PIT. Many systems don't have speakers or they are not connected to motherboards
* Using morse terminal. Same limitations as play command
* Spkmodem. It's not intended for end-user sounds
A bit more context for Slint and blind folks among its users:
* Only x86_64 Arch is supported, but if I could handle it I'd like to support also Arm for the Pi, ad Debian or Arch for instance?
* Grub is installed using the i386-pc and x86-64-efi targets. Our package also include x86-64-emu, which allows our users to preview the GRUB menu
before
booting after installation or after a change in grub.cfg. This comes
handy
especially for blind users, thanks for this feature by the way.
* We play a tune at boot using the play command both in EFI and Legacy modes.
* I have no statistics to sustain this claim but I assume that most blind users take choose a machine with a PC Speaker, allowing to hear this tune.
* Out of the box we have GRUB_TERMINAL_OUTPUT=console in /etc/default/GRUB. No fancy graphics (which also helps users with a low vision).
I understand that GRUB's scope is much wider in terms of targets and use cases but permit me to speak on behalf of some of our users :-) I assume that the bullets list above would not much differ for other accessible Linux distributions, at least like Debian or Fedora, and maybe for other OS.
Quoted 4 lines
There's no proper way to hook up sound to described events but there're 2 workarounds:
* Add \x7 to the messages, e.g. through using of .po/.mo translation
* Use morse terminal.
Proper implementation is a feature request
Please let me know if you need a more formal feature request using this list or another channel and what it should include; in other words your requirements for a request to be considered.
Thanks and best regards,
Didier
Quoted 3 lines
--
Len Sorensen