From 07a423b4036f89bab67defc3cc6515e8d68c76ec Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Tue, 19 Sep 2017 13:25:01 -0400 Subject: [PATCH 1/2] Ensure XDG_CONFIG_HOME is set and run xdg-user-dirs-update --- common/desktop-exports | 9 +++++++++ snapcraft.yaml | 2 ++ 2 files changed, 11 insertions(+) diff --git a/common/desktop-exports b/common/desktop-exports index 7a8ed55..c429133 100644 --- a/common/desktop-exports +++ b/common/desktop-exports @@ -62,6 +62,15 @@ mkdir -p $XDG_DATA_HOME export XDG_CACHE_HOME=$SNAP_USER_DATA/.cache mkdir -p $XDG_CACHE_HOME +# Set config folder to local path +export XDG_CONFIG_HOME=$SNAP_USER_DATA/.config +mkdir -p $XDG_CONFIG_HOME + +# Run xdg-user-dirs-update +if [ `which xdg-user-dirs-update` ]; then + xdg-user-dirs-update +fi + # Create $XDG_RUNTIME_DIR if not exists (to be removed when LP: #1656340 is fixed) [ -n "$XDG_RUNTIME_DIR" ] && mkdir -p $XDG_RUNTIME_DIR -m 700 diff --git a/snapcraft.yaml b/snapcraft.yaml index d089b9e..60c380a 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -98,6 +98,7 @@ parts: - unity-gtk3-module - libappindicator3-1 - locales-all + - xdg-user-dirs qt4: source: . source-subdir: qt @@ -193,6 +194,7 @@ parts: - unity-gtk3-module - libappindicator3-1 - locales-all + - xdg-user-dirs desktop-qt4: source: . source-subdir: qt From 275cc89e3106b860dedfc29fce647f8a2293fd80 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Tue, 19 Sep 2017 22:49:44 -0400 Subject: [PATCH 2/2] Added xdg-user-dirs to stage-packages for gtk2 and qt4/qt5 desktop parts --- snapcraft.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 60c380a..db8f3bd 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -172,6 +172,7 @@ parts: - unity-gtk2-module - locales-all - libappindicator1 + - xdg-user-dirs desktop-gtk3: source: . source-subdir: gtk @@ -217,6 +218,7 @@ parts: - appmenu-qt - locales-all - sni-qt + - xdg-user-dirs desktop-qt5: source: . source-subdir: qt @@ -238,6 +240,7 @@ parts: - libqt5svg5 # for loading icon themes which are svg - appmenu-qt5 - locales-all + - xdg-user-dirs desktop-glib-only: source: . source-subdir: glib-only