spice-vdagent/0001-Switch-to-spice-vdagent.service-by-default.patch
Charles Arnold 9a1f8fb43f Accepting request 1063970 from home:favogt:systemdfix
- Drop allow-enable-on-boot-spice-vdagentd.service.patch. udev takes
  care of this already.
- Don't call systemctl enable in %post, that's what presets are for.
- Add 0001-Switch-to-spice-vdagent.service-by-default.patch to allow
  use of spice-vdagent.service

OBS-URL: https://build.opensuse.org/request/show/1063970
OBS-URL: https://build.opensuse.org/package/show/Virtualization/spice-vdagent?expand=0&rev=53
2023-02-13 18:18:54 +00:00

43 lines
1.2 KiB
Diff

From aa08162f036840d3e33502dc0a836b03b9cec97c Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 8 Feb 2023 17:21:48 +0100
Subject: [PATCH] Switch to spice-vdagent.service by default
Add an [Install] section to the user unit and tell systemd to ignore the
.desktop file explicitly.
Also add missing ordering dependencies. Without this, the service fails if
it is started before e.g. $DISPLAY is set.
---
data/spice-vdagent.desktop | 1 +
data/spice-vdagent.service | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/data/spice-vdagent.desktop b/data/spice-vdagent.desktop
index 4424061..729a5f6 100644
--- a/data/spice-vdagent.desktop
+++ b/data/spice-vdagent.desktop
@@ -7,3 +7,4 @@ Type=Application
Categories=
X-GNOME-Autostart-Phase=WindowManager
NoDisplay=true
+X-systemd-skip=true
diff --git a/data/spice-vdagent.service b/data/spice-vdagent.service
index a18f4ff..91734ff 100644
--- a/data/spice-vdagent.service
+++ b/data/spice-vdagent.service
@@ -1,5 +1,10 @@
[Unit]
Description=Spice guest session agent
+# Make sure the display is reachable
+After=graphical-session.target
[Service]
ExecStart=/usr/bin/spice-vdagent -x
+
+[Install]
+WantedBy=graphical-session.target
--
2.39.1