From 02cf2b0bc713ca2d1671f910f8b204cf80dab0fa Mon Sep 17 00:00:00 2001 From: Adrian Vovk Date: Wed, 27 Aug 2025 16:18:19 -0400 Subject: [PATCH] Re-enable X11 support For GNOME 49, we wanted to do the following: - Disable X11 support by default - Keep X11 code so that distros can re-enable it as needed - Keep support for launching X11 desktop environments Unfortunately this is quite difficult. The x11-support switch, when turned off, disables GDM's entire X11 support, including the ability to launch X11 desktop environments. GDM no longer even looks into /usr/share/xsessions to advertise those sessions as available. I've attempted to surgically remove the parts necessary for launching modern X11 sessions from the overall x11-support switch, while keeping the more horrible parts of X11 support (XDMCP, x11-legacy displays, non-user-session displays, etc) under its control. This is hard, requires some pretty arbitrary X11 code to exist outside of the switch's control, and frankly is just incorrect. So, for now, let's turn x11-support back on for GNOME 49. For GNOME 50, we'll be able to outright delete the majority of X11 support, leaving only the ability to launch X11 sessions. Then the x11-support switch can remain as-is, to be used on distros that don't ship any X11 desktop environments or don't care to preserve GDM's ability to launch X11 desktops. This reverts commits ef8cdaa72f3b296e6a374723d717a80e5a0dda6a and ab085f7d9f3893bdd9dc8418954c7a3b1d09619b Part of https://gitlab.gnome.org/GNOME/gdm/-/issues/989 --- .gitlab-ci.yml | 4 ++-- data/gdm.conf-custom.in | 3 +-- data/gdm.schemas.in | 2 +- meson_options.txt | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd3f285b5..11ef5c36f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,7 +69,7 @@ build-fedora: - .gdm.fedora stage: build script: - - meson setup ${MESON_BUILD_DIR} ${COMMON_BUILD_OPTIONS} -Dx11-support=true + - meson setup ${MESON_BUILD_DIR} ${COMMON_BUILD_OPTIONS} - meson compile -C ${MESON_BUILD_DIR} - meson install -C ${MESON_BUILD_DIR} - meson dist -C ${MESON_BUILD_DIR} @@ -90,7 +90,7 @@ build-fedora-wayland: - .gdm.fedora stage: build script: - - meson setup ${MESON_BUILD_DIR} ${COMMON_BUILD_OPTIONS} + - meson setup ${MESON_BUILD_DIR} ${COMMON_BUILD_OPTIONS} -Dx11-support=false - meson compile -C ${MESON_BUILD_DIR} - meson install -C ${MESON_BUILD_DIR} - meson dist -C ${MESON_BUILD_DIR} diff --git a/data/gdm.conf-custom.in b/data/gdm.conf-custom.in index a40909ceb..9b63ba959 100644 --- a/data/gdm.conf-custom.in +++ b/data/gdm.conf-custom.in @@ -1,9 +1,8 @@ # GDM configuration storage [daemon] -# Uncomment the lines below to force the login screen to use Xorg +# Uncomment the line below to force the login screen to use Xorg #WaylandEnable=false -#XorgEnable=true [security] diff --git a/data/gdm.schemas.in b/data/gdm.schemas.in index ae9f106ab..4451808b8 100644 --- a/data/gdm.schemas.in +++ b/data/gdm.schemas.in @@ -65,7 +65,7 @@ daemon/XorgEnable b - false + true daemon/RemoteLoginEnable diff --git a/meson_options.txt b/meson_options.txt index 3f3865c7a..70f29f19f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -35,7 +35,7 @@ option('udev-dir', type: 'string', value: '', description: 'Directory for udev r option('user', type: 'string', value: 'gdm', description: 'GDM\'s username.') option('user-display-server', type: 'boolean', value: true, description: 'Enable running X server as user.') option('wayland-support', type: 'boolean', value: true, description: 'Enable support for wayland sessions.') -option('x11-support', type: 'boolean', value: false, description: 'Enable support for x11 sessions.') +option('x11-support', type: 'boolean', value: true, description: 'Enable support for x11 sessions.') option('xauth-dir', type: 'string', value: '', description: 'XAuth cookie directory.') option('xdmcp', type: 'feature', value: 'auto', description: 'Add XDMCP (remote login) support.') option('dyn-home-dir', type: 'string', value: '', description: 'Parent directory for dynamic user home directories') \ No newline at end of file -- GitLab