Fix launching headless service on boot

Resolves: RHEL-69319
This commit is contained in:
Jonas Ådahl 2025-07-03 12:12:50 +02:00
parent 33999c83bc
commit 8aa3d3f61f
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From e938a72b8ee65b7db2ad76f63dc3f77713871a82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 3 Jul 2025 12:09:40 +0200
Subject: [PATCH] headless-session: Fix autostarting on boot
Make it wanted by graphical.target, and make sure it launches after gdm.
---
data/gnome-headless-session@.service | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/data/gnome-headless-session@.service b/data/gnome-headless-session@.service
index 269d16288..cba7526f8 100644
--- a/data/gnome-headless-session@.service
+++ b/data/gnome-headless-session@.service
@@ -1,6 +1,10 @@
[Unit]
Description=Headless desktop session
+After=multi-user.target rescue.service rescue.target display-manager.service
[Service]
ExecStart=/usr/libexec/gdm-headless-login-session --user=%i
Restart=on-failure
+
+[Install]
+WantedBy=graphical.target
--
2.49.0

View File

@ -38,6 +38,9 @@ Patch: 0001-meson-Define-missing-HAVE_LIBAUDIT.patch
# https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/298
Patch: 0001-session-Fix-memory-leak-on-new-outside-connection.patch
# RHEL-69319
Patch: 0001-headless-session-Fix-autostarting-on-boot.patch
BuildRequires: dconf
BuildRequires: desktop-file-utils
BuildRequires: gettext-devel