diff options
author | Ray Strode <rstrode@redhat.com> | 2015-10-14 10:06:35 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-10-14 10:20:38 -0400 |
commit | 3c26d87bd89128a1bd5859f90adc028fcbee5e8e (patch) | |
tree | 01cdcd497bb4ca42393884e730eb72ada599d1c3 | |
parent | 8c277825f106f051f806f496a944534342410a4e (diff) | |
download | gnome-session-3c26d87bd89128a1bd5859f90adc028fcbee5e8e.tar.gz |
Revert "gsm-util: save environment to $XDG_RUNTIME_DIR/gnome/environment"
This reverts commit db7ce81e9acd5859cb929496e39880d8b4fdc1bf and
commit a50a182ef66c58896ba6d8a5d393fb898ece2bbf.
We're probably going to solve this problem a different way.
-rw-r--r-- | gnome-session/gsm-util.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c index 52774e7a..b7d2cdab 100644 --- a/gnome-session/gsm-util.c +++ b/gnome-session/gsm-util.c @@ -32,8 +32,6 @@ #include "gsm-util.h" -extern char **environ; - static gchar *_saved_session_dir = NULL; char * @@ -449,39 +447,6 @@ gsm_util_generate_startup_id (void) sequence); } -static void -gsm_util_save_environment (void) -{ - g_autoptr(GVariant) environment = NULL; - g_autoptr(GError) error = NULL; - g_autofree char *environment_dir = NULL; - g_autofree char *filename = NULL; - gconstpointer environment_data; - gsize size; - int ret; - gboolean contents_set; - - environment_dir = g_build_filename (g_get_user_runtime_dir (), "gnome", NULL); - ret = g_mkdir_with_parents (environment_dir, 0700); - - if (ret < 0) { - g_warning ("can't create gnome runtime dir: %m"); - return; - } - - environment = g_variant_new_bytestring_array ((const gchar * const *) environ, -1); - size = g_variant_get_size (environment); - environment_data = g_variant_get_data (environment); - - filename = g_build_filename (environment_dir, "environment", NULL); - - contents_set = g_file_set_contents (filename, environment_data, size, &error); - - if (!contents_set) { - g_warning ("can't save environment: %s", error->message); - } -} - static gboolean gsm_util_update_activation_environment (const char *variable, const char *value, @@ -546,6 +511,4 @@ gsm_util_setenv (const char *variable, g_warning ("Could not make bus activated clients aware of %s=%s environment variable: %s", variable, value, bus_error->message); g_error_free (bus_error); } - - gsm_util_save_environment (); } |