playing a tune at startup
Keith Wessel
keith at wessel.com
Wed Apr 8 17:36:19 EDT 2015
I love that crazy idea! I have yet to get my USB to serial adapter working in Grub2 (need sighted assistance to finish the job as those of you on the Gentoo-accessability list saw me post last week). This would be great in the meantime and great if my USB to serial adapter wasn't around... and great for folks who don't want to bother setting up a serial terminal.
BTW, John, there's a slight bug in your script. The grub init tune and play routine accept a value of 0 as a rest and, if a very low value like 1 is used instead, rounds it up to something that can be played like a 20 or 40. The beep utility takesa value below the lowest freq the speaker can play and converts it to a rest. As a result, the 1 I used as a rest in my tune was a rest with beep but a low grumble (sounded like a drumroll through a PC speaker) with Grub.
I'd suggest having the script accept values of 0 in the grub init tune and converting them to 1 before passing them to beep. That way, both Grub and beep would produce similar output.
If you pass a value of 0 to beep for the freq, it skips it.
Keith
-----Original Message-----
From: Speakup [mailto:speakup-bounces at linux-speakup.org] On Behalf Of John G Heim
Sent: Wednesday, April 08, 2015 4:08 PM
To: Glenn / Lenny; Speakup is a screen review system for Linux.
Subject: Re: playing a tune at startup
I'm not sure you can get a beep for each item on the grub menu any more.
You used to do that by editing the grub config file and inserting n
ASCII character 7 on the title line for each boot stanza. But there is
no reason that has to work at all any more -- it would depend on how the
grub menu is displayed. But another problem is that the grub config file
is generated by update-grub now. If you edit the config file, it will be
over written next time you run update-grub.
Crazy idea... We should try to get the grub developers to beep the morse
code for the characters of each grub menu item. Perhaps if you press the
right arrow key, it beeps the morse code for the first letter of the
line. Press it again, it beeps the second letter. Even if you don't know
morse code, you could do it slowly enough to look it up. For most items,
you'd need only the first letter or 2.
On 04/07/2015 07:54 PM, Glenn / Lenny wrote:
> Since GRUB 2, I haven't known how to alter GRUB, I would like to set the
> time-out, and it would be nice to have a beep for each item, or at least a
> beep at the top and bottom, and I would like to change the order of the
> items.
> Maybe it is easier now, but I don't know how to do it.
> Thanks for any info.
> Glenn
> ----- Original Message -----
> From: "Keith Wessel" <keith at wessel.com>
> To: "'Speakup is a screen review system for Linux.'"
> <speakup at linux-speakup.org>
> Sent: Tuesday, April 07, 2015 11:06 AM
> Subject: RE: playing a tune at startup
>
>
> Thank you, Sir! Got it, installed the beep utility, and now I have a cavalry
> charge on boot-up!
>
>
> GRUB_INIT_TUNE="800 523 2 698 2 880 2 1046 1 1 3 880 2 1046 4"
>
> What a nifty utility!
>
> Keith
>
>
> -----Original Message-----
> From: Speakup [mailto:speakup-bounces at linux-speakup.org] On Behalf Of John
> G. Heim
> Sent: Friday, April 03, 2015 7:19 PM
> To: Speakup is a screen review system for Linux.
> Subject: Re: playing a tune at startup
>
> Sorry, I must have moved it. I don't remember doing that. Anyway:
>
> wget http://www.iavit.org/~john/debian/grub-init-tune
>
>
> On 04/03/2015 03:48 PM, Keith Wessel wrote:
>> John,
>>
>> I'm finally on grub2 and was eager to dive in and make myself a catchy
>> little tune! Sadly, your script gives me a 404. Where did it go???
>>
>> Keith
>>
>>
>> -----Original Message-----
>> From: Speakup [mailto:speakup-bounces at linux-speakup.org] On Behalf Of John
>> G. Heim
>> Sent: Tuesday, February 11, 2014 1:38 PM
>> To: Speakup is a screen review system for Linux.
>> Subject: playing a tune at startup
>>
>> All,
>>
>> I've written what i think is a handy little utility for testing and
>> experimenting with grub init tunes. To use it, you can do one of three
>> things:
>> 1. Just run the script. In this case, it will read /etc/default/grub and
>> play the current GRUB_INIT_TUNE.
>> 2.Set the GRUB_INIT_TUNE environmental variable to a tune. In this case,
>> it will play your tune. This allows you to try out different tunes.
>> 3. Use one of the tunes I've created. Do this by editing the script and
>> uncommenting the line for the tune you want to try. There are several
>> tunes listed at the top of the script.
>>
>> The script plays the GRUB_INIT_TUNE and then echos it to the console.
>> To save a tune, just redirect the output to your grub default file,:
>>
>> # grub-init-tune >> /etc/default/grub
>> # update-grub
>>
>> To download the script, point a browser here:
>> http://www.iavit.org/~john/grub-init-tune
>>
>>
>> Or:
>> # wget http://www.iavit.org/~john/grub-init-tune
>> # chmod 07555 grub-init-tune
>> _______________________________________________
>> Speakup mailing list
>> Speakup at linux-speakup.org
>> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
>>
>> _______________________________________________
>> Speakup mailing list
>> Speakup at linux-speakup.org
>> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
> _______________________________________________
> Speakup mailing list
> Speakup at linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
>
> _______________________________________________
> Speakup mailing list
> Speakup at linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
>
> _______________________________________________
> Speakup mailing list
> Speakup at linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
>
--
John Heim, jheim at math.wisc.edu, skype:john.g.heim
_______________________________________________
Speakup mailing list
Speakup at linux-speakup.org
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
More information about the Speakup
mailing list