Commit Graph

9 Commits (94d5f0a86e40543917a9ff7c0749b32cc2982d1b)

Author SHA1 Message Date
Simon McVittie e572311a26 Improve and simplify profile snippet
Avoid setting a temporary variable flatpak_dirs which, while not
exported to the environment, would still be defined as a
shell "parameter" (variable) in the login shell itself.

Consistently put the Flatpak directories before other XDG_DATA_DIRS,
rather than putting them last if XDG_DATA_DIRS happens to be already
set.

Expand XDG_DATA_HOME if necessary, rather than assuming it will
always be ~/.local/share.

I don't know exactly which shells source profile.d, but it's possible
that one of them might only implement POSIX test syntax, so prefer
[ x = y ] over [ x == y ].

Fix some insufficient quoting that could have gone wrong if
XDG_DATA_DIRS somehow contained spaces.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-03-14 21:48:58 +01:00
Alexander Larsson 93347f4a6d profile: Don't add flatpak to XDG_DATA_DIRS if its already there
(cherry picked from commit f09d6b3aa6b06e69dc667366cdf279de32c9217f)
2017-03-10 11:29:29 +01:00
Elvis Angelaccio a9acdc0532 Append flatpak data dirs if XDG_DATA_DIRS is already set (#611)
* Append flatpak data dirs if XDG_DATA_DIRS is already set

Otherwise it will be impossible to run flatpak apps from desktop menus.
This issue can happen if another app (e.g. snapd) wants to add custom
folders to XDG_DATA_DIRS through /etc/profile.d

If XDG_DATA_DIRS is empty or unset, define it as before.

Fixes #606
2017-03-08 08:38:47 +01:00
Alexander Larsson e9c67ec47f Get the system installation dir right in XDG_DATA_DIRS
Its in /var/lib/flatpak, not /var/flatpak
2016-05-20 09:21:19 +02:00
Alexander Larsson 5e9b247d26 Migrate ~/.local/share/xdg-app to ~/.local/share/flatpak 2016-05-09 12:21:28 +02:00
Alexander Larsson 8abbc0186e Rename everything but the on-disk location to flatpak 2016-05-09 11:11:55 +02:00
Alexander Larsson c7a05ae781 profile: Don't override pre-existing XDG_DATA_DIRS env vars 2015-06-24 09:31:50 +02:00
Alexander Larsson c5a2bb2b07 xdg-app.sh: /usr/local/share is also in the default XDG_DATA_DIRS 2015-06-23 11:38:55 +02:00
David King 27fdae4153 Add a simple profile.d snippet for XDG_DATA_DIRS
https://github.com/alexlarsson/xdg-app/issues/74
2015-05-15 17:00:38 +01:00