[gnome-session] autostart: don't set DISPLAY in autostarted apps for wayland sessions
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] autostart: don't set DISPLAY in autostarted apps for wayland sessions
- Date: Wed, 17 Dec 2014 20:15:30 +0000 (UTC)
commit c3c3f2b97897784d6268653cb1d46d29688ac3bd
Author: Ray Strode <rstrode redhat com>
Date: Wed Dec 17 15:14:05 2014 -0500
autostart: don't set DISPLAY in autostarted apps for wayland sessions
DISPLAY is an X11-ism, and is unset for wayland. This was leading to
log spew.
https://bugzilla.gnome.org/show_bug.cgi?id=741679
gnome-session/gsm-autostart-app.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c
index 1de4eed..75008fe 100644
--- a/gnome-session/gsm-autostart-app.c
+++ b/gnome-session/gsm-autostart-app.c
@@ -1032,8 +1032,14 @@ autostart_app_start_spawn (GsmAutostartApp *app,
g_free (app->priv->startup_id);
local_error = NULL;
ctx = g_app_launch_context_new ();
- g_app_launch_context_setenv (ctx, "DISPLAY", g_getenv ("DISPLAY"));
- g_app_launch_context_setenv (ctx, "DESKTOP_AUTOSTART_ID", startup_id);
+
+ if (g_getenv ("DISPLAY") != NULL) {
+ g_app_launch_context_setenv (ctx, "DISPLAY", g_getenv ("DISPLAY"));
+ }
+
+ if (startup_id != NULL) {
+ g_app_launch_context_setenv (ctx, "DESKTOP_AUTOSTART_ID", startup_id);
+ }
handler = g_signal_connect (ctx, "launched", G_CALLBACK (app_launched), app);
success = g_desktop_app_info_launch_uris_as_manager (app->priv->app_info,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]