XDG dirs
Jonathan Koren
jonathan at robotmonkeys.net
Wed Apr 16 09:08:30 PDT 2014
I recently removed, then reinstalled, MacPorts 2.2.1 trying to diagnose a problem with glib. The problem was that when meld tried to write into the director glib’s g_get_user_dir(), it would get a a permission denied because this directory was under /opt/local/share, which is a system directory.
After some digging, I found that MacPorts modified my .tcshrc with three variables that override the glib defaults. These variables, and their values are:
setenv XDG_DATA_DIRS /opt/local/share
setenv XDG_DATA_HOME /opt/local/share
setenv XDG_CONFIG_DIRS /opt/local/etc/xdg
The problem is that these XDG directories are all supposed to be user specific, not system specific. I don’t know why MacPorts picked these values, but they’re clearly wrong. Simply removing these lines caused glib to revert back to reasonable defaults.
This looks like a bug in the install script. I don’t know who else is having this problem, but the install scripts should never be using these values for these directories, since these directories should never writable by normal users. In fact, I suspect that the system will work just fine without setting these variables at all.
Thanks.
--
jonathankoren
More information about the macports-users
mailing list