LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-08-2011, 08:38 AM   #1
george-lappies
Member
 
Registered: May 2011
Location: Secunda, South Africa
Distribution: Slackware 13.37
Posts: 181

Rep: Reputation: 9
how to autostart mpd?


Hi all what would be the best way to autostart mpd when I login? I guess it wont be necessary to run as root so it should only auto start when I login with my details either from cli or xfce?
 
Old 06-08-2011, 08:53 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
mpd is designed to be run as a daemon. When I had it installed here I used to start it from /etc/rc.d/rc.local on boot.

Not using it at the moment, but I may go back to it as I quite like the way it works.
 
Old 06-08-2011, 08:54 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Are you referring to MPICH2? With the latest release there is no need to have this daemon running all the time.
 
Old 06-08-2011, 09:26 AM   #4
george-lappies
Member
 
Registered: May 2011
Location: Secunda, South Africa
Distribution: Slackware 13.37
Posts: 181

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by Reuti View Post
Are you referring to MPICH2? With the latest release there is no need to have this daemon running all the time.
It is the music player daemon mpd.

I tried rc.local but get error saying it cannot find any audio devices. Once xfce is up I can start it though...
 
Old 06-08-2011, 09:42 AM   #5
diwljina
Member
 
Registered: Jun 2009
Distribution: Slackware, Debian
Posts: 111

Rep: Reputation: 8
I put this little script to autostart file for my user account:

Code:
#!/bin/bash
if [ -z `pgrep -x mpd` ]; then
        /usr/bin/mpd /home/user/.mpd/config > /dev/null
fi
exit 0
so it can be started when I turn on my machine, but not when I log in and log out and is already running.
 
Old 06-08-2011, 09:46 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,200

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
In Xfce: Settings -> Sessions & Startup -> Application Autostart.

You can add mpd there.
 
Old 06-08-2011, 11:34 AM   #7
trademark91
Member
 
Registered: Sep 2009
Distribution: Slackware -current x64
Posts: 372

Rep: Reputation: 74
just add the command

Code:
mpd &
to your autostart file
 
Old 06-08-2011, 12:02 PM   #8
george-lappies
Member
 
Registered: May 2011
Location: Secunda, South Africa
Distribution: Slackware 13.37
Posts: 181

Original Poster
Rep: Reputation: 9
Hi all thanks so much for all the replies. Excuse my ignorance but what and where is the autostart file?
 
Old 06-08-2011, 01:47 PM   #9
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
He's probably talking about the XFCE/KDE/GNOME autostart file.
Alternatively you could also write an rc.d/rc.mpd script. I believe some people have written such so an internet search will grant you with some examples.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM
mpd on a server iwtbf Linux - Software 0 07-06-2009 11:09 PM
about mpd Chocolate Linux - Networking 0 12-11-2006 02:31 AM
mpd questions. doralsoral Linux - Software 1 06-16-2005 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration