Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
87b73284
Commit
87b73284
authored
Aug 07, 2013
by
Alexander Gehrke
Committed by
Max Kellermann
Aug 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CommandLine.cxx: look for config file in XDG_CONFIG_HOME too
Look for "$XDG_CONFIG_HOME/mpd/mpd.conf", similar to where mpd looks for the file under Windows.
parent
3f846cf6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
INSTALL
INSTALL
+3
-3
mpd.1
doc/mpd.1
+2
-2
mpd.conf.5
doc/mpd.conf.5
+3
-2
CommandLine.cxx
src/CommandLine.cxx
+7
-1
No files found.
INSTALL
View file @
87b73284
...
...
@@ -196,9 +196,9 @@ Run
$ mpd <config file>
First default is
~/.mpdconf then ~/.mpd/mpd.conf then /etc/mpd.conf. If
neither of these exist a mpd configuration file must be specified at
runtime.
First default is
$XDG_CONFIG_HOME/mpd/mpd.conf then ~/.mpdconf then
~/.mpd/mpd.conf then /etc/mpd.conf. If neither of these exist a mpd
configuration file must be specified at
runtime.
A sample config file is included with the source of MPD, mpdconf.example.
...
...
doc/mpd.1
View file @
87b73284
...
...
@@ -12,8 +12,8 @@ stores info about all available music, and this info can be easily searched and
retrieved. Player control, info retrieval, and playlist management can all be
managed remotely.
MPD searches for a config file in \fB
~/.mpdconf\fP then \fB/etc/mpd.conf\fP or
uses CONF_FILE.
MPD searches for a config file in \fB
$XDG_CONFIG_HOME/mpd/mpd.conf\fP then
\fB~/.mpdconf\fP then \fB/etc/mpd.conf\fP or
uses CONF_FILE.
Read more about MPD at <\fBhttp://www.musicpd.org/\fP>.
.SH OPTIONS
...
...
doc/mpd.conf.5
View file @
87b73284
...
...
@@ -3,8 +3,9 @@
mpd.conf \- Music Player Daemon configuration file
.SH DESCRIPTION
\fBmpd.conf\fP is the configuration file for mpd(1). If not specified on the
command line, MPD first searches for it at \fB~/.mpdconf\fP then at
\fB~/.mpd/mpd.conf\fP and then in \fB/etc/mpd.conf\fP.
command line, MPD first searches for it at \fB$XDG_CONFIG_HOME/mpd/mpd.conf\fP
then at \fB~/.mpdconf\fP then at \fB~/.mpd/mpd.conf\fP and then in
\fB/etc/mpd.conf\fP.
Lines beginning with a "#" character are comments. All other non-empty lines
specify parameters and their values. These lines contain the parameter name
...
...
src/CommandLine.cxx
View file @
87b73284
...
...
@@ -54,6 +54,7 @@
#else
/* G_OS_WIN32 */
#define USER_CONFIG_FILE_LOCATION1 ".mpdconf"
#define USER_CONFIG_FILE_LOCATION2 ".mpd/mpd.conf"
#define USER_CONFIG_FILE_LOCATION_XDG "mpd/mpd.conf"
#endif
static
GQuark
...
...
@@ -219,7 +220,12 @@ parse_cmdline(int argc, char **argv, struct options *options,
return
ReadConfigFile
(
path
,
error_r
);
}
#else
/* G_OS_WIN32 */
Path
path
=
PathBuildChecked
(
Path
::
FromUTF8
(
g_get_home_dir
()),
Path
path
=
PathBuildChecked
(
Path
::
FromUTF8
(
g_get_user_config_dir
()),
USER_CONFIG_FILE_LOCATION_XDG
);
if
(
!
path
.
IsNull
()
&&
FileExists
(
path
))
return
ReadConfigFile
(
path
,
error_r
);
path
=
PathBuildChecked
(
Path
::
FromUTF8
(
g_get_home_dir
()),
USER_CONFIG_FILE_LOCATION1
);
if
(
!
path
.
IsNull
()
&&
FileExists
(
path
))
return
ReadConfigFile
(
path
,
error_r
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment