You are not logged in.

#1 2012-12-31 21:09:03

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 516
Website

How to start and stop mpd and ncmpcpp together?

I have got the setup of mpd+ncmpcpp working together. However, to start, I first have to start mpd in the console and then ncmpcpp. Also, to stop, I have to quit ncmpcpp (pressing q) and then kill mpd (using mpd --kill).

I was just wondering if there is a way out to make the whole process easy. I wish to accomplish:
1. Start mpd followed by ncmpcpp from a ".desktop" file which would show up in the menu.
2. Stop mpd when you quit ncmpcpp.

Any comments would be much appreciated.

Offline

#2 2012-12-31 21:13:48

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,686
Website

Re: How to start and stop mpd and ncmpcpp together?

Script?

#!/bin/bash
mpd
ncmpcpp
mpd --kill

I don't use mpd, so I don't know if there are certain command line arguments you'd pass, but as a general idea this would be how to do it.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#3 2012-12-31 21:16:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How to start and stop mpd and ncmpcpp together?

I think if that is the functionality you are looking for, then maybe a different music program might suit your needs better.  I believe that cmus functions in that way.

Part of the appeal of mpd is that it runs as a daemon, so you can connect from it anywhere, be it locally or remotely.  For instance, I can connect to my server's running instance of mpd and listen and play music from that machine.  Or I can connect to my local instance of mpd and listen to music from this machine.

Offline

#4 2013-01-02 21:04:25

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 516
Website

Re: How to start and stop mpd and ncmpcpp together?

WonderWoofy, cmus seemed kind of difficult to grasp. Moc was good, but I was looking for two features, recursive search and ability to rate songs which it lacked.

Offline

#5 2013-01-04 05:25:48

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: How to start and stop mpd and ncmpcpp together?

Why not ust create a service unit for MPD or put it in your .xinitrc so it starts automatically, and just leave it running?

Offline

Board footer

Powered by FluxBB