GNU bug report logs - #70282
[PATCH 0/2] Fix gnome-shell screenrecorder

Previous Next

Package: guix-patches;

Reported by: Dariqq <dariqq <at> posteo.net>

Date: Mon, 8 Apr 2024 15:50:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#70282: closed ([PATCH 0/2] Fix gnome-shell screenrecorder)
Date: Tue, 14 May 2024 05:37:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 14 May 2024 07:34:58 +0200
with message-id <c3ac5f23668dcb9201a43cb8d4b075baa92a2535.camel <at> gmail.com>
and subject line Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service.
has caused the debbugs.gnu.org bug report #70282,
regarding [PATCH 0/2] Fix gnome-shell screenrecorder
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
70282: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70282
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dariqq <dariqq <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: rekado <at> elephly.net, Dariqq <dariqq <at> posteo.net>
Subject: [PATCH 0/2] Fix gnome-shell screenrecorder
Date: Mon,  8 Apr 2024 15:39:06 +0000
Hello Guix,

Last week a user in the irc chat remarked that the built in Gnome screenrecorder is not available which rekado and me then investigated afterwards.

This functionality is provided by the org.gnome.Shell.Screencast dbus service which currently fails to start (if for example you try to investigate it with d-spy you get the not really helpful error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Shell.Screencast exited with status 1)

We later figured that this error happens because the required typelib files cannot be found.

As a fix I imported a patch from NixOS [1] from their gnome-shell 42/44 package and wrapped the relevant files with GI_TYPELIB_PATH. This seems to be strictly necessary only for the screencast service however I wrapped all of the dbus services listed in the js/dbusServices/meson.build file, same as what is done in NixOS.

In order for Screencast to work you'll also need pipewire available (I think for the gstreamer plug-in) which is why I added it to gnome-essential-extras in the second patch.

You'll also need pipewire running (i.e the home-service) which makes this a bit unintuitive for users.
I don't think it is currently possible to enable user level shepherd services from the system configuration, but correct me if I am wrong. Without pipewire running the screen recording stops immediately.

As usual i am not sure if the formating/wording of my commit messages and the name I gave the patch are fine.

Also thanks to rekado for helping to make sense of this.

[1] https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch 

Dariqq (2):
  gnu: gnome-shell: Wrap d-bus services.
  gnu: gnome-essential-extras: Propagate pipewire.

 gnu/local.mk                                  |  1 +
 gnu/packages/gnome.scm                        | 14 ++++-
 .../gnome-shell-wrappable-dbus-services.patch | 59 +++++++++++++++++++
 3 files changed, 72 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/gnome-shell-wrappable-dbus-services.patch


base-commit: cd45294d576975a3bff2f755764a3f46f09ea6f9
-- 
2.41.0



[Message part 3 (message/rfc822, inline)]
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Dariqq <dariqq <at> posteo.net>
Cc: 70282-done <at> debbugs.gnu.org, Vivien Kraus <vivien <at> planete-kraus.eu>
Subject: Re: [bug#70282] [PATCH v4] gnu: gnome-shell: Wrap screencast service.
Date: Tue, 14 May 2024 07:34:58 +0200
Am Donnerstag, dem 09.05.2024 um 11:30 -0400 schrieb Maxim Cournoyer:
> Hi Dariqq,
> 
> Dariqq <dariqq <at> posteo.net> writes:
> 
> [...]
> 
> > > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> > > > index 92e35e3c5a..4bbff2a89b 100644
> > > > --- a/gnu/packages/gnome.scm
> > > > +++ b/gnu/packages/gnome.scm
> > > > @@ -9408,6 +9408,7 @@ (define-public gnome-shell
> > > >               (add-after 'install 'wrap-programs
> > > >                 (lambda* (#:key inputs #:allow-other-keys)
> > > >                   (let ((gi-typelib-path  (getenv
> > > > "GI_TYPELIB_PATH"))
> > > > +                      (gst-plugin-path  (getenv
> > > > "GST_PLUGIN_SYSTEM_PATH"))
> > > >                         (python-path
> > > >                          (string-join
> > > >                           (filter (lambda (item)
> > > > @@ -9427,6 +9428,19 @@ (define-public gnome-shell
> > > >                                       "path =>
> > > > imports.gi.GIRepository.Repository."
> > > >                                      
> > > > "prepend_search_path(path));\n"
> > > >                                       all)))
> > > > +                  ;; Screencast requires a pipewire service
> > > > running
> > > > +                  ;; (i.e. as provided by home-pipewire-
> > > > service-type)
> > > > +                  (substitute* (string-append #$output
> > > > "/share/gnome-shell/"
> > > > +                                             
> > > > "org.gnome.Shell.Screencast")
> > > > +                    (("imports\\.package\\.start" all)
> > > > +                     (string-append "'" gi-typelib-path
> > > > "'.split(':').forEach("
> > > > +                                    "path =>
> > > > imports.gi.GIRepository.Repository."
> > > > +                                   
> > > > "prepend_search_path(path));\n"
> > > > +                                   
> > > > "imports.gi.GLib.setenv('GST_PLUGIN_SYSTEM_PATH',"
> > > > +                                   
> > > > "[imports.gi.GLib.getenv('GST_PLUGIN_SYSTEM_PATH'),"
> > > > +                                    "'" gst-plugin-path
> > > > "'].filter(v => v).join(':'),"
> > > > +                                    "true);\n"
> > > > +                                    all)))
> > > Perhaps a simple patch would convey the change better and be
> > > easier to maintain in the future / be readily available for other
> > > distributions to use.
> > 
> > 
> > The simple patch that would do this is basically the patch from
> > nixos in v1 of this which adds a shebang line for gjs to the
> > service invocation files (rather than the dbus service invoking
> > $gjs $service). The problem then is that wrap-program changes the
> > filename to * .real which makes gjs unhappy.
> > 
> > The people from nix circumvent this by using some js at the
> > beginning to reset the entrypoint to the correct value.
> > 
> > One nice way around avoiding the problem would be using wrap-script
> > instead though that does not support gjs as interpreter (yet?) and
> > adding that forces a rebuild of all packages due to (guix build
> > utils) changing.
> 
> It'd be nice to prep such support on core-updates.  You can test it
> on master by having a (guix build utils-next) module that you
> explicitly use.
> 
> > Maybe another comment, similiar to the one Liliana suggested
> > earlier in this thread, could be added at the beginning to inform
> > about changing to wrap script + patch instead once that is a viable
> > option?
> 
> That could be a good reminder to have, yes.
I've pushed the current version as-is, without reminder, so that we can
at least mark the issue done.  If someone has a good text to add,
please don't hesitate to do so in post.  Also don't hesitate to submit
new stuff to gnome-team or core-updates after the pending merges are
through.

Cheers and thanks for all the hard work :)

This bug report was last modified 1 year and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.