summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/afm-unit-debug.conf.in2
-rw-r--r--conf/afm-unit.conf.in2
-rw-r--r--src/wgtpkg-unit.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/conf/afm-unit-debug.conf.in b/conf/afm-unit-debug.conf.in
index 57d1f2b..518a203 100644
--- a/conf/afm-unit-debug.conf.in
+++ b/conf/afm-unit-debug.conf.in
@@ -147,6 +147,8 @@ WorkingDirectory=-{{&#metadata.app-data-dir}}/{{:id}}
ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{:id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
+Environment=XDG_RUNTIME_DIR=/run/user/%i
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
; Needed to enable debug
Environment=AFM_ID={{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
diff --git a/conf/afm-unit.conf.in b/conf/afm-unit.conf.in
index 884ae5b..c5ec5bf 100644
--- a/conf/afm-unit.conf.in
+++ b/conf/afm-unit.conf.in
@@ -147,6 +147,8 @@ WorkingDirectory=-{{&#metadata.app-data-dir}}/{{:id}}
ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{:id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
+Environment=XDG_RUNTIME_DIR=/run/user/%i
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
%systemd-unit system
{{#required-permission.urn:AGL:permission::public:hidden}}\
diff --git a/src/wgtpkg-unit.c b/src/wgtpkg-unit.c
index 856be46..441466f 100644
--- a/src/wgtpkg-unit.c
+++ b/src/wgtpkg-unit.c
@@ -378,7 +378,7 @@ static int add_metadata(struct json_object *jdesc, const struct unitconf *conf)
sprintf(portstr, "%d", conf->port);
return j_add_many_strings_m(jdesc,
"#metadata.install-dir", conf->installdir,
- "#metadata.app-data-dir", "%h/app-data",
+ "#metadata.app-data-dir", "/home/%i/app-data",
"#metadata.icons-dir", conf->icondir,
"#metadata.http-port", portstr,
NULL) ? 0 : -1;