You are not logged in.
Hi all
I know that this has been brought up into this forum several times and (I think) I've done exactly what people here has said should work.
But for me it doesn't though
My configuration works perfect and it's a very good player indeed (ncmpc)!
When the system boots I see it starts but after logging into X it dies
Please remember I've tried to change
user "my_username"
but with the same result.
My full .mpd.conf :
######################## REQUIRED PATHS ########################
#music_directory "~/music"
#playlist_directory "~/playlists"
#db_file "~/mpd.db"
#log_file "~/mpd.log"
#error_file "~/mpd.error"
music_directory "~/Musik"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
error_file "~/.mpd/mpd.error"
# Note: ~ is the home directory of user set in the "user" option
################################################################
######################## OPTIONAL PATHS ########################
#
# If you wish to use mpd --kill to stop MPD, then you must
# specify a file here in which to store MPD's process ID.
#
pid_file "~/.mpd/mpd.pid"
#pid_file "/var/run/mpd/mpd.pid"
#
# If specified, MPD will save its current state (playlist,
# current song, playing/paused, etc.) at exit. This will be
# used to restore the session the next time it is run.
#
state_file "~/.mpd/mpdstate"
#state_file "/var/lib/mpd/mpdstate"
#
################################################################
######################## DAEMON OPTIONS ########################
#
# If started as root, MPD will drop root privileges and run as
# this user instead. Otherwise, MPD will run as the user it was
# started by. If left unspecified, MPD will not drop root
# privileges at all (not recommended).
user "mpd"
# The address and port to listen on.
#
bind_to_address "127.0.0.1"
bind_to_address "archos"
port "6600"
#
# Controls the amount of information that is logged. Can be
# "default", "secure", or "verbose".
#
#log_level "default"
#
################################################################
########################## PERMISSIONS #########################
#
# MPD can require that users specify a password before using it.
# You may specify one ore more here, along with what users who
# log in with that password are allowed to do.
#
#password "password@read,add,control,admin"
#
# Specifies what permissions a user who has not logged in with a
# password has. By default, all users have full access to MPD
# if no password is specified above, or no access if one or
# more passwords are specified.
#
#default_permissions "read,add,control,admin"
#
################################################################
########################## AUDIO OUTPUT ########################
#
# MPD supports many audio output types, as well as playing
# through multiple audio outputs at the same time. You can
# specify one or more here. If you don't specify any, MPD will
# automatically scan for a usable audio output.
#
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
# for examples of other audio outputs.
#
# An example of an ALSA output:
#
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
}
#
# An example of an OSS output:
#
#audio_output {
# type "oss"
# name "My OSS Device"
# device "/dev/dsp" # optional
# format "44100:16:2" # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
# type "shout"
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
# user "source" # optional
# description "My Stream Description" # optional
# genre "jazz" # optional
# public "no" # optional
#}
#
# Force all decoded audio to be converted to this format before
# being passed to the audio outputs.
#
#audio_output_format "44100:16:2"
#
################################################################
############################# MIXER ############################
#
# MPD needs to know what mixer settings to change when you
# adjust the volume. If you don't specify one here, MPD will
# pick one based on which ones it was compiled with support for.
#
# An example for controlling an ALSA mixer:
#
mixer_type "alsa"
mixer_device "default"
mixer_control "PCM"
#
# An example for controlling an OSS mixer:
#
#mixer_type "oss"
#mixer_device "/dev/mixer"
#mixer_control "PCM"
#
# If you want MPD to adjust the volume of audio sent to the
# audio outputs, you can tell it to use the software mixer:
#
#mixer_type "software"
#
################################################################
######################### NORMALIZATION ########################
#
# Specifies the type of ReplayGain to use. Can be "album" or
# "track". ReplayGain will not be used if not specified. See
# <http://www.replaygain.org> for more details.
#
#replaygain "album"
#
# Sets the pre-amp used for files that have ReplayGain tags.
#
#replaygain_preamp "0"
#
# Enable on the fly volume normalization. This will cause the
# volume of all songs played to be adjusted so that they sound
# as though they are of equal loudness.
#
volume_normalization "yes"
#
################################################################
########################### BUFFERING ##########################
#
# The size of the buffer containing decoded audio. You probably
# shouldn't change this.
#
#audio_buffer_size "2048"
#
# How much of the buffer to fill before beginning to play.
#
#buffer_before_play "0%"
#
# Similar options for the HTTP stream buffer. If you hear
# skipping while playing HTTP streams, you may wish to increase
# these.
#
#http_buffer_size "128"
#http_prebuffer_size "25%"
#
################################################################
########################### HTTP PROXY #########################
#
# Specifies the HTTP proxy to use for playing HTTP streams.
#
#http_proxy_host "proxy.isp.com"
#http_proxy_port "8080"
#http_proxy_user "user"
#http_proxy_password "password"
#
################################################################
############################# LIMITS ###########################
#
# These are various limits to prevent MPD from using too many
# resources. You should only change them if they start
# restricting your usage of MPD.
#
#connection_timeout "60"
#max_connections "5"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
#
################################################################
###################### CHARACTER ENCODINGS #####################
#
# If file or directory names do not display correctly, then you
# may need to change this. In most cases it should be either
# "ISO-8859-1" or "UTF-8". You must recreate your database
# after changing this (use mpd --create-db).
#
filesystem_charset "ISO-8859-1"
#
# The encoding that ID3v1 tags should be converted from.
#
id3v1_encoding "ISO-8859-1"
#
################################################################
######################### OTHER OPTIONS ########################
#
# The metadata types MPD will recognize.
#
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# Enable this if you wish to use your MPD created playlists in
# other music players.
#
#save_absolute_paths_in_playlists "no"
#
################################################################
And the daemons array in /etc/rc.conf :
DAEMONS=(syslog-ng hal network netfs @crond @alsa @cups @mpd)
Any hints about what's wrong here ??
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
I got the same problem. It fails at startup, and I have to load it manually, or using xinitrc. I would like to know where I should check for errors, since the mpd error file doesn't bring up anything relevant.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
When you do a "pstree -pl" do you see mpd in the output? If it is not, then mpd has not started. Instead of running the traditional daemon script, run it directly with verbose logging:
/usr/bin/mpd --verbose ~/.mpd.conf
Have you run /etc/rc.d/create-db? Is your music really in ~/Musik and is there a ~/.mpd directory?
Without error there can be no brilliancy. ― Emanuel Lasker
Offline
As far as I understand he's got my same problem: mpd starts when you run it manually, but doesn't start at boot if you add it to the DAEMONS line in rc.conf.
In theory it should work either way, isn't it?
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Have you run /etc/rc.d/create-db? Is your music really in ~/Musik and is there a ~/.mpd directory?
I'm listening to it right now
The problem is that mpd dies when starting X as user, and I have to start it manually everytime
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
As far as I understand he's got my same problem: mpd starts when you run it manually, but doesn't start at boot if you add it to the DAEMONS line in rc.conf.
In theory it should work either way, isn't it?
I'm sorry, but I need you to clarify. It starts manually as in "/etc/rc.d/mpd start" or in the command I gave above? Maybe you could edit /etc/rc.d/mpd and change "/usr/bin/mpd /etc/mpd.conf" to read "/usr/bin/mpd /home/username/.mpd.conf."
Without error there can be no brilliancy. ― Emanuel Lasker
Offline
Set the log_level to verbose in mpd.conf and then try again.
I am a gated community.
Offline
Have you run /etc/rc.d/create-db? Is your music really in ~/Musik and is there a ~/.mpd directory?
I'm listening to it right now :cool:
The problem is that mpd dies when starting X as user, and I have to start it manually everytime :(
It may die around the time the X server loads, but are you sure it dies because you start the X server? Try modifying whatever configuration file schedules the X server to load on boot and stop it from loading, then go from there.
Without error there can be no brilliancy. ― Emanuel Lasker
Offline
finferflu wrote:As far as I understand he's got my same problem: mpd starts when you run it manually, but doesn't start at boot if you add it to the DAEMONS line in rc.conf.
In theory it should work either way, isn't it?I'm sorry, but I need you to clarify. It starts manually as in "/etc/rc.d/mpd start" or in the command I gave above? Maybe you could edit /etc/rc.d/mpd and change "/usr/bin/mpd /etc/mpd.conf" to read "/usr/bin/mpd /home/username/.mpd.conf."
It works when started with the command "mpd", but it fails with "/etc/rc.d/mpd start". Are you sure there is no other way to make it work, other than changing the /etc/rc.d/mpd file?
But I don't want to hijack this thread, solve niller's problem first, then, eventually, mine.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
It works when started with the command "mpd", but it fails with "/etc/rc.d/mpd start". Are you sure there is no other way to make it work, other than changing the /etc/rc.d/mpd file?
But I don't want to hijack this thread, solve niller's problem first, then, eventually, mine.
Your problem is very similar. What is wrong with editing /etc/rc.d/mpd? Are you afraid it will be overwritten on an upgrade? Does it simply not work even after editing the daemon file? Please be more verbose in your next post.
Last edited by abstracity (2008-02-12 21:18:03)
Without error there can be no brilliancy. ― Emanuel Lasker
Offline
finferflu wrote:It works when started with the command "mpd", but it fails with "/etc/rc.d/mpd start". Are you sure there is no other way to make it work, other than changing the /etc/rc.d/mpd file?
But I don't want to hijack this thread, solve niller's problem first, then, eventually, mine.
Your problem is very similar. What is wrong with editing /etc/rc.d/mpd? Are you afraid it will be overwritten on an upgrade? Does it simply not work even after editing the daemon file? Please be more verbose in your next post.
Sorry about that.
It works fine after I change the /etc/rc.d/mpd file, changing /etc/mpd.conf to /home/user/.mpdconf. I'm just afraid about it getting rewritten. I usually prefer to keep all my configs inside my home directory, I think it's safer (in case I mistype, for example) and more portable.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
But I don't want to hijack this thread, solve niller's problem first, then, eventually, mine.
That's okay !
It may die around the time the X server loads, but are you sure it dies because you start the X server?
No it doesn't start at all ! All though I can see it starts in the boot sequence
It starts manually as in "/etc/rc.d/mpd start"
yes
Maybe you could edit /etc/rc.d/mpd and change "/usr/bin/mpd /etc/mpd.conf" to read "/usr/bin/mpd /home/username/.mpd.conf."
I'll try this and see how it goes.
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
Sorry about that.
It works fine after I change the /etc/rc.d/mpd file, changing /etc/mpd.conf to /home/user/.mpdconf. I'm just afraid about it getting rewritten. I usually prefer to keep all my configs inside my home directory, I think it's safer (in case I mistype, for example) and more portable.
Maybe you could create a link:
mkdir ~/.rc.d
mv /etc/rc.d/mpd ~/.rc.d
ln -s ~/.rc.d/mpd /etc/rc.d/mpd
If that doesn't work, try creating a link from /etc/mpd.conf to ~/.mpd.conf
Without error there can be no brilliancy. ― Emanuel Lasker
Offline
finferflu wrote:Sorry about that.
It works fine after I change the /etc/rc.d/mpd file, changing /etc/mpd.conf to /home/user/.mpdconf. I'm just afraid about it getting rewritten. I usually prefer to keep all my configs inside my home directory, I think it's safer (in case I mistype, for example) and more portable.Maybe you could create a link:
mkdir ~/.rc.d mv /etc/rc.d/mpd ~/.rc.d ln -s ~/.rc.d/mpd /etc/rc.d/mpd
If that doesn't work, try creating a link from /etc/mpd.conf to ~/.mpd.conf
Ok, thanks
So I understand that there's not really a way around it, just workarounds
Well, I'll just live with it.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Ok, thanks :)
So I understand that there's not really a way around it, just workarounds :P
Well, I'll just live with it.
Well, if you want, you can always edit /var/lib/pacman/local/mpd*/files and add "etc/rc.d/mpd" under the "%BACKUP%" header (you will need to generate the md5sum of your new /etc/rc.d/mpd script).
%BACKUP%
etc/nanorc [md5sum of unmodified, stock file (possibly already calculated in the PKGBUILD)]
Last edited by abstracity (2008-02-17 17:02:07)
Without error there can be no brilliancy. ― Emanuel Lasker
Offline
Maybe you could edit /etc/rc.d/mpd and change "/usr/bin/mpd /etc/mpd.conf" to read "/usr/bin/mpd /home/username/.mpd.conf."
Nope this doesn't work either
The only way I can start mpd is by:
niels ~ $ /etc/rc.d/mpd start
:: Starting Music Player Daemon [FAIL]
When changing /etc/rc.d/mpd back to orig, it works!
The question here is: Why doesn't mpd work as expected as a daemon ?
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
So if you manually start the daemon it works, if you start it via /etc/rc.conf on system startup it doesn't? Strange. Whats the output if you run mpd manually? Some warnings or errors?
Haven't been here in a while. Still rocking Arch.
Offline
So if you manually start the daemon it works, if you start it via /etc/rc.conf on system startup it doesn't? Strange. Whats the output if you run mpd manually? Some warnings or errors?
Correct !
The output when starting mpd manually :
niels ~ $ /etc/rc.d/mpd start
:: Starting Music Player Daemon [BUSY]
touch: Can not touch '/var/run/daemons/mpd': Permission denied [DONE]
and now I can use it.
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
I didn't mean start the daemon manually, what I meant was
mpd /etc/mpd.conf
Any output on this? (Please stop the daemon first)
Haven't been here in a while. Still rocking Arch.
Offline
mpd /etc/mpd.conf Any output on this? (Please stop the daemon first)
Gives no output! But I can start mpd this way and it runs.
I stop mpd from running, and when doing this
mpd .mpd.conf
the output is
binding to address for 127.0.0.1
binding to address for archos
unable to bind port 6600: Address already in use
maybe MPD is still running?
But it's not running !!?
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
Still doesn't work, tried everything I've even followed the gentoo mpd wiki, and reinstalled but it still refuse to start as a daemon.
I guess mpd is not for me
So now it's all removed and i'll try something else instead.
Closing this thread.
Thanks for your inputs guys
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
Don't give up niller!
So you want to use your .mpd.conf? Have you changed this in /etc/rc.d/mpd? (I mean changed "/etc/mpd.conf" to "path/to/.mpd.conf")
Haven't been here in a while. Still rocking Arch.
Offline
Hi Sigi
Yes I did also tried that, same result :-(
I have installed mocp which work as expected :-)
Thanks for your help !
Cheers,
/Niels
Registered Linux user #133791
Get counted at http://counter.li.org
Offline
pacman -S moc
Offline
Is it some sort of permissions problem? If your .mpc.conf is not owned by mpd or root? Although i guess that doesn't explain why you can start it manually. Can the user mpd access this file and also your log files and music directory?
Offline