<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 10/02/2023 12.51, Mantas Mikulėnas
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPWNY8XPUYQ8T4EPKpXa9LfZD=iNjP_Tho+6ygXrtw5XfJj4jQ@mail.gmail.com">
<div dir="auto">
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Also systemd.special manual recommends putting
display servers into session.slice. But in case of a
wayland compositor it is impossible to separate it
from the apps, because the compositor handles keyboard
shortcuts (which launch apps or launchers which launch
apps). Is this recommendation even feasible for
wayland?<br>
</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto">Yes; the compositor can use systemd D-Bus API to
launch apps in their own .scopes underneath app.slice (or
transient .services), as e.g. GNOME Shell already does.</div>
<div dir="auto"><br>
</div>
<div dir="auto">(For a different use of the same API, see also
how GNOME Terminal – or libvte, I guess – launches each
terminal tab in its own .scope. You can forkbomb a single tab
without significantly affecting the rest of the system.)</div>
</div>
</blockquote>
If one does not want to mess with dbus, is prefixing app commands in
compositor's configuration with `systemd-run --user --scope
--slice=app.slice ...` a valid alternative?<br>
</body>
</html>