On Tue, Nov 03, 2015 at 07:37:33AM +0100, Tony Mechelynck wrote:
> [...]
>
> in /etc/profile maybe, or in some other script sourced by all shells?
> Ah, there: /etc/profile.d/xdg-environment.sh and
> /etc/profile.d/xdg-environment.csh (which IIUC are sourced by some
> other shell startup script): here are the lines I have in the .sh
> script:
I'm on Arch Linux and I don't have the environment variable
$XDG_DATA_DIRS set. I only have a $XDG_RUNTIME_DIR set by systemd.
I get that setting from python-xdg, from this code snippet:
_home = os.path.expanduser('~')
xdg_data_home = os.environ.get('XDG_DATA_HOME') or \
os.path.join(_home, '.local', 'share')
xdg_data_dirs = [xdg_data_home] + \
(os.environ.get('XDG_DATA_DIRS') or
'/usr/local/share:/usr/share').split(':')
It seems that it's getting a default value, but with one more than the
Freedesktop.org spec.
I've checked the source of the awesome window manager, it always uses
a similiar default path list, but /usr/local/share comes last (maybe this
should be fixed).
> > And I don't think a script can
> > determine it automatically when e.g. someone wants to install Vim to
> > /opt and has that file placed where they want.
>
> /opt/*/share is among the places where my shells will look at startup
> for an applications/ subdirectory, see above.
However, it seems to me that $prefix/share/applications is a good
default if the script is going to install .desktop files, rather than
check $XDG_DATA_DIRS and pick one up. The user can move / link the files
if necessary, or perhaps another ./configure option?
--
Best regards,
lilydjwg
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.