WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] How do I start 'mocp' at login?  (Read 2522 times)

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
[SOLVED] How do I start 'mocp' at login?
« 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.
« Last Edit: October 19, 2009, 01:16:46 PM by PingPing »

Offline 4-stroke

  • Jr. Member
  • **
  • Posts: 72
Re: How do I start 'mocp' at login?
« Reply #1 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.
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." - Douglas Adams

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How do I start 'mocp' at login?
« Reply #2 on: October 17, 2009, 05:50:15 AM »
Hm, maybe ~/.ashrc?
The only barriers that can stop you are the ones you create yourself.

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: How do I start 'mocp' at login?
« Reply #3 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.

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: How do I start 'mocp' at login?
« Reply #4 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

Offline 4-stroke

  • Jr. Member
  • **
  • Posts: 72
Re: [SOLVED] How do I start 'mocp' at login?
« Reply #5 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?
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." - Douglas Adams