Fix PTREL-624 20/15320/1 38/15238/2 tizen_ivi_panda submit/tizen/20140125.005007 submit/tizen_ivi_panda/20140403.192401
authorAlex Wu <zhiwen.wu@linux.intel.com>
Fri, 17 Jan 2014 07:15:58 +0000 (15:15 +0800)
committerAlex Wu <zhiwen.wu@linux.intel.com>
Sat, 18 Jan 2014 12:18:40 +0000 (20:18 +0800)
launchpad-preload@app.service set a wrong XDG_RUNTIME_DIR
environment.

We use new unit (user-session-launch@.service ) and symbol link
(user-session-launch@seat0-5000.service) to auto-trigger a user
session. This results in a environment
"XDG_RUNTIME_DIR=/run/user/5000" in the user session. But the
lauchpad service still use symbol link
"launchpad-preload@app.service" which result in a environment
"XDG_RUNTIME_DIR=/run/user/app". This make XDG_RUMTIME_DIR
dismatch between app launched by launchpad and program, e.g.
weston, launched in user session. And hence app launched by
launchpad failed at connecting socket /run/user/5000/wayland-0
that created by weston.

Change-Id: I7896dd001e9602772d96f4a20057cd90369a3a9f
Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
packaging/aul.spec

index 8f80d8f..faef24a 100644 (file)
@@ -93,7 +93,7 @@ rm -rf %{buildroot}/usr/share/aul/mida_db.sql
 mkdir -p %{buildroot}/usr/lib/systemd/system/graphical.target.wants
 install -m 0644 %SOURCE101 %{buildroot}/usr/lib/systemd/system/launchpad-preload@.service
 install -m 0644 %SOURCE102 %{buildroot}/usr/lib/systemd/system/ac.service
-ln -s ../launchpad-preload@.service %{buildroot}/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@app.service
+ln -s ../launchpad-preload@.service %{buildroot}/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@5000.service
 ln -s ../ac.service %{buildroot}/usr/lib/systemd/system/graphical.target.wants/ac.service
 
 mkdir -p %{buildroot}/opt/etc/smack/accesses.d
@@ -105,7 +105,7 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 
 %preun
 if [ $1 == 0 ]; then
-    systemctl stop launchpad-preload@app.service
+    systemctl stop launchpad-preload@5000.service
     systemctl stop ac.service
 fi
 
@@ -113,7 +113,7 @@ fi
 /sbin/ldconfig
 systemctl daemon-reload
 if [ $1 == 1 ]; then
-    systemctl restart launchpad-preload@app.service
+    systemctl restart launchpad-preload@5000.service
     systemctl restart ac.service
 fi
 
@@ -141,7 +141,7 @@ systemctl daemon-reload
 /usr/share/aul/preload_list.txt
 /usr/share/aul/preexec_list.txt
 %{_bindir}/launchpad_preloading_preinitializing_daemon
-/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@app.service
+/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@5000.service
 /usr/lib/systemd/system/graphical.target.wants/ac.service
 /usr/lib/systemd/system/launchpad-preload@.service
 /usr/lib/systemd/system/ac.service