From a5a139f7a3346578b83c0799ec5be6225f7abb2e Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Fri, 17 Jan 2014 16:44:08 +0800 Subject: Make adding the X specific environment conditional. "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 --- packaging/tizen-mobile-env.conf | 1 - packaging/tizen-mobile-session.spec | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3