summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Wu <zhiwen.wu@linux.intel.com>2014-01-17 08:44:08 (GMT)
committerAlex Wu <zhiwen.wu@linux.intel.com>2014-01-18 15:27:20 (GMT)
commita5a139f7a3346578b83c0799ec5be6225f7abb2e (patch)
treee21ef6e9e028a69ee48edefa850d12dc6e5844bd
parentcb09bff76f91c616f9d120229fd645246906d20b (diff)
downloadtizen-mobile-session-accepted/tizen/mobile.zip
tizen-mobile-session-accepted/tizen/mobile.tar.gz
tizen-mobile-session-accepted/tizen/mobile.tar.bz2
"DISPLAY=:0" is a environment specific to X display server, it is unnecessary for wayland case. So add this environment only if "with x" defined in project configuration. Change-Id: I553a2bbb0a1e8f629e5c18c44fcf4089da20a96e Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
-rw-r--r--packaging/tizen-mobile-env.conf1
-rw-r--r--packaging/tizen-mobile-session.spec5
2 files changed, 5 insertions, 1 deletions
diff --git a/packaging/tizen-mobile-env.conf b/packaging/tizen-mobile-env.conf
index b4b9c81..83dcb66 100644
--- a/packaging/tizen-mobile-env.conf
+++ b/packaging/tizen-mobile-env.conf
@@ -1,3 +1,2 @@
[Service]
-Environment=DISPLAY=:0
EnvironmentFile=/etc/sysconfig/tizen-mobile-ui
diff --git a/packaging/tizen-mobile-session.spec b/packaging/tizen-mobile-session.spec
index a998727..8d4e50f 100644
--- a/packaging/tizen-mobile-session.spec
+++ b/packaging/tizen-mobile-session.spec
@@ -1,4 +1,5 @@
%bcond_with emulator
+%bcond_with x
Name: tizen-mobile-session
Summary: Target for tizen systemd user session
Version: 2
@@ -27,6 +28,10 @@ install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/user/
install -m 0644 %SOURCE4 %{buildroot}%{_libdir}/systemd/system/
install -m 0644 %SOURCE5 %{buildroot}%{_libdir}/systemd/system/user@.service.d/
+%if %{with x}
+echo "Environment=DISPLAY=:0" >> %{buildroot}%{_libdir}/systemd/system/user@.service.d/tizen-mobile-env.conf
+%endif
+
ln -sf ../user-session-launch@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service
ln -sf tizen-mobile-session.target %{buildroot}%{_libdir}/systemd/user/default.target
ln -sf ../tizen-generate-env.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants