All of lore.kernel.org
 help / color / mirror / Atom feed
* How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
@ 2021-02-03 12:37 Didier Spaier
  2021-02-04  6:54 ` Hanson Char
  0 siblings, 1 reply; 5+ messages in thread
From: Didier Spaier @ 2021-02-03 12:37 UTC (permalink / raw)
  To: grub-devel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
  2021-02-03 12:37 How-to make grub play a sound when it asks a passphrase and/or in case of an issue Didier Spaier
@ 2021-02-04  6:54 ` Hanson Char
  2021-02-04 15:23   ` Lennart Sorensen
  0 siblings, 1 reply; 5+ messages in thread
From: Hanson Char @ 2021-02-04  6:54 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]

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

On Wed, Feb 3, 2021 at 4:38 AM Didier Spaier <didier@slint.fr> wrote:

> 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 2681 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
  2021-02-04  6:54 ` Hanson Char
@ 2021-02-04 15:23   ` Lennart Sorensen
  2021-02-04 16:39     ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Sorensen @ 2021-02-04 15:23 UTC (permalink / raw)
  To: The development of GNU GRUB

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.

-- 
Len Sorensen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
  2021-02-04 15:23   ` Lennart Sorensen
@ 2021-02-04 16:39     ` Vladimir 'phcoder' Serbinenko
  2021-02-04 20:45       ` Didier Spaier
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2021-02-04 16:39 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

чт, 4 февр. 2021 г., 16:25 Lennart Sorensen <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

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

>
> --
> Len Sorensen
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 2504 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How-to make grub play a sound when it asks a passphrase and/or in case of an issue.
  2021-02-04 16:39     ` Vladimir 'phcoder' Serbinenko
@ 2021-02-04 20:45       ` Didier Spaier
  0 siblings, 0 replies; 5+ messages in thread
From: Didier Spaier @ 2021-02-04 20:45 UTC (permalink / raw)
  To: grub-devel; +Cc: Storm Dragon, Samuel THIBAULT

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
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-04 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 12:37 How-to make grub play a sound when it asks a passphrase and/or in case of an issue Didier Spaier
2021-02-04  6:54 ` Hanson Char
2021-02-04 15:23   ` Lennart Sorensen
2021-02-04 16:39     ` Vladimir 'phcoder' Serbinenko
2021-02-04 20:45       ` Didier Spaier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.