Click to See Complete Forum and Search --> : Boot to music?


rycanada
10-02-2001, 01:05 AM
G'day g'day.

I'm trying to get my machine to have two boot options:

Music (default) - where it, without requiring login or any input from the user, starts up into an mp3 player on a playlist I've specified. This will work without any input from the user (it's for when I take the monitor off my desk and just want music while I study).

Proper use (have to press something during bootup and it will avoid music). This will lead to the regular login screen.

Any ideas? I don't think this is a job for LILO, at least, not the LILO concepts I'm familliar with.

Thanks
Ryan Stoughton

camelrider
10-02-2001, 07:03 AM
Damn.!!. I put a bit of effort into a reply to this question and when I hit "Add Reply", it went off into the ether!

It's too late at night after a hard day for me to put it together again so if you haven't gotten a solution by the time I check this board again in the morning I'll try again.

Sorry about that!! LILO could be your answer.
It's all in the boot level and the xinit script.

--

Now to see if this answer will be posted....

Rob 'Feztaa' Park
10-02-2001, 02:07 PM
Well, it probably wouldn't be worth the trouble to set up a dedicated mp3 playing mode...

IMO, just open XMMS :)

Jomboni
10-02-2001, 03:08 PM
I think it'd be cool to play some sort of musical fanfare midi or mp3 file on bootup, it'd be interesting, if nothing else.

albertfuller
10-03-2001, 11:58 PM
Originally posted by rycanada:
<STRONG>G'day g'day.

I'm trying to get my machine to have two boot options:

Music (default) ... Proper use (have to press something during bootup and it will avoid music). This will lead to the regular login screen.</STRONG>

the sad but simple answer is no.

the boot process is the starting up of core OS components and an mp3 player in your linux system cannot be playing because it requires the system which is on the way to coming up.

you should be able to get away with playing mp3 music AT THE END OF THE BOOT UP as there is a local file (rc.local or boot.local depending on the system) -- personally I hope to have your mp3 do a playlist rather than one song.

well have fun...

RTFM
10-04-2001, 12:04 AM
Well, you could set it to replace the login program with the mp3 script you make.

You would probably have to install the OS twice to be able to hit a button and be able to login this way though.

But a small install with nothing but an mp3 player can be had for under 50 megs.

Craig McPherson
10-04-2001, 02:47 AM
Sigh. I actively maintain a dedicated MP3 jukebox that I created, so I imagine I know a little bit about this subject, and let me begin by saying that all the previous posts in this thread are 90% wrong.

This is what runlevels are for, people. I find it incredibly amazing that not a single person on this message board other than myself still knows what runlevels were intended before and how to leverage them, and some of the previous posts just border on ignorance. Ignore the trolls.

Follow along with me here. I'm going to cover this process fairly broadly, but if you'd like me to provide more detail on a particular step, I'd be happy to.

1. Decide which runlevel you're going to use for "normal mode" and which runlevel you're going to use for "music mode". I'm going to assume you'll use 2 and 3 respectively, but adjust as appropriate.

2. In /etc/inittab, set 2 to your default runlevel, and, assuming the runlevel is already configured as you like it for normal use, just leave it alone.

3. Go into the rc directory for runlevel 3 (/etc/rc3.d on Debian, /etc/rc.d/rc3.d on Red Hat), and turn off everything that you won't be needing for the music runlevel -- this'll be pretty much everthing, but you should leave syslog running at the very least.

4. Edit your /etc/inittab again, and change it so that a getty (or mingetty, or whatever) no longer loads on TTY1 for runlevel 3. Then set your music program to load on TTY1 during runlevel 3 instead. You can either leave the rest of the gettys turned on for runlevel 3, so you can use them for maintenance when in "music" mode if you need to, or you can turn them off so your box will really only do nothing but music.

4. It goes without saying, if you have an X display manager running from inittab, make sure it's disabled for runlevel 3.

5. Now, edit the configuration file for your bootloader and add two entries, one for runlevel 2 (you don't need to do anything special for this), and one for runlevel 3 (just use the kernel argument "3" to make the kernel boot into runlevel 3), using appropriate labels for each, then reinstall the bootloader.

6. Reboot the system and test it out.

That should do it. Please let me know if you'd like me to be more specific about any of these steps?

I wrote a much more detailed post about this in the "how I did it" forum about a year ago, when I first set up my MP3 jukebox. You might enjoy reading it.