You are not logged in.

#1 2013-03-15 15:14:17

fabledpig
Member
Registered: 2013-03-15
Posts: 24

[SOLVED] MPD is not starting with .xinitrc

Hi!

This is my first post on this forum, so hello everyone!

Let me explain you what my problem is:
I just can't get MPD to start with. xinitrc or systemd. When I launch it from terminal it works like a charm, but when it should start with X (I am using Slim), it just doesn't.

Here is my .xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

#mpd
mpd --no-daemon &

#fonts
xset +fp ~/.fonts
xset +fp /usr/share/fonts/local
xset fp rehash

#wallpaper
$HOME/.fehbg

#conky
conky &

#statusbar
$HOME/dwm-statusbar &

#dwm
exec dwm
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

I hope somebody can help me.

Last edited by fabledpig (2013-03-15 18:38:19)

Offline

#2 2013-03-15 16:19:34

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: [SOLVED] MPD is not starting with .xinitrc

Hello,

Try running it without '--no-daemon' parameter, or like this:

/usr/bin/mpd ~/.config/mpd/mpd.conf

-- using the actual location of your config file.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2013-03-15 16:27:20

fabledpig
Member
Registered: 2013-03-15
Posts: 24

Re: [SOLVED] MPD is not starting with .xinitrc

Nothing changes.

Where can I find a log, that can help me?

Offline

#4 2013-03-15 16:32:04

gridcol
Guest

Re: [SOLVED] MPD is not starting with .xinitrc

What did you do when you tried running mpd via systemd?
Did you read the wiki? e.g. https://wiki.archlinux.org/index.php/Mu … er_user.29

#5 2013-03-15 16:40:50

fabledpig
Member
Registered: 2013-03-15
Posts: 24

Re: [SOLVED] MPD is not starting with .xinitrc

I did so as it was written in the wiki. When I ran "systemd --user &" from terminal it started MPD, but when I added it to .xinitrc, it didn't started MPD after reboot.

Last edited by fabledpig (2013-03-15 16:42:46)

Offline

#6 2013-03-15 16:51:35

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

Re: [SOLVED] MPD is not starting with .xinitrc

Systemd has a great journal that can be accessed with journalctl.

Have you looked over the mpd wiki page? I actually start mpd with the service file it includes. If you want to start it as your user, copy it to the appropriate place in /etc rename it mpd@.service and put a "User=%i" (I think that is the right variable...not at my computer ATM) in the [Service] section.

The great thing about systemd is that it is super easy to configure service files... so if you want to start mpd this way you.may want to try that.

The other option with a service file is to use the new feature insystemd 198 that allows an appropriately named directory to hold all kinds of configuration changes to a given unit. Again, I am not at my computer, so you are going to have to use the man pages for this (which you should be doing anyway). This feature is like a more advanced ".include" though. So you could just add a user line to the existing unit.

Offline

#7 2013-03-15 17:19:51

fabledpig
Member
Registered: 2013-03-15
Posts: 24

Re: [SOLVED] MPD is not starting with .xinitrc

I made an mpd@.service, and it works, if I call systemctl start mpd@leviiibog.service from terminal, but it's not started automatically after reboot. Systemctl status says this:

mpd@leviiibog.service - Music Player Daemon
	  Loaded: loaded (/etc/systemd/system/mpd@.service; enabled)
	  Active: failed (Result: core-dump) since Fri 2013-03-15 18:12:43 CET; 4min 28s ago
	 Process: 185 ExecStart=/usr/bin/mpd --no-daemon (code=dumped, signal=ABRT)

Last edited by fabledpig (2013-03-15 17:27:00)

Offline

#8 2013-03-15 18:06:37

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

Re: [SOLVED] MPD is not starting with .xinitrc

Maybe the music/configs are not available early enough? You really haven't given any relevent information that might help to indicate why it is failing... only that it is failing.

Offline

#9 2013-03-15 18:32:43

gridcol
Guest

Re: [SOLVED] MPD is not starting with .xinitrc

Any usable output with

$ journalctl -b | grep systemd

?

Last edited by gridcol (2013-03-15 18:35:58)

#10 2013-03-15 18:38:03

fabledpig
Member
Registered: 2013-03-15
Posts: 24

Re: [SOLVED] MPD is not starting with .xinitrc

I was able to solve the problem. The problem was that pulseaudio was installed as a dependence, and I didn't configured it. I just deleted it, and everything is okay.

By the way thanks for help.

Offline

Board footer

Powered by FluxBB