summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-28 23:53:24 +0900
committerCedric Bail <cedric.bail@free.fr>2013-03-30 18:14:26 +0900
commitcd28bc814552bf52bb670e108343b23d48fa839e (patch)
tree8119c42e8ad25f496aa500fafec79b0d91e21060
parent3f34680b7a438e9db6d2fcb3b29697f87a33f1b5 (diff)
e: add support for systemd user session.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--configure.ac7
-rw-r--r--data/Makefile.am4
-rw-r--r--data/units/Makefile.am9
-rw-r--r--data/units/e18.service27
-rw-r--r--m4/pkg_var.m414
-rw-r--r--src/bin/e_main.c55
8 files changed, 94 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index b040cf5..2b19cb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-03-28 Cedric Bail
2
3 * added support for systemd user session.
4
12013-03-11 Mike Blumenkrantz 52013-03-11 Mike Blumenkrantz
2 6
3 * menus are now drawn directly on the compositor canvas 7 * menus are now drawn directly on the compositor canvas
diff --git a/NEWS b/NEWS
index d8cf3ac..c5d08c7 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,7 @@ Additions:
45 * new option for disabling all pointer warps 45 * new option for disabling all pointer warps
46 * added option for preventing all keyboard layout changes 46 * added option for preventing all keyboard layout changes
47 * added option for remembering filemanager windows globally 47 * added option for remembering filemanager windows globally
48 * Added support for systemd user session
48 49
49Changes: 50Changes:
50 Modules: 51 Modules:
diff --git a/configure.ac b/configure.ac
index ef09d46..34e68dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -205,6 +205,12 @@ if test "x${have_bluetooth}" = "xyes"; then
205 AC_DEFINE_UNQUOTED([HAVE_BLUETOOTH], [1], [Bluetooth is there]) 205 AC_DEFINE_UNQUOTED([HAVE_BLUETOOTH], [1], [Bluetooth is there])
206fi 206fi
207 207
208# Detect systemd user session directory properly
209EFL_PKG_CHECK_VAR([USER_SESSION_DIR], [systemd], [systemduserunitdir],
210 [have_systemd_user_session="yes"], [have_systemd_user_session="no"])
211AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
212AC_SUBST([USER_SESSION_DIR])
213
208execinfo_libs="" 214execinfo_libs=""
209AC_CHECK_HEADERS([execinfo.h], [have_execinfo="yes"], [have_execinfo="no"]) 215AC_CHECK_HEADERS([execinfo.h], [have_execinfo="yes"], [have_execinfo="no"])
210if test "x${have_execinfo}" = "xyes" ; then 216if test "x${have_execinfo}" = "xyes" ; then
@@ -1009,6 +1015,7 @@ data/etc/Makefile
1009data/etc/sysactions.conf 1015data/etc/sysactions.conf
1010data/icons/Makefile 1016data/icons/Makefile
1011data/backgrounds/Makefile 1017data/backgrounds/Makefile
1018data/units/Makefile
1012doc/Makefile 1019doc/Makefile
1013doc/Doxyfile 1020doc/Doxyfile
1014doc/e.dox 1021doc/e.dox
diff --git a/data/Makefile.am b/data/Makefile.am
index f320e9d..dbd5a42 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -10,4 +10,6 @@ icons \
10backgrounds \ 10backgrounds \
11flags \ 11flags \
12favorites \ 12favorites \
13desktop 13desktop \
14units
15
diff --git a/data/units/Makefile.am b/data/units/Makefile.am
new file mode 100644
index 0000000..04ed87f
--- /dev/null
+++ b/data/units/Makefile.am
@@ -0,0 +1,9 @@
1AUTOMAKE_OPTIONS = 1.4 foreign
2MAINTAINERCLEANFILES = Makefile.in
3
4if HAVE_SYSTEMD_USER_SESSION
5unitsdir = $(USER_SESSION_DIR)
6units_DATA = e18.service
7endif
8
9EXTRA_DIST = $(units_DATA)
diff --git a/data/units/e18.service b/data/units/e18.service
new file mode 100644
index 0000000..79feb40
--- /dev/null
+++ b/data/units/e18.service
@@ -0,0 +1,27 @@
1[Unit]
2Description=Enlightenment 17 service
3Before=end.target
4After=xorg.target
5Requires=xorg.target
6Requires=dbus.socket
7Requires=pulseaudio.service
8Requires=ssh-agent.service
9AllowIsolate=true
10
11[Service]
12Type=notify
13#Environment=PATH=uncomment:to:override:your:PATH
14Environment=E_START=enlightenment
15ExecStart=/usr/bin/enlightenment
16Restart=always
17RestartPreventExitStatus=0
18RestartSec=2
19StartLimitInterval=30
20StartLimitBurst=7
21KillMode=process
22WatchdogSec=1
23TimeoutSec=1
24NotifyAccess=all
25
26[Install]
27WantedBy=wm.target
diff --git a/m4/pkg_var.m4 b/m4/pkg_var.m4
new file mode 100644
index 0000000..3d0a309
--- /dev/null
+++ b/m4/pkg_var.m4
@@ -0,0 +1,14 @@
1# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
2# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3# -------------------------------------------
4# Retrieves the value of the pkg-config variable for the given module.
5AC_DEFUN([EFL_PKG_CHECK_VAR],
6[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
8
9_PKG_CONFIG([$1], [variable="][$3]["], [$2])
10AS_VAR_COPY([$1], [pkg_cv_][$1])
11
12AS_VAR_IF([$1], [""], [$5], [$4])dnl
13])# PKG_CHECK_VAR
14
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 2df3d96..a6cc382 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -187,32 +187,35 @@ main(int argc, char **argv)
187 /* trap deadly bug signals and allow some form of sane recovery */ 187 /* trap deadly bug signals and allow some form of sane recovery */
188 /* or ability to gdb attach and debug at this point - better than your */ 188 /* or ability to gdb attach and debug at this point - better than your */
189 /* wm/desktop vanishing and not knowing what happened */ 189 /* wm/desktop vanishing and not knowing what happened */
190 TS("Signal Trap"); 190 if (!getenv("NOTIFY_SOCKET"))
191 action.sa_sigaction = e_sigseg_act; 191 {
192 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 192 TS("Signal Trap");
193 sigemptyset(&action.sa_mask); 193 action.sa_sigaction = e_sigseg_act;
194 sigaction(SIGSEGV, &action, NULL); 194 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
195 195 sigemptyset(&action.sa_mask);
196 action.sa_sigaction = e_sigill_act; 196 sigaction(SIGSEGV, &action, NULL);
197 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 197
198 sigemptyset(&action.sa_mask); 198 action.sa_sigaction = e_sigill_act;
199 sigaction(SIGILL, &action, NULL); 199 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
200 200 sigemptyset(&action.sa_mask);
201 action.sa_sigaction = e_sigfpe_act; 201 sigaction(SIGILL, &action, NULL);
202 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 202
203 sigemptyset(&action.sa_mask); 203 action.sa_sigaction = e_sigfpe_act;
204 sigaction(SIGFPE, &action, NULL); 204 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
205 205 sigemptyset(&action.sa_mask);
206 action.sa_sigaction = e_sigbus_act; 206 sigaction(SIGFPE, &action, NULL);
207 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 207
208 sigemptyset(&action.sa_mask); 208 action.sa_sigaction = e_sigbus_act;
209 sigaction(SIGBUS, &action, NULL); 209 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
210 210 sigemptyset(&action.sa_mask);
211 action.sa_sigaction = e_sigabrt_act; 211 sigaction(SIGBUS, &action, NULL);
212 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 212
213 sigemptyset(&action.sa_mask); 213 action.sa_sigaction = e_sigabrt_act;
214 sigaction(SIGABRT, &action, NULL); 214 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
215 TS("Signal Trap Done"); 215 sigemptyset(&action.sa_mask);
216 sigaction(SIGABRT, &action, NULL);
217 TS("Signal Trap Done");
218 }
216 219
217 t = ecore_time_unix_get(); 220 t = ecore_time_unix_get();
218 s = getenv("E_START_TIME"); 221 s = getenv("E_START_TIME");