This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch main
in repository entrance.

View the commit online.

commit b2d852d362f9c18d9aa8da65d9ace1d980090bd1
Author: Alastair Poole <[email protected]>
AuthorDate: Wed Dec 2 14:22:15 2026 +0000

    greeter: list xorg sessions.
---
 README.md                            | 15 ++++++++++-----
 data/meson.build                     |  6 ++----
 meson.options                        |  2 +-
 src/daemon/Display.cpp               | 12 +++---------
 src/daemon/meson.build               |  4 ++--
 src/greeter/entrance_greeter_data.c  |  6 ++----
 src/helper/entrance_session_launch.c |  7 ++++++-
 src/helper/meson.build               | 16 +++++++---------
 8 files changed, 33 insertions(+), 35 deletions(-)

diff --git a/README.md b/README.md
index 414f8a9..935f3ce 100644
--- a/README.md
+++ b/README.md
@@ -74,11 +74,16 @@ To migrate SDDM settings, review PAM service names and move the configuration to
 
 ### Wayland greeter
 
-Entrance builds with Wayland support by default. Pass `-Dxorg=true` to enable
-Xorg support. When enabled, Entrance defaults to Xorg.
-For a dual-backend build, follow the compositor setup instructions to select
-Wayland. You can choose your desktop session independently at
-sign-in. [Wayland setup and troubleshooting](src/compositor/README.md#wayland-greeter)
+Entrance builds with the Wayland greeter by default. The session picker lists
+installed X11 desktops from the configured `[X11]` `SessionDir` alongside
+available Wayland desktops. An X11 login starts a separate Xorg server and
+requires Xorg to be installed at runtime. Set `[X11]` `ServerPath` if the
+server is installed somewhere other than `/usr/bin/X`.
+
+Pass `-Dxorg=true` to also enable the Xorg greeter. This makes Xorg the
+default greeter. Set `DisplayServer=wayland` under `[General]` to select the
+Wayland greeter in that build.
+[Wayland setup and troubleshooting](src/compositor/README.md#wayland-greeter)
 
 ## Greeter settings
 
diff --git a/data/meson.build b/data/meson.build
index ac710ac..705b613 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,9 +1,7 @@
 if not greeter_only
   install_data('org.freedesktop.DisplayManager.conf', install_dir: datadir / 'dbus-1/system.d')
-  session_scripts = files('scripts/wayland-session')
-  if xorg
-    session_scripts += files('scripts/Xsession', 'scripts/Xsetup', 'scripts/Xstop')
-  endif
+  session_scripts = files('scripts/wayland-session', 'scripts/Xsession',
+    'scripts/Xsetup', 'scripts/Xstop')
   install_data(session_scripts,
     install_dir: entrance_data / 'scripts',
     install_mode: 'rwxr-xr-x'
diff --git a/meson.options b/meson.options
index cac991c..8cfd92c 100644
--- a/meson.options
+++ b/meson.options
@@ -24,4 +24,4 @@ option('compositor_wl_desktop_shell', type: 'boolean', value: true,
   description: 'Build the stable xdg-shell module for the bundled compositor')
 
 option('xorg', type: 'boolean', value: false,
-  description: 'Enable Xorg greeters and X11 desktop sessions')
+  description: 'Enable Xorg greeters')
diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp
index 806adf3..0b78499 100644
--- a/src/daemon/Display.cpp
+++ b/src/daemon/Display.cpp
@@ -101,7 +101,6 @@ namespace Entrance {
         return valid;
     }
 
-#if ENTRANCE_HAVE_XORG
     static QString xorgUserCommand(const Seat *seat)
     {
         const auto &config = mainConfig.X11;
@@ -116,8 +115,6 @@ namespace Entrance {
         return QString::fromUtf8(command.get());
     }
 
-#endif
-
     class SessionDirectories {
     public:
         explicit SessionDirectories(const QStringList &directories) {
@@ -215,7 +212,7 @@ namespace Entrance {
                 autologinSession = savedState.session;
             }
             const SessionDirectories wayland(mainConfig.Wayland.SessionDir.get());
-            const SessionDirectories x11(ENTRANCE_HAVE_XORG ? mainConfig.X11.SessionDir.get() : QStringList{});
+            const SessionDirectories x11(mainConfig.X11.SessionDir.get());
             if (!entrance_session_autologin_load(&m_autologinSession, wayland.data(), x11.data(),
                     QFile::encodeName(autologinSession).constData()))
                 qCritical() << "Unable to find autologin session entry" << autologinSession;
@@ -417,7 +414,7 @@ namespace Entrance {
 
         Entrance_Session session {};
         const bool wayland = type == ENTRANCE_SESSION_WAYLAND;
-        if (wayland || (ENTRANCE_HAVE_XORG && type == ENTRANCE_SESSION_X11)) {
+        if (wayland || type == ENTRANCE_SESSION_X11) {
             const SessionDirectories directories(wayland ? mainConfig.Wayland.SessionDir.get()
                                                           : mainConfig.X11.SessionDir.get());
             entrance_session_load(&session, wayland ? ENTRANCE_SESSION_WAYLAND : ENTRANCE_SESSION_X11,
@@ -521,12 +518,9 @@ namespace Entrance {
                 qWarning() << "Malformed environment entry in" << display->m_sessionName << ":" << QString::fromUtf8(key);
         }, this);
 
-#if ENTRANCE_HAVE_XORG
         if (policy.start_user_x11)
             m_auth->setDisplayServerCommand(xorgUserCommand(seat()));
-        else
-#endif
-        if (!policy.shared_x11)
+        else if (!policy.shared_x11)
             m_auth->setDisplayServerCommand(QStringLiteral());
 
         m_auth->setUser(user);
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
index 98aa818..569931d 100644
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -23,12 +23,12 @@ daemon_sources = files([
   'entrance_seat_events.c',
   'SeatManager.cpp',
   'entrance_display_backend.c',
+  'entrance_xorg_user_command.c',
   '../common/entrance_greeter_wire.c',
 ])
 
 if xorg
-  daemon_sources += files('XorgDisplayServer.cpp', 'entrance_xorg_launch.c',
-    'entrance_xorg_user_command.c') + x11_display_sources
+  daemon_sources += files('XorgDisplayServer.cpp', 'entrance_xorg_launch.c') + x11_display_sources
 endif
 
 daemon_deps = [qt_base, eet, ecore_file, dependency('dbus-1'), iconv]
diff --git a/src/greeter/entrance_greeter_data.c b/src/greeter/entrance_greeter_data.c
index 2313dd5..fbf63cd 100644
--- a/src/greeter/entrance_greeter_data.c
+++ b/src/greeter/entrance_greeter_data.c
@@ -127,8 +127,7 @@ greeter_watch_session_paths(const Greeter_Config *config, Entrance_Session_Watch
    if (watch)
      {
         _watch_paths(watch, config->wayland_dirs);
-        if (ENTRANCE_HAVE_XORG)
-           _watch_paths(watch, config->x11_dirs);
+        _watch_paths(watch, config->x11_dirs);
      }
 }
 
@@ -241,8 +240,7 @@ greeter_sessions_load(const Greeter_Config *config, int *last)
    sessions = NULL;
    if (!ENTRANCE_HAVE_XORG || access("/dev/dri", F_OK) == 0)
       _load_sessions(&sessions, config->wayland_dirs, 2, locale ? locale : "C");
-   if (ENTRANCE_HAVE_XORG)
-      _load_sessions(&sessions, config->x11_dirs, 1, locale ? locale : "C");
+   _load_sessions(&sessions, config->x11_dirs, 1, locale ? locale : "C");
    free(locale);
 
    names = eina_hash_string_superfast_new(NULL);
diff --git a/src/helper/entrance_session_launch.c b/src/helper/entrance_session_launch.c
index 15d8c38..09ce174 100644
--- a/src/helper/entrance_session_launch.c
+++ b/src/helper/entrance_session_launch.c
@@ -65,8 +65,13 @@ entrance_session_launch_prepare(const Entrance_Session_Launch_Input *input,
 
    greeter = !strcmp(input->session_class, "greeter");
    if (!strcmp(input->type, "x11"))
+     {
+        if (!ENTRANCE_HAVE_XORG && (greeter || !*input->display_server))
 
-      return ENTRANCE_HAVE_XORG ? _prepare_x11(input, plan, greeter) : ENOTSUP;
+           return ENOTSUP;
+
+        return _prepare_x11(input, plan, greeter);
+     }
 
    if (strcmp(input->type, "wayland"))
 
diff --git a/src/helper/meson.build b/src/helper/meson.build
index 6ea5de9..5ded97e 100644
--- a/src/helper/meson.build
+++ b/src/helper/meson.build
@@ -35,12 +35,10 @@ executable('entrance-helper-start-wayland', 'entrance_helper_start_wayland.c', c
   install_dir: libexecdir
 )
 
-if xorg
-  executable('entrance-helper-start-x11user', 'entrance_helper_start_x11_user.c', 'entrance_x11_user_config.c',
-    config_file_sources, xauthority_sources, command_sources, run_command_sources, x11_display_sources,
-    dependencies: [ecore_file, ecore],
-    include_directories: common_inc,
-    install: true,
-    install_dir: libexecdir
-  )
-endif
+executable('entrance-helper-start-x11user', 'entrance_helper_start_x11_user.c', 'entrance_x11_user_config.c',
+  config_file_sources, xauthority_sources, command_sources, run_command_sources, x11_display_sources,
+  dependencies: [ecore_file, ecore],
+  include_directories: common_inc,
+  install: true,
+  install_dir: libexecdir
+)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to