@jsullivan: "Hello, all.  We're having some difficulty properly setting GNOME
defaults using XDG_DATA_DIRS.  In our specific case, we are trying to
set the system default for all users to acroread from Evince because
Evince is not properly rendering some of the more complicated documents.
We set
XDG_DATA_DIRS=/data/.Common/xdg/default:/usr/share:/usr/local/shar888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4/opt/trinity/share/:/usr/share/
/data/.Common/xdg/default has an applications directory with a
defaults.list file setting the default pdf application for
application/pdf and application/vnd.adobe.pdf to AdobeReader.desktop
which points to acroread.
The problem seems to be that there is
a /usr/share/gnome/applications/defaults.list which is a link
to /etc/gnome-vfs-2.0/defaults.list which sets Evince as the default.
This seems to be overriding our defaults.  If I edit that file, the
default is set properly.  To override it, I tried creating a gnome
directory under /data/.Common/xdg/default/ and moving the applications
directory under that in case gnome is a preferred path for gnome
applications to find their settings.  That did not work.  I tried
putting the Common directory at the end of XDG_DATA_DIRS in case it is
read in the opposite order of KDEDIRS; that did not work.  So we see the
cause but do not yet have the solution.
How do we get our centralized settings to override those
in /etc/gnome-vfs-2.0/defaults.list so that we don't have to edit every
single one of those files thus defeating the purpose of centralized
administration? Thanks - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @noelamac: "<quote>
opt/trinity/share/:/usr/share/
(...)
Does it work if you place the "defaults.list" file in "~/.local/share/
applications"?
"echo $XDG_DATA_HOME" returns nothing on my box (not set), so I guess the 
default path applies ("$HOME/.local/share").
Greetings,
Camaleón
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
.
/
I did not try that but it would defeat the purpose of centralized
administration.
=20
Yes, we intentionally set it.  Otherwise, the defaults are
simply /usr/share and /usr/local/share.
<snip>
Thanks - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @noelamac: "<quote>
That was just intended to check your setup. 
If that works, then something is missing at your side. If that also fail, 
then you could open a bug report.
And what is output of that command?
JFYI:
XDG Base Directory Specification
<url>
Registering Applications for MIME Types
<url>
Greetings,
Camaleón
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
=20
Yes, indeed, if we place defaults.list in ~/.local/share/applications/
it works.
We do not use $XDG_DATA_HOME but rather $XDG_DATA_DIRS and it is set to:
XDG_DATA_DIRS=3D/data/.Common/xdg/default:/usr/share:/usr/local/shar888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4/opt=
/trinity/share/:/usr/share/
I believe XDG_DATA_HOME is for repointing the user's configuration
directory, e.g., ~/.local.
As per the links referenced below:
"Default applications to use for specific MIME types should be specified
in a file called defaults.list. This file is located in the applications
subdirectory for each directory in $XDG_DATA_HOME and $XDG_DATA_DIRS."
ering.html.en
<snip>
Thanks for the links.
I think we see the problem, the values in $XDG_DATA_DIRS are being
superseded by /usr/share/gnome/applications/defaults.list which is a
symbolic link to /etc/gnome-vfs-2.0/defaults.list.  Where is
this /usr/share/gnome/applications coming from and why is it overriding
XDG_DATA_DIRS? Thanks - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
e/
l,=20
s
pt/trinity/share/:/usr/share/
stering.html.en
In fact, if I rename /etc/gnome-vfs-2.0/defaults.list, all works as
expected but I hesitate to do that.  I would rather change the search
priority but I have no idea where /usr/share/gnome/ is being added to
the search path.  It is not in XDG_DATA_DIRS.  Thanks - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @noelamac: "<quote>
Mmm... then looks like a configuration issue.
(...)
Before I'm going nuts with all these dirs ;-), try to set your common 
path to both "XDG_DATA_HOME" and "XDG_DATA_DIRS" because "XDG_DATA_HOME" 
seems to have the top preference over the rest of the variables.
***
XDG_DATA_HOME=/data/.Common/xdg/default
XDG_DATA_DIRS=/data/.Common/xdg/default:/usr/share:/usr/local/shar888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4/opt/trinity/share/:/usr/share/
***
As per "Environment variables¹" chapter:
***
The order of base directories denotes their importance; the first 
directory listed is the most important. When the same information is 
defined in multiple places the information defined relative to the more 
important base directory takes precedent. The base directory defined by 
$XDG_DATA_HOME is considered more important than any of the base 
directories defined by $XDG_DATA_DIRS. The base directory defined by 
$XDG_CONFIG_HOME is considered more important than any of the base 
directories defined by $XDG_CONFIG_DIRS. 
***
¹ <url>
Greetings,
Camaleón
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
No, I think it is a matter of understanding how Gnome determines its
priorities.
=20
pt/trinity/share/:/usr/share/
=20
=20
html
<snip>
Thanks but I think that would be a really bad idea. If I understand it
correctly (and I may not), XDG_DATA_HOME points to where the USER
settings versus the system settings are stored which is why it has teh
highest precedence.  If we repoint it to /data/.Commond/xdg/default,
then ~/.local will no longer be searched and, since users do not have
write access to the centralized configuration, they will not be able to
save their customizations.  I believe XDG_DATA_HOME is used when you
want the user settings directory to be something other than the
default .local directory.  To manage system wide settings, one uses
XDF_DATA_DIRS.  At least so I think - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
/
=20
"=20
/opt/trinity/share/:/usr/share/
=20
=20
=20
=20
t.html
I just realized that I should clarify this is a vserver environment with
a shared file system via mount rbind.  Thus, we can set one xdg
directory for hundreds of vserver guests rather than
editing /etc/gnome-vfs-2.0/defaults.list on each one of those guests.
In a stand alone environment, the highest centralization would
be /etc/gnome-vfs-2.0/defaults.list. =20
So the question remains, how do we make our central defaults.list a
higher priority than the one in /usr/share/gnome/applications? Thanks -
John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @noelamac: "<quote>
(...)
Mmm, that makes sense.
O.k, I get the whole picture. You want to have the following priorities:
1. First look for custom wide settings path
→ if not present
2. Look for defaults wide settings path
→ if not present
3. Set the user's path
Then we only can play with 2 variables:
$XDG_DATA_DIRS → data path
$XDG_CONFIG_DIRS → config file path
The fisrt one is already set but seems to have not effect (it is still 
looking for "/usr/share/gnome/applications/defaults.list" and the second 
one is for configuration files... so, what we are missing here? I don't 
think it is required an additional command to populate the changes >:-?
Greetings,
Camaleón
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
n
e
o
t
h
d
=20
=20
=20
<snip>
Exactly, that's the question.  Thanks - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @noelamac: "<quote>
(...)
There is somethig weird here.
On a test system (running squeeze) I've set:
XDG_DATA_DIRS=/home/user/Desktop/testing
(with its correspondent "application" folder inside and a 
"defaults.lists" file with just one defined application)
[Default Applications]
text/html=iceweasel.desktop
After re-login, I checked that the environment variable had the "correct" 
value and as expected, it returned *just* the above path. I expected a 
bit of mess and no shortcut working at all but, no... all seems to be 
just fine, as before. No change has been done, applications are still 
launched with their matching programs... and *.html files are being 
opened with Epiphany, despite my custom setting.
So I wonder what is the true role of that env. variable ("XDG_DATA_DIRS") 
and if it is being used (how/for what) at all :-?
Greetings,
Camaleón
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
    @jsullivan: "<quote>
=20
=20
=20
=46rom one of the bug reports I read trying to track this issue, it
appears that /usr/share and /usr/local/share are always searched but
after the directories assigned to XDG_DATA_DIRS.  I have not
experimented to confirm that - John
To UNSUBSCRIBE, email to <email_address> 
with a subject of "unsubscribe". Trouble? Contact <email_address>
Archive: <url>"
{'source': 'USENET', 'other_information': '{"reply_count": 12, "forum_name": "linux.debian.user.20141229.mbox"}', 'file': 'data/output/usenet-linux.debian.parquet'}