From cf87aec563843e2f6e8d7ba98c2ac613e8aaf2e0 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 26 Apr 2017 08:25:29 +0200 Subject: [PATCH 1/4] Install additional dbus-user-session package This gives us all necessary things like DISPLAY or XAUTHORITY within the environment for a service started by systemd --user --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 8696f8e..c5fc412 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Vcs-Git: https://github.com/anbox/anbox.git Package: anbox-common Architecture: all -Depends: ${misc:Depends} +Depends: ${misc:Depends} dbus-user-session Description: Common files necessary for Anbox . This package contains necessary things which can't be shipped From 6c782cffc188df7bd764f2e3519b9f71ceb83f7f Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 26 Apr 2017 08:26:25 +0200 Subject: [PATCH 2/4] Activate anbox service for the systemd user session --- debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index b141034..85b38d1 100755 --- a/debian/rules +++ b/debian/rules @@ -28,8 +28,9 @@ override_dh_install: install -d $(CURDIR)/debian/tmp/etc/modules-load.d install -m 0644 kernel/anbox.conf $(CURDIR)/debian/tmp/etc/modules-load.d - install -d $(CURDIR)/debian/tmp/usr/lib/systemd/user/ + install -d $(CURDIR)/debian/tmp/usr/lib/systemd/user/default.target.wants install -m 0644 data/anbox.service $(CURDIR)/debian/tmp/usr/lib/systemd/user/ + ln -sf /usr/lib/systemd/user/anbox.service $(CURDIR)/debian/tmp/usr/lib/systemd/user/default.target.wants/anbox.service install -d $(CURDIR)/debian/tmp/usr/share/upstart/sessions/ install -m 0644 data/anbox.conf $(CURDIR)/debian/tmp/usr/share/upstart/sessions/ From c993eb3033b35974cb8539084af561b7ca325728 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 26 Apr 2017 08:31:49 +0200 Subject: [PATCH 3/4] debian: add missing comma in Depends: --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index c5fc412..9dfb528 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Vcs-Git: https://github.com/anbox/anbox.git Package: anbox-common Architecture: all -Depends: ${misc:Depends} dbus-user-session +Depends: ${misc:Depends}, dbus-user-session Description: Common files necessary for Anbox . This package contains necessary things which can't be shipped From 7f41e1a90946cdc5914f09e6058673d5640bc151 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 26 Apr 2017 08:43:15 +0200 Subject: [PATCH 4/4] Always try to restart anbox session service when it crashes --- data/anbox.service.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/anbox.service.in b/data/anbox.service.in index 933b4d1..7cdd14f 100644 --- a/data/anbox.service.in +++ b/data/anbox.service.in @@ -2,7 +2,11 @@ Description=Anbox session manager [Service] +Type=simple ExecStart=@SNAP_MOUNT_DIR@/anbox session-manager +Restart=always +StartLimitIntervalSec=3 +StartLimitBurst=1 [Install] WantedBy=default.target