You are not logged in.

#1 2008-09-03 11:41:05

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

[Solved] MPD Starts Playing Music On Startup

Hello,

I was wondering if there is a way from stopping MPD from playing music on the startup?

Thanks,
HaXiT

Last edited by haxit (2008-09-03 19:05:19)


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#2 2008-09-03 11:48:17

alsoJones
Member
Registered: 2008-09-02
Posts: 3

Re: [Solved] MPD Starts Playing Music On Startup

Do you have MPD running as a daemon in /etc/rc.conf ?

If so, remove it and it will not start playing on startup.

Offline

#3 2008-09-03 11:58:06

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [Solved] MPD Starts Playing Music On Startup

Yes, I remember having these problems myself. You should remove the mpd daemon from rc.conf and start it after you log in.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#4 2008-09-03 13:11:04

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: [Solved] MPD Starts Playing Music On Startup

If you set MPD to save its state before it quits, it resumes as soon as it starts up again. So the solution here is to either stop your music before you shut down your computer, or to tell it not to save its state (remove or comment out state_file in mpd.conf).

Last edited by fflarex (2008-09-03 13:11:53)

Offline

#5 2008-09-03 13:15:22

xdeusx
Member
Registered: 2007-10-15
Posts: 168

Re: [Solved] MPD Starts Playing Music On Startup

install mpc
and add something like
mpc stop
to /etc/rc.local.shutdown

Offline

#6 2008-09-03 19:02:33

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: [Solved] MPD Starts Playing Music On Startup

Thanks for the help guys. I will remove it from my daemons, and instead add it to autostart.sh.


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#7 2008-09-04 03:20:18

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: [Solved] MPD Starts Playing Music On Startup

xdeusx's suggestion is probably cleaner than removing it from your daemons.

EDIT: ... if it works, that is. It occurs to me that I'm not sure when /etc/rc.local.shutdown is executed in the shutdown sequence. MPD may quit before you can tell it to stop playing. Sorry for taking up a useless post if I'm wrong.

EDIT: It should work.

EDIT again: I really like this solution and I've actually decided to use it myself. I've been in the habit of just manually pausing my music before shut down, but now I just added 'mpc pause > /dev/null' to /etc/rc.local.shutdown and it works great.

Last edited by fflarex (2008-09-04 18:18:57)

Offline

Board footer

Powered by FluxBB