Install gnome-wayland session

This commit is contained in:
Ray Strode 2021-10-12 14:06:21 -04:00
parent 3b3c4bb20e
commit d49d9e0e07
2 changed files with 147 additions and 1 deletions

View File

@ -0,0 +1,140 @@
From 2f84d8ada4d468ef368c662276472f02c50bdd94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 20 Sep 2021 18:04:46 +0200
Subject: [PATCH] data: Install GNOME on Wayland session for X11 preferred
setups
gdm supports now setups where X11 is the preferred session, but wayland
can be used on demand.
However we're currently not proposing GNOME on Wayland session because
the preferred X11 GNOME session will be picked instead.
To avoid this, install (again) the gnome-wayland session, so that it
will be selectable when gdm is running under X11, but it also supports
wayland. Given its name, it will be filtered out in the case gdm is
running instead under wayland.
---
data/gnome-wayland.desktop.in.in | 3 ++-
data/meson.build | 20 +++++++++++++-------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/data/gnome-wayland.desktop.in.in b/data/gnome-wayland.desktop.in.in
index 516c211e..b48eecd6 100644
--- a/data/gnome-wayland.desktop.in.in
+++ b/data/gnome-wayland.desktop.in.in
@@ -1,7 +1,8 @@
[Desktop Entry]
-Name=GNOME
+Name=GNOME on Wayland
Comment=This session logs you into GNOME
Exec=@bindir@/gnome-session
TryExec=@bindir@/gnome-session
Type=Application
DesktopNames=GNOME
+X-GDM-SessionRegisters=true
diff --git a/data/meson.build b/data/meson.build
index e02b80d3..d3134ade 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,84 +1,90 @@
desktop_plain = 'gnome'
desktops = [
desktop_plain,
- 'gnome-xorg'
+ 'gnome-xorg',
+ 'gnome-wayland',
]
shell_component = {
desktop_plain: 'org.gnome.Shell',
}
required_components = {
desktop_plain: [
'org.gnome.SettingsDaemon.A11ySettings',
'org.gnome.SettingsDaemon.Color',
'org.gnome.SettingsDaemon.Datetime',
'org.gnome.SettingsDaemon.Housekeeping',
'org.gnome.SettingsDaemon.Keyboard',
'org.gnome.SettingsDaemon.MediaKeys',
'org.gnome.SettingsDaemon.Power',
'org.gnome.SettingsDaemon.PrintNotifications',
'org.gnome.SettingsDaemon.Rfkill',
'org.gnome.SettingsDaemon.ScreensaverProxy',
'org.gnome.SettingsDaemon.Sharing',
'org.gnome.SettingsDaemon.Smartcard',
'org.gnome.SettingsDaemon.Sound',
'org.gnome.SettingsDaemon.UsbProtection',
'org.gnome.SettingsDaemon.Wacom',
'org.gnome.SettingsDaemon.XSettings',
],
}
if enable_session_selector
desktops += 'gnome-custom-session'
endif
foreach name: desktops
desktop_conf = configuration_data()
desktop_conf.set('bindir', session_bindir)
desktop = name + '.desktop'
desktop_in = configure_file(
input: desktop + '.in.in',
output: desktop + '.in',
configuration: desktop_conf
)
- install_dir = join_paths(session_datadir, 'xsessions')
- # FIXME: The same target can not be copied into two directories.
- # There is a workaround in meson_post_install.py until proper solution arises:
- # https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
- if name == desktop_plain
- #install_dir: [
+ if name.endswith('-xorg')
+ install_dir = session_datadir / 'xsessions'
+ elif name.endswith('-wayland')
+ install_dir = session_datadir / 'wayland-sessions'
+ else
+ # FIXME: The same target can not be copied into two directories.
+ # There is a workaround in meson_post_install.py until proper
+ # solution arises:
+ # https://github.com/mesonbuild/meson/issues/2416
+ install_dir = session_datadir / 'xsessions'
+ #install_dir = [
# join_paths(session_datadir, 'xsessions'),
# join_paths(session_datadir, 'wayland-sessions')
#]
endif
desktop_target = i18n.merge_file(
desktop,
type: 'desktop',
input: desktop_in,
output: desktop,
po_dir: po_dir,
install: true,
install_dir: install_dir
)
endforeach
sessions = [
'gnome',
'gnome-dummy'
]
foreach session: sessions
session_file = session + '.session'
desktop_conf = configuration_data()
desktop_conf.set('libexecdir', session_libexecdir)
desktop_conf.set('required_components', ';'.join(
[shell_component.get(session, '')] + required_components.get(session, [])))
desktop = session_file + '.desktop'
--
2.31.1

View File

@ -9,7 +9,7 @@
Name: gnome-session
Version: 40.1.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: GNOME session manager
License: GPLv2+
@ -63,6 +63,9 @@ Requires: gsettings-desktop-schemas >= 0.1.7
Requires: dbus
Patch0: 0001-data-Install-GNOME-on-Wayland-session-for-X11-prefer.patch
%description
gnome-session manages a GNOME desktop or GDM login session. It starts up
the other core GNOME components and handles logout and saving the session.
@ -129,6 +132,9 @@ Desktop file to add GNOME on wayland to display manager session menu.
%{_userunitdir}/gnome-launched-.scope.d/
%changelog
* Tue Oct 12 2021 Ray Strode <rstrode@redhat.com> - 40.1.1-3
- Install gnome-wayland session
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 40.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild