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