Skip to content

Commit 3cdbf0a

Browse files
authored
Pantheon 8 (#312449)
2 parents 48173f9 + cc6f209 commit 3cdbf0a

File tree

42 files changed

+391
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+391
-417
lines changed

nixos/doc/manual/release-notes/rl-2505.section.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@
325325
- 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"`.
326326
- 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.
327327

328+
- Pantheon has been updated to 8, please check the [upstream announcement](https://blog.elementary.io/os-8-available-now/) for more details.
329+
- Same as elementary OS, the X11 session is named "Classic Session" and the Wayland session is named "Secure Session".
330+
- 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.
331+
328332
- Xfce has been updated to 4.20, please check the [upstream feature tour](https://www.xfce.org/about/tour420) for more details.
329333
- Wayland session is still [experimental](https://wiki.xfce.org/releng/wayland_roadmap) and requires opt-in using `enableWaylandSession` option.
330334
- 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.

nixos/modules/services/desktops/bamf.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{ config, lib, pkgs, ... }:
33
{
44
meta = with lib; {
5-
maintainers = with lib.maintainers; [ ] ++ lib.teams.pantheon.members;
5+
maintainers = with lib.maintainers; [ ];
66
};
77

88
###### interface

nixos/modules/services/x11/desktop-managers/pantheon.nix

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,27 +112,23 @@ in
112112
# https://github.com/elementary/greeter/issues/368
113113
services.displayManager.defaultSession = mkDefault "pantheon";
114114

115-
services.xserver.displayManager.sessionCommands = ''
116-
if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
117-
true
118-
${concatMapStrings (p: ''
119-
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
120-
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
121-
fi
122-
123-
if [ -d "${p}/lib/girepository-1.0" ]; then
124-
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
125-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
126-
fi
127-
'') cfg.sessionPath}
128-
fi
115+
environment.extraInit = ''
116+
${concatMapStrings (p: ''
117+
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
118+
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
119+
fi
120+
121+
if [ -d "${p}/lib/girepository-1.0" ]; then
122+
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
123+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
124+
fi
125+
'') cfg.sessionPath}
129126
'';
130127

131128
# Default services
132129
hardware.bluetooth.enable = mkDefault true;
133130
security.polkit.enable = true;
134131
services.accounts-daemon.enable = true;
135-
services.bamf.enable = true;
136132
services.colord.enable = mkDefault true;
137133
services.fwupd.enable = mkDefault true;
138134
# TODO: Enable once #177946 is resolved
@@ -232,7 +228,8 @@ in
232228
])) config.environment.pantheon.excludePackages;
233229

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

237234
xdg.mime.enable = true;
238235
xdg.icons.enable = true;

nixos/tests/all-tests.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ in {
798798
patroni = handleTestOn ["x86_64-linux"] ./patroni.nix {};
799799
pantalaimon = handleTest ./matrix/pantalaimon.nix {};
800800
pantheon = handleTest ./pantheon.nix {};
801+
pantheon-wayland = handleTest ./pantheon-wayland.nix {};
801802
paperless = handleTest ./paperless.nix {};
802803
parsedmarc = handleTest ./parsedmarc {};
803804
password-option-override-ordering = handleTest ./password-option-override-ordering.nix {};

nixos/tests/pantheon-wayland.nix

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import ./make-test-python.nix (
2+
{ pkgs, lib, ... }:
3+
4+
{
5+
name = "pantheon-wayland";
6+
7+
meta.maintainers = lib.teams.pantheon.members;
8+
9+
nodes.machine =
10+
{ nodes, ... }:
11+
12+
let
13+
videosAutostart = pkgs.writeTextFile {
14+
name = "autostart-elementary-videos";
15+
destination = "/etc/xdg/autostart/io.elementary.videos.desktop";
16+
text = ''
17+
[Desktop Entry]
18+
Version=1.0
19+
Name=Videos
20+
Type=Application
21+
Terminal=false
22+
Exec=io.elementary.videos %U
23+
'';
24+
};
25+
in
26+
{
27+
imports = [ ./common/user-account.nix ];
28+
29+
# Workaround ".gala-wrapped invoked oom-killer"
30+
virtualisation.memorySize = 2047;
31+
32+
services.xserver.enable = true;
33+
services.xserver.desktopManager.pantheon.enable = true;
34+
services.displayManager = {
35+
autoLogin.enable = true;
36+
autoLogin.user = nodes.machine.users.users.alice.name;
37+
defaultSession = "pantheon-wayland";
38+
};
39+
40+
# We ship pantheon.appcenter by default when this is enabled.
41+
services.flatpak.enable = true;
42+
43+
# For basic OCR tests.
44+
environment.systemPackages = [ videosAutostart ];
45+
46+
# We don't ship gnome-text-editor in Pantheon module, we add this line mainly
47+
# to catch eval issues related to this option.
48+
environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ];
49+
};
50+
51+
enableOCR = true;
52+
53+
testScript =
54+
{ nodes, ... }:
55+
let
56+
user = nodes.machine.users.users.alice;
57+
in
58+
''
59+
machine.wait_for_unit("display-manager.service")
60+
61+
with subtest("Wait for wayland server"):
62+
machine.wait_for_file("/run/user/${toString user.uid}/wayland-0")
63+
64+
with subtest("Check that logging in has given the user ownership of devices"):
65+
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
66+
67+
with subtest("Check if Pantheon components actually start"):
68+
# We specifically check gsd-xsettings here since it is manually pulled up by gala.
69+
# https://github.com/elementary/gala/pull/2140
70+
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]:
71+
machine.wait_until_succeeds(f"pgrep -f {i}")
72+
for i in ["io.elementary.files.xdg-desktop-portal.service"]:
73+
machine.wait_for_unit(i, "${user.name}")
74+
75+
with subtest("Check if various environment variables are set"):
76+
cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ"
77+
machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'")
78+
machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'")
79+
# Hopefully from the sessionPath option.
80+
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
81+
# Hopefully from login shell.
82+
machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'")
83+
84+
with subtest("Wait for elementary videos autostart"):
85+
machine.wait_until_succeeds("pgrep -f io.elementary.videos")
86+
machine.wait_for_text("No Videos Open")
87+
machine.screenshot("videos")
88+
89+
with subtest("Trigger multitasking view"):
90+
cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1"
91+
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus"
92+
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
93+
machine.sleep(5)
94+
machine.screenshot("multitasking")
95+
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
96+
97+
with subtest("Check if gala has ever coredumped"):
98+
machine.fail("coredumpctl --json=short | grep gala")
99+
# So we can see the dock.
100+
machine.execute("pkill -f -9 io.elementary.videos")
101+
machine.sleep(10)
102+
machine.screenshot("screen")
103+
'';
104+
}
105+
)

nixos/tests/pantheon.nix

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
5656
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
5757
5858
with subtest("Check if Pantheon components actually start"):
59-
for i in ["gala", "io.elementary.wingpanel", "plank", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]:
59+
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]:
6060
machine.wait_until_succeeds(f"pgrep -f {i}")
61-
for i in ["gala", "io.elementary.wingpanel", "plank"]:
61+
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock"]:
6262
machine.wait_for_window(i)
63-
for i in ["bamfdaemon.service", "io.elementary.files.xdg-desktop-portal.service"]:
63+
for i in ["io.elementary.files.xdg-desktop-portal.service"]:
6464
machine.wait_for_unit(i, "${user.name}")
6565
6666
with subtest("Check if various environment variables are set"):
@@ -70,8 +70,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
7070
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
7171
# Hopefully from login shell.
7272
machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'")
73-
# See elementary-session-settings packaging.
74-
machine.succeed(f"{cmd} | grep 'XDG_CONFIG_DIRS' | grep 'elementary-default-settings'")
7573
7674
with subtest("Open elementary videos"):
7775
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.videos >&2 &'")
@@ -101,6 +99,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
10199
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
102100
machine.sleep(5)
103101
machine.screenshot("multitasking")
102+
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
104103
105104
with subtest("Check if gala has ever coredumped"):
106105
machine.fail("coredumpctl --json=short | grep gala")
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
From aae1e774dd9de22fe3520cf9eb2bfbf7216f5eb0 Mon Sep 17 00:00:00 2001
2+
From: WORLDofPEACE <[email protected]>
3+
Date: Sun, 20 Sep 2020 16:09:36 -0400
4+
Subject: [PATCH] build: add a gnome_session_ctl_path option
5+
6+
In gsd.service.in the ExecStopPost expects g-s-d libexecdir to
7+
be from the same prefix as gnome-session's, and this is not necessarily
8+
true as there are linux distro's that install their packages into their
9+
own individual prefixes (like NixOS or Guix).
10+
---
11+
meson_options.txt | 1 +
12+
plugins/gsd.service.in | 2 +-
13+
plugins/meson.build | 6 ++++++
14+
3 files changed, 8 insertions(+), 1 deletion(-)
15+
16+
diff --git a/meson_options.txt b/meson_options.txt
17+
index 3e04cf64f..21e003c61 100644
18+
--- a/meson_options.txt
19+
+++ b/meson_options.txt
20+
@@ -1,4 +1,5 @@
21+
option('udev_dir', type: 'string', value: '', description: 'Absolute path of the udev base directory')
22+
+option('gnome_session_ctl_path', type: 'string', value: '', description: 'Absolute path to the gnome-session-ctl binary')
23+
option('systemd', type: 'boolean', value: true, description: 'Enable systemd integration')
24+
25+
option('alsa', type: 'boolean', value: true, description: 'build with ALSA support (not optional on Linux platforms)')
26+
diff --git a/plugins/gsd.service.in b/plugins/gsd.service.in
27+
index 79b5f5536..bfbde6d05 100644
28+
--- a/plugins/gsd.service.in
29+
+++ b/plugins/gsd.service.in
30+
@@ -23,4 +23,4 @@ BusName=@plugin_dbus_name@
31+
TimeoutStopSec=5
32+
# We cannot use OnFailure as e.g. dependency failures are normal
33+
# https://github.com/systemd/systemd/issues/12352
34+
-ExecStopPost=@libexecdir@/gnome-session-ctl --exec-stop-check
35+
+ExecStopPost=@gnome_session_ctl@ --exec-stop-check
36+
diff --git a/plugins/meson.build b/plugins/meson.build
37+
index 83e018854..266a0f093 100644
38+
--- a/plugins/meson.build
39+
+++ b/plugins/meson.build
40+
@@ -20,6 +20,11 @@ all_plugins = [
41+
42+
disabled_plugins = []
43+
44+
+gnome_session_ctl = get_option('gnome_session_ctl_path')
45+
+if gnome_session_ctl == ''
46+
+ gnome_session_ctl = join_paths(gsd_libexecdir, 'gnome-session-ctl')
47+
+endif
48+
+
49+
if not enable_smartcard
50+
disabled_plugins += ['smartcard']
51+
endif
52+
@@ -125,6 +130,7 @@ foreach plugin: all_plugins
53+
unit_conf.set('plugin_name', plugin_name)
54+
unit_conf.set('description', plugin_description)
55+
unit_conf.set('libexecdir', gsd_libexecdir)
56+
+ unit_conf.set('gnome_session_ctl', gnome_session_ctl)
57+
unit_conf.set('plugin_dbus_name', plugin_dbus_name)
58+
unit_conf.set('plugin_restart', plugin_restart_rule.get(plugin_name, 'on-failure'))

pkgs/by-name/gn/gnome-settings-daemon43/package.nix renamed to pkgs/by-name/gn/gnome-settings-daemon46/package.nix

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
stdenv,
33
lib,
4-
fetchpatch,
54
substituteAll,
65
fetchurl,
76
meson,
@@ -13,7 +12,6 @@
1312
glib,
1413
libnotify,
1514
libgnomekbd,
16-
lcms2,
1715
libpulseaudio,
1816
alsa-lib,
1917
libcanberra-gtk3,
@@ -36,26 +34,22 @@
3634
wrapGAppsHook3,
3735
python3,
3836
tzdata,
39-
nss,
4037
gcr_4,
4138
gnome-session-ctl,
4239
}:
4340

4441
stdenv.mkDerivation (finalAttrs: {
4542
pname = "gnome-settings-daemon";
46-
version = "43.0";
43+
version = "46.0";
4744

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

5350
patches = [
5451
# https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202
55-
(fetchpatch {
56-
url = "https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/aae1e774dd9de22fe3520cf9eb2bfbf7216f5eb0.patch";
57-
hash = "sha256-O4m0rOW8Zrgu3Q0p0OA8b951VC0FjYbOUk9MLzB9icI=";
58-
})
52+
./add-gnome-session-ctl-option.patch
5953

6054
(substituteAll {
6155
src = ./fix-paths.patch;
@@ -85,14 +79,12 @@ stdenv.mkDerivation (finalAttrs: {
8579
libnotify
8680
libgnomekbd # for org.gnome.libgnomekbd.keyboard schema
8781
gnome-desktop
88-
lcms2
8982
libpulseaudio
9083
alsa-lib
9184
libcanberra-gtk3
9285
upower
9386
colord
9487
libgweather
95-
nss
9688
polkit
9789
geocode-glib_2
9890
geoclue2

0 commit comments

Comments
 (0)