[gnome-session/no-login-shouldnt-log-in: 1/2] data: Install GNOME on Wayland session for X11 preferred setups




commit 2f84d8ada4d468ef368c662276472f02c50bdd94
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Mon Sep 20 18:04:46 2021 +0200

    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
@@ -2,7 +2,8 @@ desktop_plain = 'gnome'
 
 desktops = [
   desktop_plain,
-  'gnome-xorg'
+  'gnome-xorg',
+  'gnome-wayland',
 ]
 
 shell_component = {
@@ -46,12 +47,17 @@ foreach name: desktops
     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')
     #]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]