Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: PingPing on October 17, 2009, 05:04:10 AM

Title: [SOLVED] How do I start 'mocp' at login?
Post by: PingPing on October 17, 2009, 05:04:10 AM
I want to boot microcore so that the command:

mocp -m /mnt/sdb1/music

is executed at the very end of the boot process (ie. after autologin) so that microcore becomes a defacto jukebox for me.

I've tried puting the above command into /opt/bootlocal.sh or ~/.profile but both methods end with failure.
Is there anyway I can do it?

I'm running microcore 2.3.1.
Title: Re: How do I start 'mocp' at login?
Post by: 4-stroke on October 17, 2009, 05:17:15 AM
Does moc work at all for you? There has been some problems with moc so make sure you have the latest version.
Title: Re: How do I start 'mocp' at login?
Post by: curaga on October 17, 2009, 05:50:15 AM
Hm, maybe ~/.ashrc?
Title: Re: How do I start 'mocp' at login?
Post by: mikshaw on October 19, 2009, 08:07:16 AM
Does mocp run well in console/terminal when you start it manually?

Is sdb1 a usb device, and if so is it being detected and mounted in time to be used?

Is your system still set up to startx X automatically?  There may be a conflict in that case, since mocp tries to create a curses interface by default.  Try mocp -S -m /mnt/sdb1/music, to start it without the gui.
Title: Re: How do I start 'mocp' at login?
Post by: PingPing on October 19, 2009, 12:41:47 PM
I have it working now.
I have:

sleep 1 && alsactl restore && /usr/local/bin/mocp -m /mnt/sdb1/music

in ~/.profile.
I found I needed the 1 second for things to settle down otherwise I had complaints that alsactl couldn't find any soundcards.
I've saved my alsamixer configuration in /etc/asound.state file and it's included in /opt/.filetool.lst so that it survives a reboot.
Everything is working now.  <2.5% CPU usage on my Atom CPU, <60MB of RAM used when playing .mp3s and <11MB of disc space (excluding my .mp3 library).

 :D
Title: Re: [SOLVED] How do I start 'mocp' at login?
Post by: 4-stroke on October 19, 2009, 11:56:41 PM
Thanks for sharing how you did it! ;D

I'm planning to do something like this myself.

One question: Why does it work in .profile and not bootlocal.sh?