Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pantheon 8 #312449

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft

Pantheon 8 #312449

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3439ba2
pantheon.mutter: Default to 46
bobby285271 Nov 10, 2024
91447e2
pantheon.gnome-settings-daemon: Default to 46
bobby285271 Nov 10, 2024
a6602d7
pantheon.gala: 7.1.3 -> 8.1.0
bobby285271 May 27, 2024
5c9bc38
pantheon.elementary-dock: reinit at 8.0.1
bobby285271 Aug 25, 2024
3ec2ecc
pantheon.switchboard-plug-keyboard: 8.0.0 -> 8.0.1
bobby285271 Aug 25, 2024
8e505ee
pantheon.switchboard-plug-pantheon-shell: 8.0.0 -> 8.1.0
bobby285271 Aug 25, 2024
8c9ab78
pantheon.elementary-default-settings: 7.1.0 -> 8.0.2
bobby285271 Jul 11, 2024
4cdbeae
pantheon.wingpanel: 3.0.5 -> 8.0.1
bobby285271 Aug 25, 2024
478d790
pantheon.wingpanel-applications-menu: 2.11.1 -> 8.0.0
bobby285271 May 17, 2024
0f4b0d2
pantheon.elementary-greeter: 7.0.0 -> 8.0.0
bobby285271 May 18, 2024
48287c1
pantheon.elementary-shortcut-overlay: 8.0.0 -> 8.0.1
bobby285271 Aug 25, 2024
56bd189
pantheon.elementary-notifications: 7.0.1 -> 8.0.0
bobby285271 Jul 25, 2024
b4ddcaf
pantheon.xdg-desktop-portal-pantheon: 7.2.0 -> 8.0.0
bobby285271 Nov 23, 2024
e27e02b
pantheon.pantheon-agent-polkit: 8.0.0 -> 8.0.1
bobby285271 Nov 23, 2024
0fde7a4
pantheon.elementary-onboarding: 8.0.2 -> 8.0.3
bobby285271 Dec 22, 2024
ed05c21
pantheon.elementary-session-settings: Build wayland session
bobby285271 Jun 5, 2024
5e30e70
pantheon.elementary-session-settings: Various simplifications
bobby285271 Jan 7, 2025
d07043e
pantheon.elementary-session-settings: Use upstream session files
bobby285271 Jan 8, 2025
4b24e2e
nixos/pantheon: Get rid of bamf
bobby285271 Nov 10, 2024
aff05b5
nixos/pantheon: Replace sessionCommands with extraInit
bobby285271 Jan 7, 2025
5c7fd5e
nixosTests.pantheon: Unbreak and restore test for closing multitaskin…
bobby285271 Jan 8, 2025
e3a9c03
nixosTests.pantheon-wayland: init
bobby285271 Jan 8, 2025
66b2d8e
nixos/doc/rl-2505: Mention Pantheon 8
bobby285271 Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@
- Following [changes in Mint 22](https://github.com/linuxmint/mintupgrade/commit/f239cde908288b8c250f938e7311c7ffbc16bd59) we are no longer overriding Qt application styles. You can still restore the previous default with `qt.style = "gtk2"` and `qt.platformTheme = "gtk2"`.
- Following [changes in Mint 20](https://github.com/linuxmint/mintupgrade-legacy/commit/ce15d946ed9a8cb8444abd25088edd824bfb18f6) we are replacing xplayer with celluloid since xplayer is no longer maintained.

- Pantheon has been updated to 8, please check the [upstream announcement](https://blog.elementary.io/os-8-available-now/) for more details.
- Same as elementary OS, the X11 session is named "Classic Session" and the Wayland session is named "Secure Session".
- The dock has been rewritten, you need to manually migrate the dock items on update. You can check `~/.config/plank/dock1/launchers/` for your previous settings.

- Xfce has been updated to 4.20, please check the [upstream feature tour](https://www.xfce.org/about/tour420) for more details.
- Wayland session is still [experimental](https://wiki.xfce.org/releng/wayland_roadmap) and requires opt-in using `enableWaylandSession` option.
- Overriding Wayland compositor is possible using `enableWaylandSession` option, but you might need to take care [`xfce4-session`](https://gitlab.xfce.org/xfce/xfce4-session/-/merge_requests/49), [`dbus-update-activation-environment`](https://github.com/labwc/labwc/blob/eaf11face68ee1f1bcc7ce1498304ca8c108c8ba/src/config/session.c#L234) and [`systemctl --user import-environment`](https://github.com/labwc/labwc/blob/eaf11face68ee1f1bcc7ce1498304ca8c108c8ba/src/config/session.c#L239) on startup.
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/desktops/bamf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{ config, lib, pkgs, ... }:
{
meta = with lib; {
maintainers = with lib.maintainers; [ ] ++ lib.teams.pantheon.members;
maintainers = with lib.maintainers; [ ];
};

###### interface
Expand Down
29 changes: 13 additions & 16 deletions nixos/modules/services/x11/desktop-managers/pantheon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,23 @@ in
# https://github.com/elementary/greeter/issues/368
services.displayManager.defaultSession = mkDefault "pantheon";

services.xserver.displayManager.sessionCommands = ''
if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
true
${concatMapStrings (p: ''
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
fi

if [ -d "${p}/lib/girepository-1.0" ]; then
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
fi
environment.extraInit = ''
${concatMapStrings (p: ''
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
fi

if [ -d "${p}/lib/girepository-1.0" ]; then
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
'';

# Default services
hardware.bluetooth.enable = mkDefault true;
security.polkit.enable = true;
services.accounts-daemon.enable = true;
services.bamf.enable = true;
services.colord.enable = mkDefault true;
services.fwupd.enable = mkDefault true;
# TODO: Enable once #177946 is resolved
Expand Down Expand Up @@ -232,7 +228,8 @@ in
])) config.environment.pantheon.excludePackages;

# Settings from elementary-default-settings
environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini";
# GTK4 will try both $XDG_CONFIG_DIRS/gtk-4.0 and ${gtk4}/etc/gtk-4.0, but not /etc/gtk-4.0.
environment.etc."xdg/gtk-4.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-4.0/settings.ini";

xdg.mime.enable = true;
xdg.icons.enable = true;
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ in {
patroni = handleTestOn ["x86_64-linux"] ./patroni.nix {};
pantalaimon = handleTest ./matrix/pantalaimon.nix {};
pantheon = handleTest ./pantheon.nix {};
pantheon-wayland = handleTest ./pantheon-wayland.nix {};
paperless = handleTest ./paperless.nix {};
parsedmarc = handleTest ./parsedmarc {};
password-option-override-ordering = handleTest ./password-option-override-ordering.nix {};
Expand Down
105 changes: 105 additions & 0 deletions nixos/tests/pantheon-wayland.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import ./make-test-python.nix (
{ pkgs, lib, ... }:

{
name = "pantheon-wayland";

meta.maintainers = lib.teams.pantheon.members;

nodes.machine =
{ nodes, ... }:

let
videosAutostart = pkgs.writeTextFile {
name = "autostart-elementary-videos";
destination = "/etc/xdg/autostart/io.elementary.videos.desktop";
text = ''
[Desktop Entry]
Version=1.0
Name=Videos
Type=Application
Terminal=false
Exec=io.elementary.videos %U
'';
};
in
{
imports = [ ./common/user-account.nix ];

# Workaround ".gala-wrapped invoked oom-killer"
virtualisation.memorySize = 2047;

services.xserver.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
services.displayManager = {
autoLogin.enable = true;
autoLogin.user = nodes.machine.users.users.alice.name;
defaultSession = "pantheon-wayland";
};

# We ship pantheon.appcenter by default when this is enabled.
services.flatpak.enable = true;

# For basic OCR tests.
environment.systemPackages = [ videosAutostart ];

# We don't ship gnome-text-editor in Pantheon module, we add this line mainly
# to catch eval issues related to this option.
environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ];
};

enableOCR = true;

testScript =
{ nodes, ... }:
let
user = nodes.machine.users.users.alice;
in
''
machine.wait_for_unit("display-manager.service")

with subtest("Wait for wayland server"):
machine.wait_for_file("/run/user/${toString user.uid}/wayland-0")

with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")

with subtest("Check if Pantheon components actually start"):
# We will specifically check gsd-xsettings here since it is manually pulled up by gala.
# https://github.com/elementary/gala/pull/2140
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]:
machine.wait_until_succeeds(f"pgrep -f {i}")
for i in ["io.elementary.files.xdg-desktop-portal.service"]:
machine.wait_for_unit(i, "${user.name}")

with subtest("Check if various environment variables are set"):
cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ"
machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'")
machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'")
# Hopefully from the sessionPath option.
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
# Hopefully from login shell.
machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'")

with subtest("Wait for elementary videos autostart"):
machine.wait_until_succeeds("pgrep -f io.elementary.videos")
machine.wait_for_text("No Videos Open")
machine.screenshot("videos")

with subtest("Trigger multitasking view"):
cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1"
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus"
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
machine.sleep(5)
machine.screenshot("multitasking")
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")

with subtest("Check if gala has ever coredumped"):
machine.fail("coredumpctl --json=short | grep gala")
# So we can see the dock.
machine.execute("pkill -f -9 io.elementary.videos")
machine.sleep(10)
machine.screenshot("screen")
'';
}
)
9 changes: 4 additions & 5 deletions nixos/tests/pantheon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")

with subtest("Check if Pantheon components actually start"):
for i in ["gala", "io.elementary.wingpanel", "plank", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]:
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]:
machine.wait_until_succeeds(f"pgrep -f {i}")
for i in ["gala", "io.elementary.wingpanel", "plank"]:
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock"]:
machine.wait_for_window(i)
for i in ["bamfdaemon.service", "io.elementary.files.xdg-desktop-portal.service"]:
for i in ["io.elementary.files.xdg-desktop-portal.service"]:
machine.wait_for_unit(i, "${user.name}")

with subtest("Check if various environment variables are set"):
Expand All @@ -70,8 +70,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
# Hopefully from login shell.
machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'")
# See elementary-session-settings packaging.
machine.succeed(f"{cmd} | grep 'XDG_CONFIG_DIRS' | grep 'elementary-default-settings'")

with subtest("Open elementary videos"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.videos >&2 &'")
Expand Down Expand Up @@ -101,6 +99,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
machine.sleep(5)
machine.screenshot("multitasking")
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")

with subtest("Check if gala has ever coredumped"):
machine.fail("coredumpctl --json=short | grep gala")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From aae1e774dd9de22fe3520cf9eb2bfbf7216f5eb0 Mon Sep 17 00:00:00 2001
From: WORLDofPEACE <[email protected]>
Date: Sun, 20 Sep 2020 16:09:36 -0400
Subject: [PATCH] build: add a gnome_session_ctl_path option

In gsd.service.in the ExecStopPost expects g-s-d libexecdir to
be from the same prefix as gnome-session's, and this is not necessarily
true as there are linux distro's that install their packages into their
own individual prefixes (like NixOS or Guix).
---
meson_options.txt | 1 +
plugins/gsd.service.in | 2 +-
plugins/meson.build | 6 ++++++
3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/meson_options.txt b/meson_options.txt
index 3e04cf64f..21e003c61 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,5 @@
option('udev_dir', type: 'string', value: '', description: 'Absolute path of the udev base directory')
+option('gnome_session_ctl_path', type: 'string', value: '', description: 'Absolute path to the gnome-session-ctl binary')
option('systemd', type: 'boolean', value: true, description: 'Enable systemd integration')

option('alsa', type: 'boolean', value: true, description: 'build with ALSA support (not optional on Linux platforms)')
diff --git a/plugins/gsd.service.in b/plugins/gsd.service.in
index 79b5f5536..bfbde6d05 100644
--- a/plugins/gsd.service.in
+++ b/plugins/gsd.service.in
@@ -23,4 +23,4 @@ BusName=@plugin_dbus_name@
TimeoutStopSec=5
# We cannot use OnFailure as e.g. dependency failures are normal
# https://github.com/systemd/systemd/issues/12352
-ExecStopPost=@libexecdir@/gnome-session-ctl --exec-stop-check
+ExecStopPost=@gnome_session_ctl@ --exec-stop-check
diff --git a/plugins/meson.build b/plugins/meson.build
index 83e018854..266a0f093 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -20,6 +20,11 @@ all_plugins = [

disabled_plugins = []

+gnome_session_ctl = get_option('gnome_session_ctl_path')
+if gnome_session_ctl == ''
+ gnome_session_ctl = join_paths(gsd_libexecdir, 'gnome-session-ctl')
+endif
+
if not enable_smartcard
disabled_plugins += ['smartcard']
endif
@@ -125,6 +130,7 @@ foreach plugin: all_plugins
unit_conf.set('plugin_name', plugin_name)
unit_conf.set('description', plugin_description)
unit_conf.set('libexecdir', gsd_libexecdir)
+ unit_conf.set('gnome_session_ctl', gnome_session_ctl)
unit_conf.set('plugin_dbus_name', plugin_dbus_name)
unit_conf.set('plugin_restart', plugin_restart_rule.get(plugin_name, 'on-failure'))
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
stdenv,
lib,
fetchpatch,
substituteAll,
fetchurl,
meson,
Expand All @@ -13,7 +12,6 @@
glib,
libnotify,
libgnomekbd,
lcms2,
libpulseaudio,
alsa-lib,
libcanberra-gtk3,
Expand All @@ -36,26 +34,22 @@
wrapGAppsHook3,
python3,
tzdata,
nss,
gcr_4,
gnome-session-ctl,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "gnome-settings-daemon";
version = "43.0";
version = "46.0";

src = fetchurl {
url = "mirror://gnome/sources/gnome-settings-daemon/${lib.versions.major finalAttrs.version}/gnome-settings-daemon-${finalAttrs.version}.tar.xz";
hash = "sha256-NRO7JPxvgYFmciOmSgZ1NP3M879mMmqUA9OLDw1gE9A=";
hash = "sha256-C5oPZPoYqOfgm0yVo/dU+gM8LNvS3DVwHwYYVywcs9c=";
};

patches = [
# https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/aae1e774dd9de22fe3520cf9eb2bfbf7216f5eb0.patch";
hash = "sha256-O4m0rOW8Zrgu3Q0p0OA8b951VC0FjYbOUk9MLzB9icI=";
})
./add-gnome-session-ctl-option.patch

(substituteAll {
src = ./fix-paths.patch;
Expand Down Expand Up @@ -85,14 +79,12 @@ stdenv.mkDerivation (finalAttrs: {
libnotify
libgnomekbd # for org.gnome.libgnomekbd.keyboard schema
gnome-desktop
lcms2
libpulseaudio
alsa-lib
libcanberra-gtk3
upower
colord
libgweather
nss
polkit
geocode-glib_2
geoclue2
Expand Down
Loading