grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How-to make grub play a sound when it asks a passphrase and/or in ca


From: Didier Spaier
Subject: Re: How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
Date: Thu, 4 Feb 2021 21:45:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Hi, thanks both for responding.

Le 04/02/2021 à 17:39, Vladimir 'phcoder' Serbinenko a écrit :

чт, 4 февр. 2021 г., 16:25 Lennart Sorensen <lsorense@csclub.uwaterloo.ca <mailto:lsorense@csclub.uwaterloo.ca>>:

    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.

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.

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

-- Len Sorensen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]