Commit Graph

9 Commits

Author SHA1 Message Date
Jonas Ådahl
73436b5276 dbusService: Queue shutdown check on startup
If something started the service, but crashed before managing to make a
method call, we'd end up with the service running indefinitely. Fix this
by queueing a shutdown check immediately on startup.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1372
2020-07-31 10:51:12 +02:00
Florian Müllner
82fd68b985 notificationDaemon: Fix grouping by PID
For fd.o notifications, we are taking the sender's PID into
account when associating notifications with sources (mainly
to deal with notify-send).

This broke when the implementation under the well-known name
was moved into a separate service, as the implementation in
gnome-shell will now always see the public notification-daemon
as sender.

Restore the old behavior by resolving the sender PID in the
separate service, and pass it as hint to the implementation
in gnome-shell.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2592
2020-05-19 08:24:07 +00:00
Florian Müllner
a90fcb7ddb dbusServices/extensions: Handle parentWindow parameter
Now that the service implements the preference dialog, it's time
to support OpenExtensionPrefs()'s parentWindow parameter and make
the dialog a transient of the external window if specified.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1087
2020-03-26 18:32:30 +01:00
Florian Müllner
23e5cd4e10 dbusServices/extensions: Include Params module
It's unused and was removed in commit a0467bf875, which broke extensions
that rely on it in their preference widget.

As the removal only happened post-3.36.0, add it back until we branch.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2476
2020-03-24 10:38:24 +01:00
Florian Müllner
34e85342d8 dbusServices/extensions: Take over prefs dialog from app
As outlined earlier, in order to turn the Extensions app into a properly
sandboxed application, we need to split out the extension prefs dialog
and move it elsewhere.

With "elsewhere" being the new Extensions D-Bus service, effectively
turning it into a shell extensions portal.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1106
2020-03-23 15:39:12 +00:00
Florian Müllner
91b7474d5a dbusServices/extensions: Proxy Extensions API
Similar to the previously added org.freedesktop.Notifications proxy,
this exposes the org.gnome.Shell.Extensions API and forwards any
request to the real implementation in gnome-shell.

The motivation differs though: We want to be able to package the
extension app as flatpak and distribute it separately, but the
extension prefs dialog is hard to impossible to sandbox:

 - filenames need translating between host and sandbox, and we
   can only do that in some cases (serializing/deserializing
   extensions), but not others (extension settings that refer
   to files)

 - system extensions install their GSettings schemas in the system
   path; the best we can do there is assume a host prefix of /usr
   and set GSETTINGS_SCHEMA_DIR in the flatpak (eeks)

 - extensions may rely on additional typelibs that are present on
   the host (for example because gnome-shell itself depends on
   them), but not inside the sandbox - unless we bundle all of
   gnome-shell's dependencies

 - if gjs/mozjs differ between host and sandbox, extensions must
   handle different runtimes for the extension and its prefs

And all those issues occur despite a very permissive sandbox (full
host filesystem access, full dconf access, full org.gnome.Shell
access (including Eval()!)).

This new service will give us an alternative place for handling
the preference dialog:

 - it runs outside of gnome-shell process, so can open windows

 - it runs on the host, so the extension's prefs get to run
   in the same namespace as the extension itself

That is, the service will provide portal-like functionality (albeit
not using the org.freedesktop.portal.* namespace, as extension
management is an inherently privileged operation).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1106
2020-03-23 15:39:12 +00:00
Florian Müllner
2c91b6164c dbusServices: Allow to inhibit auto-shutdown
While we only shut down after a method call completed or (if the
interface has signals) the sender disconnects from the bus, services
may need to inhibit auto-shutdown for more specific reasons themselves,
for example when a method call kicks off an operation that should
complete before shutting down.

Add hold() and release() methods like Gio.Application for those cases.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1115
2020-03-21 20:16:22 +00:00
Florian Müllner
799bbdb503 dbusServices/notifications: Add a separate notification daemon
Add a small service that exposes the Fdo notification API under the
well-known name, and forwards any requests to the actual implementation
in the shell.

That way any app with permission to talk to org.freedesktop.Notifications
will get exactly that, and nothing more.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/547
2020-03-12 16:09:27 +00:00
Florian Müllner
574c560677 dbusServices: Add some base classes for small stand-alone services
There are a couple of D-Bus services that are currently provided by
gnome-shell for which it makes sense to move them fully or partially
into separate processes:

 - screen recording (performance)
 - FDO notifications (security)
 - Extensions (portalization)

Add some base classes and build system glue to take care of the
common boilerplate.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/547
2020-03-12 16:09:27 +00:00