summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 5a10ffa30..fd81bc64f 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -151,7 +151,15 @@ _xdg_data_dirs_augment(void)
151 } 151 }
152 152
153 if (!getenv("XDG_RUNTIME_DIR")) 153 if (!getenv("XDG_RUNTIME_DIR"))
154 e_util_env_set("XDG_RUNTIME_DIR", "/tmp"); 154 {
155 char buf[PATH_MAX];
156 const char *dir;
157
158 snprintf(buf, sizeof(buf), "/tmp/xdg_runtime_XXXXXX");
159 dir = mkdtemp(buf);
160 if (!dir) dir = "/tmp";
161 e_util_env_set("XDG_RUNTIME_DIR", dir);
162 }
155} 163}
156 164
157static void 165static void