[gnome-session/wip/laney/systemd-user: 50/54] When there are no required apps (under systemd), let Setenv work
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/wip/laney/systemd-user: 50/54] When there are no required apps (under systemd), let Setenv work
- Date: Tue, 23 Oct 2018 16:49:03 +0000 (UTC)
commit da3d3e62fb52abafc5d37688671d6f65ad539832
Author: Iain Lane <iainl gnome org>
Date: Fri Jun 15 10:21:48 2018 +0100
When there are no required apps (under systemd), let Setenv work
Setenv is a mechanism that some clients - notably mutter - use to set
environment variables for the use of things that are started later. It's
useful because it forwards changes to the systemd activation
environment, which is what units use.
Normally it's only available in early startup, but if starting things is
actually being handled by systemd and not gnome-session, we'll be
RUNNING without the session actually being "up". We were denying
mutter's Setenv calls, which set DISPLAY and WAYLAND_DISPLAY, quite
important environment variables.
Let's try saying that if there are no required apps (the systemd
situation), you can call Setenv while we're already running too.
gnome-session/gsm-manager.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 6eeea4a6..8032552c 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -2576,7 +2576,10 @@ gsm_manager_setenv (GsmExportedManager *skeleton,
const char *value,
GsmManager *manager)
{
- if (manager->priv->phase > GSM_MANAGER_PHASE_INITIALIZATION) {
+ /* When the session is being started outside of gnome-session, by
+ * systemd units, we'll be in RUNNING already */
+ if (manager->priv->phase > GSM_MANAGER_PHASE_INITIALIZATION &&
+ manager->priv->required_apps != NULL) {
g_dbus_method_invocation_return_error (invocation,
GSM_MANAGER_ERROR,
GSM_MANAGER_ERROR_NOT_IN_INITIALIZATION,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]