Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hw/xfree86/common/xf86Helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,12 +1141,12 @@ xf86LogInit(void)
if (xf86LogFileFrom == X_DEFAULT) {
/* When not running as root, we won't be able to write to /var/log */
if (geteuid() != 0) {
if ((env = getenv("XDG_DATA_HOME")))
if ((env = getenv("XDG_STATE_HOME")))
snprintf(buf, sizeof(buf), "%s/%s", env,
DEFAULT_XDG_DATA_HOME_LOGDIR);
DEFAULT_XDG_STATE_HOME_LOGDIR);
else if ((env = getenv("HOME")))
snprintf(buf, sizeof(buf), "%s/%s/%s", env,
DEFAULT_XDG_DATA_HOME, DEFAULT_XDG_DATA_HOME_LOGDIR);
DEFAULT_XDG_STATE_HOME, DEFAULT_XDG_STATE_HOME_LOGDIR);

if (env) {
xf86_mkdir_p(buf);
Expand Down
2 changes: 1 addition & 1 deletion hw/xfree86/man/Xorg.man
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ as the
server log file. The default log file when running as root is
.BI @logdir@/Xorg. n .log
and for non root it is
.BI $XDG_DATA_HOME/xorg/Xorg. n .log
.BI $XDG_STATE_HOME/xorg/Xorg. n .log
where
.I n
is the display number of the
Expand Down
2 changes: 1 addition & 1 deletion hw/xfree86/man/xorg.conf.man
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ The default log file name when running as root is
.RE
and for non root it is
.RS 11
.RI $XDG_DATA_HOME/xorg/Xorg. <n> .log
.RI $XDG_STATE_HOME/xorg/Xorg. <n> .log
.RE
.PP
.RS 7
Expand Down
8 changes: 4 additions & 4 deletions hw/xfree86/xorg-config.h.meson.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
/* Default logfile prefix */
#mesondefine DEFAULT_LOGPREFIX

/* Default XDG_DATA dir under HOME */
#mesondefine DEFAULT_XDG_DATA_HOME
/* Default XDG_STATE dir under HOME */
#mesondefine DEFAULT_XDG_STATE_HOME

/* Default log dir under XDG_DATA_HOME */
#mesondefine DEFAULT_XDG_DATA_HOME_LOGDIR
/* Default log dir under XDG_STATE_HOME */
#mesondefine DEFAULT_XDG_STATE_HOME_LOGDIR

/* Building DRI-capable DDX. */
#mesondefine XF86DRI
Expand Down
5 changes: 3 additions & 2 deletions include/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ xorg_data.set('XORG_VERSION_CURRENT', release)
xorg_data.set_quoted('XF86CONFIGFILE', 'xorg.conf')
xorg_data.set_quoted('XCONFIGFILE', 'xorg.conf')
xorg_data.set_quoted('XCONFIGDIR', 'xorg.conf.d')
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share')
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg')
xorg_data.set_quoted('DEFAULT_XDG_STATE_HOME', '.local/state')
xorg_data.set_quoted('DEFAULT_XDG_STATE_HOME_LOGDIR', 'xorg')
xorg_data.set_quoted('DEFAULT_LOGDIR', log_dir)
xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.')
xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir))
xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', join_paths(get_option('prefix'), get_option('libdir')))
Expand Down