Merge lp:~ted/ubuntu-touch-session/xdg-to-profiles into lp:ubuntu-touch-session

Proposed by Ted Gould
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 236
Merged at revision: 235
Proposed branch: lp:~ted/ubuntu-touch-session/xdg-to-profiles
Merge into: lp:ubuntu-touch-session
Diff against target: 29 lines (+7/-5)
1 file modified
ubuntu-touch-session (+7/-5)
To merge this branch: bzr merge lp:~ted/ubuntu-touch-session/xdg-to-profiles
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
Review via email: mp+237476@code.launchpad.net

Commit message

Export XDG_DATA_DIRS and XDG_CONFIG_DIRS for the adb shell

Description of the change

Not a beautiful solution but works. When the other variables are moved out of .profile these should be as well. Didn't want to invent something for that today, just making it simple and align with what else is being done.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Oh, also reordered slightly so all the XDG stuff was together and all the export code was together. Increases readability a bit.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Yeah, looks fine, and fair to add it together with the other 'hacks'. We need to clean this all up together at some point.

review: Approve
Revision history for this message
Oliver Grawert (ogra) wrote :

As i said on IRC before you started working on this i would really really have preferred if you instead had put a file into XDG_RUNTIME_DIR and source it then from an /etc/profile.d snippet (like the upstart session and dbus variables do) ... the way you implemented this we will never ever be able to update the values should they change.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-touch-session'
2--- ubuntu-touch-session 2014-06-25 22:45:27 +0000
3+++ ubuntu-touch-session 2014-10-07 19:05:42 +0000
4@@ -37,6 +37,11 @@
5 export XDG_DATA_DIRS=/usr/share/$DESKTOP_SESSION:$XDG_DATA_DIRS
6 fi
7
8+# if /custom/xdg/config exists, add it to xdg_config_dirs. this is so upstart can get job definitions from /custom
9+if [ -d /custom/xdg/config ]; then
10+ export XDG_CONFIG_DIRS=/custom/xdg/config:$XDG_CONFIG_DIRS
11+fi
12+
13 export GRID_UNIT_PX=${GRID_UNIT_PX}
14 export QTWEBKIT_DPR=${QTWEBKIT_DPR}
15 export NATIVE_ORIENTATION=${NATIVE_ORIENTATION}
16@@ -46,11 +51,8 @@
17 grep -q GRID_UNIT_PX $dot_profile || echo "export GRID_UNIT_PX=${GRID_UNIT_PX}" >> $dot_profile
18 grep -q QTWEBKIT_DPR $dot_profile || echo "export QTWEBKIT_DPR=${QTWEBKIT_DPR}" >> $dot_profile
19 grep -q NATIVE_ORIENTATION $dot_profile || echo "export NATIVE_ORIENTATION=${NATIVE_ORIENTATION}" >> $dot_profile
20-
21-# if /custom/xdg/config exists, add it to xdg_config_dirs. this is so upstart can get job definitions from /custom
22-if [ -d /custom/xdg/config ]; then
23- export XDG_CONFIG_DIRS=/custom/xdg/config:$XDG_CONFIG_DIRS
24-fi
25+grep -q XDG_CONFIG_DIRS $dot_profile || echo "export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS}" >> $dot_profile
26+grep -q XDG_DATA_DIRS $dot_profile || echo "export XDG_DATA_DIRS=${XDG_DATA_DIRS}" >> $dot_profile
27
28 if [ "$#" -ne 0 ]; then
29 exec $@

Subscribers

People subscribed via source and target branches

to all changes: