Mercurial > sat_docs
annotate flatpak/main_loop.patch @ 134:4549cf265131
flatpak: install D-Bus .service on each frontend:
work around lack of dependency handling in Flatpak by installing D-Bus .service on each frontend.
This works because all backend is included in the runtime, but we have to add backend permissions to all frontend, and set --own-name=org.salutatoi.SAT.
Furthermore, if one frontend is removed, the symbolic link is removed and the backend will not be launched automatically anymore, even if other frontends are still there.
The benefict of this method is that backend has not to be installed manually to use a frontend.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 15 Jul 2018 16:56:55 +0200 |
parents | d7761eb3f20b |
children |
rev | line source |
---|---|
132
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 diff --git a/urwid/main_loop.py b/urwid/main_loop.py |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 index 10ea5e1..59252bf 100755 |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 --- a/urwid/main_loop.py |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 +++ b/urwid/main_loop.py |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 @@ -130,10 +130,11 @@ class MainLoop(object): |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 event_loop = SelectEventLoop() |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 self.event_loop = event_loop |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 - if hasattr(self.screen, 'signal_handler_setter'): |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 - # Tell the screen what function it must use to set |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 - # signal handlers |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 - self.screen.signal_handler_setter = self.event_loop.set_signal_handler |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 + # disabled to work around outdated GLib version in org.freedesktop.Platform |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 + # if hasattr(self.screen, 'signal_handler_setter'): |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 + # # Tell the screen what function it must use to set |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 + # # signal handlers |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 + # self.screen.signal_handler_setter = self.event_loop.set_signal_handler |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 self._watch_pipes = {} |
d7761eb3f20b
flatpak: Flatpak manifests for backend and active frontends, first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 |