From 7fda468f96ad0d69c0af7ea3f196e1b69217d5d7 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sat, 7 Oct 2023 19:36:51 +0300 Subject: [PATCH] session: Remove x11 session targets This is the first step towards deprecating the x11 session, the gnome-xorg.desktop file is removed along with the gnome-session-{x11, @} systemd targets. But the x11 functionality is still there so it can be restored by installing the files in the appropriate place again. X11 has been receiving less and less testing. We have been defaulting to the wayland session since 2016 and it's about time we drop the x11 session completely. Let's remove the desktop file and targets this cycle and maybe carry on with removing rest of the x11 session code next cycle. For removing the x11 code as well, see [1] [1]: https://gitlab.gnome.org/GNOME/gnome-session/-/merge_requests/99 --- data/gnome-session-x11.target | 16 ---------------- data/gnome-session-x11@.target | 22 ---------------------- data/gnome-wayland.desktop.in.in | 8 -------- data/gnome-xorg.desktop.in.in | 8 -------- data/meson.build | 16 ++-------------- meson_post_install.py | 5 ----- 6 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 data/gnome-session-x11.target delete mode 100644 data/gnome-session-x11@.target delete mode 100644 data/gnome-wayland.desktop.in.in delete mode 100644 data/gnome-xorg.desktop.in.in diff --git a/data/gnome-session-x11.target b/data/gnome-session-x11.target deleted file mode 100644 index e13cc9ee..00000000 --- a/data/gnome-session-x11.target +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=GNOME X11 Session -# On X11, try to show the fail screen -OnFailure=gnome-session-failed.target -OnFailureJobMode=replace -# Avoid default After/Before rules -DefaultDependencies=no - -Before=gnome-session.target - -PartOf=graphical-session.target -RefuseManualStart=yes -RefuseManualStop=yes - -# Pull in all X11-specific services the session might depend on -Requires=gnome-session-x11-services.target diff --git a/data/gnome-session-x11@.target b/data/gnome-session-x11@.target deleted file mode 100644 index ce5879b2..00000000 --- a/data/gnome-session-x11@.target +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=GNOME X11 Session (session: %i) -OnFailure=gnome-session-failed.target -OnFailureJobMode=replace -DefaultDependencies=no -# Start happens explicitly -RefuseManualStart=no -# Stop happens by starting gnome-session-shutdown.target -#RefuseManualStop=yes - -Conflicts=shutdown.target gnome-session-shutdown.target -PartOf=graphical-session.target - -# As this is the main entry point, pull in the other toplevel gnome-session targets -BindsTo=gnome-session@.target -After=gnome-session@.target - -BindsTo=gnome-session-x11.target -After=gnome-session-x11.target - -BindsTo=gnome-session.target -After=gnome-session.target diff --git a/data/gnome-wayland.desktop.in.in b/data/gnome-wayland.desktop.in.in deleted file mode 100644 index b48eecd6..00000000 --- a/data/gnome-wayland.desktop.in.in +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -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/gnome-xorg.desktop.in.in b/data/gnome-xorg.desktop.in.in deleted file mode 100644 index 9a76fac8..00000000 --- a/data/gnome-xorg.desktop.in.in +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=GNOME on Xorg -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 006000e9..007c399d 100644 --- a/data/meson.build +++ b/data/meson.build @@ -2,8 +2,6 @@ desktop_plain = 'gnome' desktops = [ desktop_plain, - 'gnome-xorg', - 'gnome-wayland', ] shell_component = { @@ -47,20 +45,10 @@ foreach name: desktops configuration: desktop_conf ) - if name.endswith('-xorg') + if name == 'gnome-custom-session' 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') - #] + install_dir = session_datadir / 'wayland-sessions' endif desktop_target = i18n.merge_file( diff --git a/meson_post_install.py b/meson_post_install.py index 27017f65..78c01f99 100644 --- a/meson_post_install.py +++ b/meson_post_install.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import os -import shutil import subprocess import sys @@ -20,7 +19,3 @@ if not os.environ.get('DESTDIR'): dst_dir = os.path.join(install_root, 'wayland-sessions') if not os.path.exists(dst_dir): os.makedirs(dst_dir) - -src = os.path.join(install_root, 'xsessions', 'gnome.desktop') -dst = os.path.join(dst_dir, 'gnome.desktop') -shutil.copyfile(src, dst) -- GitLab