Mar 13, 2009

ubuntu 8.04 install mpd

$ sudo apt-get install mpd
出错:
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
No protocol specified
E: client-conf-x11.c: XOpenDisplay() failed

解决:
$ sudo apt-get install paprefs
$ paprefs
* Enable network access to local sound devices
* Don't require authentication

在/etc/mpd.conf 中添加:
audio_output {
type "pulse"
name "My MPD Pulse output"
}

$ sudo /etc/init.d/mpd restart

$ sudo mpd --create-db

$ mpc listall | mpc add

$ mpc play

mpc 与 vim 结合,以便写代码时听歌
编辑.vimrc,添加mpc的热键
map mp :!mpc play<cr>
map mn :!mpc next<cr>
map ms :!mpc stop<cr>

No comments:

Post a Comment

您的评论将使我blog更有动力~