Boot Sound


Pinballwzd

Member
Joined
Sep 4, 2008
Messages
255
Age
53
Location
B.C Canada
I searched this and last mention I can find was back in 08 when boot animations were discussed.
I am not quite sure if there is a way of currently doing this but I would like to see if there could be a boot sound played.
It seems so strange not having some sort of sound come from the Pandora when it is booting..
Seems naked without something.. Even a beep would be nice.

David...
 
Heh, I still remember how everyone desperately wanted to get rid of the GP2X one back in the day(myself included)!

:)
 
Eisner said:
I searched this and last mention I can find was back in 08 when boot animations were discussed.
I am not quite sure if there is a way of currently doing this but I would like to see if there could be a boot sound played.
It seems so strange not having some sort of sound come from the Pandora when it is booting..
Seems naked without something.. Even a beep would be nice.

David...
I always thought this was a pretty good offer
 
Last edited by a moderator:
So is there an easy way to add a sound file to the boot sequence ?
I would be nice if the OS had a feature selection where you could choose the sound file and either turn on or off but that would be asking a lot...

David...
 
Eisner said:
I would be nice if the OS had a feature selection where you could choose the sound file and either turn on or off but that would be asking a lot...

David...
Its Linux not windows! theres 101 ways to skin a cat - asking a lot...

I could just say plop this file into here are run this but I'm not going to - heres how you can work out how to do it for yourself...

The easiest way is to just make a simple shell script (I'll assume you know very little about Linux)

this is a series of commands in a file that are executed in just the same way as a DOS batch (.bat) file is executed

along with ALSA's software - a sound API there is a command line application called aplay

open up a terminal and type

aplay /usr/share/sounds/purple/alert.wav

(make sure your volume is turned up! ;) )

So far so good....

in Linux most of the global (none user specific) setting are held in /etc

within /etc there are a set of sub directories called rc0.d to rc6.d (theres also a rcS.d) as well - basically to gloss over things and not make this a total marathon - you only need to be worried about the default startup run level which is rc5.d - inside this there are a bunch of links (short cuts) to the actual scripts which are run

you will notice that these sym-links (symbolic links - go go google!) all start with an S and a 2 digit number, this is the order (low to high) they are
executed in when making your link you will have to experiment get it where you want it, too early its possible the sound hardware or rather ALSA isn't
initialised...
too late and it might be happening as you log in (if you want it after login there is an obvious way to start scripts in the system menu)

the start up scripts are all kept in /etc/init.d were talking pre Xorg here

you can verify this by adding -l to ls when you look in /etc/rc5.d

ls -l /etc/rc5.d

so /etc is also for obvious reasons a protected area you'll need ROOT :-o permissions to mess with it (don't be scared you're learning stuff here!)

sudo nano /etc/init.d/fanfare.sh

nano is a dead obvious and nice ascii editor (I'll probably get flamed for not including a vi tutorial here)

You really dont need the .sh for a number of reasons but its a convention some people use...

#!/bin/sh
/usr/bin/aplay /usr/share/sounds/alert.wav

you need to give this file executable permission - more dumb linux stuff, like who needs all these layers of protection anyhow....

so run
sudo chmod +x /etc/init.d/fanfare.sh

the #! at the start helps the shell realise what interpreter it needs for this script - although almost all startup scripts are shell scripts it could be python or any other script language - damn more needless choice and flexibility *sigh*

its good practice to specify fully where the executable is, if its not internal to the shell as your default path *could* be quite different to the normal runtime

now the only thing missing is to link up the simple script with the startup sequence

ln -s /etc/init.d/fanfare.sh /etc/rc5.d/Sxxfanfare

you will have to replace the xx in /etc/rc5.d/Sxxfanfare with a numeric value - thats your job to work out.... >:)

now thats about it I've glossed over areas of interest you can google for yourself and on a desktop you can use the man command to find out more about the commands used or even google something like
man ln

and it'll tell you about the command (alas for space reasons the man pages are not installed on the precious internal nand - mind you I always boot from SD
and I've installed alsorts of dev stuff I actually had to *reboot* :-o my pandora to nand to check out this would all work!!!)

anyhow not the whole thing on a plate for you - but better yet.... enough clues to fix it yourself....


if you don't like something on your pandora fix it! - you don't have a handheld games console - you have a FULL blown Linux desktop pc shrunk to a handheld with some gaming controls added oh and silly battery life and did i mention those well designed controls and then theres the booting from different devices and the high res display that get this is touch sensitive - the guys who made this just went silly - who need all that stuff......

ME :D
 
Last edited by a moderator:
@ chris_c

Many thanks for the thoughtful and informative reply, I reckon I learnt more in this one post than any other in the two years of reading this forum. :D
 
Nation.A.List said:
@ chris_c

Many thanks for the thoughtful and informative reply, I reckon I learnt more in this one post than any other in the two years of reading this forum. :D
Thanks! but did you manage to get a boot sound going? - or are you more confused :D
 
Last edited by a moderator:
chris_c said:
Nation.A.List said:
@ chris_c

Many thanks for the thoughtful and informative reply, I reckon I learnt more in this one post than any other in the two years of reading this forum. :D
Thanks! but did you manage to get a boot sound going? - or are you more confused :D
I don't have my Pandora yet so no chance of any boot sound for now, but if I did I reckon I could, thanks to your post.
 
Last edited by a moderator:
Nation.A.List said:
chris_c said:
Nation.A.List said:
@ chris_c

Many thanks for the thoughtful and informative reply, I reckon I learnt more in this one post than any other in the two years of reading this forum. :D
Thanks! but did you manage to get a boot sound going? - or are you more confused :D
I don't have my Pandora yet so no chance of any boot sound for now, but if I did I reckon I could, thanks to your post.
You can always practice your new Linux skills on a pc while you wait ;)
 
Last edited by a moderator:
I also thought it a useful post but haven't yet had time to implement it (5 kids) and must get a LiveCD of some distro going at some point, on my crappy Win box.

I agree with Eisner though, it's an eerily quiet system which puzzles people you show it to, as there's zero sound in the OS, which kinda keeps you wondering if choices have registered etc (though I use the SD card lights for that + patience). CoLD SToRAGEs offer I remember and it would not have been a bad idea to have jumped on it but as he said, the timing wasn't right.

Overall though people have bought the Pandora for a gamut of reasons and for some, a convenient and fast way to implement tweaks and improvements is whats sought/hoped for, due to todays instant culture and societies time constraints on life in general. The machine was billed as requiring zero linux know how and in general that is correct but in the spirit of community, I feel its good for those in the know (whose life paths have led to time mastering linux know how) to offer guides, hints and pointers, or outright tweaks that help the Pandora appeal further to, dare I say it (popcorn and beer alert :)) a larger userbase.

Its all very well that its capable of easily doing a ton of things which may make it more appealing but if that's only possible to an elite of users, who don't share their knowledge or act to inspire, then the rest of the users have a 'limited experience' due to their same.

SomeGuy99 wrote some great breakdowns in the past (I think he moved on due to the low userbase at the time), mcobit from limited linux background is a porting machine and has offered up a 'how to' emulate him, Stuckie showed enormous potentials for the Pandora with alternate OS but feels he baffled a few people in the explaining and now Gregor has offered a similar set up in a novice friendly form. Its great community actions like these and now Chris_C's that add to this machine daily. Top post Chris_C so we'll have to see if people can get it to work whilst learning in the process.

Then again the first thing I do in any windows machine is disable the boot sound :) Sorry to waffle.
 
If anyone gets it working I insist you suffer the win95 boot sound for at least a month.... :D

It has been pointed out to me that in my examples I referenced a wav file from the IM messenger that is to be removed on the next update, I figure that you can all find your own wav files ! and used that file just for illustration purposes
 
Drat, my TL:DR didn't pluck enough heart strings to get this on a platter from an expert. Guess its RTFM time afterall and hell "I ain't even married" (j/k):lol:

 
I have gone through this scriptotutorial but I am lost when it come to the following..

ln -s /etc/init.d/fanfare.sh /etc/rc5.d/Sxxfanfare
you will have to replace the xx in /etc/rc5.d/Sxxfanfare with a numeric value - thats your job to work out.... >

Being a script virgin does not help...
I know that there are 7 Sxx files in the folder and I know I need to link my fanfare.sh file to the boot script file ( of my choice ) but I keep getting file or folder not found.

So I have to pick one of the 7 script files to link to and play with each to see where the sound file kicks in.. Ok.
So if I choose S29oprun-init how do I link them ?

David...
 
Eisner said:
I have gone through this scriptotutorial but I am lost when it come to the following..

ln -s /etc/init.d/fanfare.sh /etc/rc5.d/Sxxfanfare
you will have to replace the xx in /etc/rc5.d/Sxxfanfare with a numeric value - thats your job to work out.... >

Being a script virgin does not help...
I know that there are 7 Sxx files in the folder and I know I need to link my fanfare.sh file to the boot script file ( of my choice ) but I keep getting file or folder not found.

When did you get this message, while running ln? If yes, exists /etc/init.d/fanfare.sh? Did you call ln as root (i.e. with sudo)?

So I have to pick one of the 7 script files to link to and play with each to see where the sound file kicks in.. Ok.
So if I choose S29oprun-init how do I link them ?

No, don't do this! You have to create a new link in this folder; if you're using an existing one the originally assigned task is not done (which can have all kinds of undesired effects)!

If this is not clear already: the numeric value defines the order in which the scripts are called, so I would start with the highest possible value and check if the sound comes in time.
 
Last edited by a moderator:
to clarify a little further

ln -s source destination

where source is the existing file ie fanfare.sh and destination is the new "pretend" file or shortcut
just call it symbolic link and everyone will think you know what you're about ;)

so...

sudo ln -s /etc/init.d/fanfare.sh /etc/rc5.d/S99fanfare
sudo ln -s /etc/init.d/fanfare.sh /etc/rc5.d/S00fanfare
sudo ln -s /etc/init.d/fanfare.sh /etc/rc5.d/S50fanfare

would make the sound 3 times during bootup!
 
I got it working ! I got it working !
OMG I got it working...

Thanks very much to all and especially to Chris...
I know it was basically spoon fed but this is the first time I have done something like this in Linux.

Small learning curve but I get how it works...
Just have to work on the position of the sound a bit but I now feel ok doing this...

Cheers,

David...
 
Just thought I would add some things I learned... ( only for beginners )

Step 1
Open a Terminal

The folowing will open the nano which is an ascii editor. Will ask you for a password but will not show characters.
sudo nano /etc/init.d/fanfare.sh (change fanfare to bootsound or whatever you want)
Step 2
Then type the following
#!/bin/sh
/usr/bin/aplay /usr/share/sounds/alert.wav ( alert.wav can change to whater sound you are planning on putting into the sounds folder )
Press [select] X to exit then [select] 1 to save. Then enter will escape the editor.
Step 3
Give this file executable permission by typing the following.
sudo chmod +x /etc/init.d/fanfare.sh (use whatever file name you chose in step 1)
Step 4
Now you have to create the sounds folder. Type the following.
sudo mkdir /usr/share/sounds/
Step 5
Now transfer the sound files into this folder. Make sure they are called alert.wav
sudo mv [Enter the path location to the alert.wav file ] /usr/share/sounds/
Step 6
Create the Symbolic link to the .sh file you created in Step 2.
sudo ln -s /etc/init.d/fanfare.sh /etc/rc5.d/S99fanfare ( change the fanfare to bootsound or whatever to want to call it. The ln is a lower case L :))

Note: You can change the number value to 00 to 99. This will determine where in the boot process you will hear your sound.
Some things I learned along the way :
When you type sudo it is giving you permission to work in the protected folders. You will need to type in your password each time.
Play with what number value you use in the Symbolic link.. I found that it will always play when the loading bar is present on boot. 00 starts about 1/2 way and 99 is near when the loading bar is finished.

If you want to change the Symbolic link to a different value, type:

sudo mv /etc/rc5.d/S99fanfare /etc/rc5.d/S50fanfare (where fanfare will be whatever name you used in Step 6)

Hope this helps. If there is an error here, please tell me and I will change it.. Thank you again Chris...

David...
 
...and another *nix haxor dude is born!

Thats a great breakdown and I can't fault it - well done!

most impressed you found the mv command for yourself !

you might find this useful http://tldp.org/LDP/abs/html/

in addition

theres a whole bunch of other guides http://tldp.org/guides.html
 
Back
Top