[gnome-shell] windowManager: Return failure to start X11 services
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowManager: Return failure to start X11 services
- Date: Tue, 11 May 2021 14:08:53 +0000 (UTC)
commit 019229c40efb67e3d26f14afa71bf926efeff3fb
Author: Olivier Fourdan <ofourdan redhat com>
Date: Thu May 6 15:28:33 2021 +0200
windowManager: Return failure to start X11 services
If for some reason the xserver failed to start, mutter/gnome-shell
should not attempt to connect to the X11 display otherwise it will
lock up in XCB.
An indication of such a premature failure of the xserver is when the X11
services fail to start.
Return the status so that the caller can cancel the connection in time
and avoid the lockup of mutter/gnome-shell in case of failure.
This, however, makes the X11 services a critical component to start
Xwayland, meaning that a failure to start those services for any other
reason than the xserver failing to start would still prevent Xwayland
and therefore X11 clients to run in Wayland. This is however a lesser
issue than mutter/gnome-shell locking up.
This basically reverts commit a96753f0 - "windowManager: X11 can work
without gsd-xsettings".
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1837>
js/ui/windowManager.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 5a3327b1bc..49d3dda229 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -973,6 +973,7 @@ var WindowManager = class {
}
async _startX11Services(task, cancellable) {
+ let status = true;
try {
await Shell.util_start_systemd_unit(
'gnome-session-x11-services-ready.target', 'fail', cancellable);
@@ -983,8 +984,9 @@ var WindowManager = class {
// Note that we do log cancellation from here.
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_SUPPORTED))
log('Error starting X11 services: %s'.format(e.message));
+ status = false;
} finally {
- task.return_boolean(true);
+ task.return_boolean(status);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]