! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
if not explicitelly set, XDG_DATA_DIRS becomes /usr/share:/usr/local/share:/u...
Status:
RESOLVED: INVALID
Product:
Xfdesktop
Component:
General

Comments

Description Nebojša Ćosić 2006-11-14 13:22:34 CET
If environment variable XDG_DATA_DIRS is not explicitly set by user, a value of /usr/share:/usr/local/share:/usr/share is assigned to it and stored in menu-cache--etc-xdg-xfce4-desktop-menu.xml.rc
Problem is that, according to http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.13.html it should be set to:
~/.local/share/mime:/usr/local/share/mime:/usr/share/mime and thus give user chance to override settings from /usr/share/mime (especially from packages/freedesktop.org.xml)
Comment 1 Brian J. Tarricone (not reading bugmail) 2006-11-15 00:05:02 CET
I think you're looking at the wrong spec.  This has nothing to do with the MIME spec.
Comment 2 Nebojša Ćosić 2006-11-15 08:48:56 CET
Well, it does :)
I tried to solve simple problem: using thunar, I tried to get all users, when they right click on file with extension .mm, to have default to start FreeMind application  (instead of groff).
To make this work, one has to make freemind.xml in /usr/share/mime/packages, and then run update-mime-database. 
It would work, if only .mm was not already taken.
So, documentation says that one should move new file in /usr/local/share/mime/packages/ and that would do the trick. 
And it does, but XDG_DATA_DIRS is consulted (if set) for paths it should look into.
If it is unset, then it looks in users own mime dir, than in local and finally in /usr/share.
If I manually set XDG_DATA_DIRS to correct value, and then start xfce session, everything is nice.
And it still does not explain xfce default value having same path stated 2 times.
Comment 3 Brian J. Tarricone (not reading bugmail) 2006-11-16 04:06:08 CET
No, you're just completely misunderstanding how this works.  Read the XDG basedir spec: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables

*You* (or, ideally, your distro) are responsible for setting XDG_DATA_DIRS to something other than the default.

(Granted, I'm not sure why you have /usr/share in there twice, but that's a separate issue.)

Not sure what this has to do with the menu cache file: that doesn't use mime data at all.

Bug #2583

Reported by:
Nebojša Ćosić
Reported on: 2006-11-14
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

Additional information