LinuxQuestions.org
Help answer threads with 0 replies.
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: 180

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
Senior Member
 
Registered: May 2008
Posts: 3,319

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
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 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
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: 180

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: 105

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
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,562

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
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: 72
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: 180

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/Novell 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


All times are GMT -5. The time now is 04:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration