Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-77332

GNOME Settings Daemon overrides for "Server with GUI" [g-c-c]

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-10.0
    • None
    • gnome-control-center
    • None
    • Important
    • 1
    • rhel-display-tools-accessibility
    • ssg_display
    • 25
    • 26
    • 2
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • DESKTOP Cycle #4 10.0 phase
    • None

      Summary

       Customers choosing the "Server with GUI" offering in the RHEL installation end up with a RHEL Workstation + Server, but with Workstation defaults that are more suitable for laptops/desktops.

      The main requests are for not auto-suspending (default behavior in GNOME) and for changing the default setting for the power-button-action, which defaults to "suspend" in GNOME.

      .h2 Solution (for RHEL >= 10.0)

      • Create a gsetting schema override for servers: `org.gnome.settings-daemon.plugins.power.gschema.override`
      [org.gnome.settings-daemon.plugins.power]       	 
      sleep-inactive-ac-timeout=0
      
      [org.gnome.settings-daemon.plugins.power]       	 
      power-button-action=nothing
      
      • Introduce a gnome-settings-daemon-server-defaults subpackage to gnome-settings-daemon
        --- a/gnome-settings-daemon.spec
        +++ b/gnome-settings-daemon.spec
        @@ -25,8 +25,8 @@ License:    	GPL-2.0-or-later AND LGPL-2.1-or-later
         URL:        	https://gitlab.gnome.org/GNOME/gnome-settings-daemon
         Source0:    	https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{tarball_version}.tar.xz
         
        -# https://issues.redhat.com/browse/RHEL-30294
        -Patch0: power-server-sleep-type-default.patch
        +# gsetting overrides for the "Server with GUI" installation
        +Source1:    	org.gnome.settings-daemon.plugins.power.gschema.override
         
         BuildRequires:  gcc
         BuildRequires:  gettext
        @@ -88,6 +88,14 @@ Requires:   	%{name}%{?_isa} = %{version}-%{release}
         The %{name}-devel package contains libraries and header files for
         developing applications that use %{name}.
         
        +%package    	server-defaults
        +Summary:    	Workstation settings overrides for Server with GUI
        +Requires:   	%{name}%{?_isa} = %{version}-%{release}
        +
        +%description	server-defaults
        +The {%name}-server-defaults package contains gsettings schema overrides
        +for the default behavior of Workstation in the Server with GUI product.
        +
         %prep
         %autosetup -p1 -n %{name}-%{tarball_version}
         
        @@ -98,6 +106,8 @@ developing applications that use %{name}.
         %install
         %meson_install
         
        +cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas
        +
         %find_lang %{name} --with-gnome
         
         %post
        @@ -199,5 +209,8 @@ developing applications that use %{name}.
         %{_includedir}/gnome-settings-daemon-%{major_version}
         %{_libdir}/pkgconfig/gnome-settings-daemon.pc
         
        +%files server-defaults
        +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.override
        
      • Add the new package to comps-centos-stream-10.xml.in (to the server related comps groups)

      .h2 Testing/Verification (for QE)

      Verify that the main package doesn't contain the /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.override file.

      rpm -qlp gnome-settings-daemon-47*.rpm

      Verify that the gnome-settings-daemon-server-defaults subpackage contains the gschema override file.

      rpm -qlp gnome-settings-daemon-server-defaults-*.rpm

      .h2 Rationale

      Initially I considered an approach based on the systemd-hostnamed chassis-type, but after evaluating the number of settings that customers would reasonably want to override, I figured that solution is an overkill for now.

      If we start having more and more requests for different default behavior for the "server-with-gui" offering, we can reconsider that. That's especially useful when coordinating behavior across various components. As of now, I'm only aware of requests towards gnome-settings-daemon, hence why I didn't pursue the more "global" approach just yet.

              feborges Felipe Borges
              feborges Felipe Borges
              Felipe Borges Felipe Borges
              Tomas Pelka Tomas Pelka
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: