summaryrefslogtreecommitdiff
path: root/content/posts/2019-02-02-xdg-runtime-dir.md
diff options
context:
space:
mode:
authorChristian Segundo2024-07-25 02:12:22 +0200
committerChristian Segundo2024-07-28 12:58:19 +0200
commit15e3dedcee1d0830871ffc692143318a87646101 (patch)
tree3e15f8a3f5082b7df89d208a4c8189b8ad453998 /content/posts/2019-02-02-xdg-runtime-dir.md
parenta248abee10bbcda6282982d72788acf689deb7aa (diff)
downloadcheck-caps-lock-15e3dedcee1d0830871ffc692143318a87646101.tar.gz
wip
Diffstat (limited to 'content/posts/2019-02-02-xdg-runtime-dir.md')
-rw-r--r--content/posts/2019-02-02-xdg-runtime-dir.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/content/posts/2019-02-02-xdg-runtime-dir.md b/content/posts/2019-02-02-xdg-runtime-dir.md
new file mode 100644
index 0000000..1e5fac4
--- /dev/null
+++ b/content/posts/2019-02-02-xdg-runtime-dir.md
@@ -0,0 +1,28 @@
+---
+layout: post
+title: XDG_RUNTIME_DIR on non-systemd systems
+category: GNU/Linux
+tags:
+ - systemd
+ - gentoo
+---
+
+On systemd/ConsoleKit systems this variable is set when the user logs in, if
+neither is used and you need `XDG_RUNTIME_DIR` for some reason (eg Flatpak), it
+can be easily set adding some lines to your `.bash_profile`:
+
+```bash
+if test -z "${XDG_RUNTIME_DIR}"; then
+ export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
+ if ! test -d "${XDG_RUNTIME_DIR}"; then
+ mkdir "${XDG_RUNTIME_DIR}"
+ chmod 0700 "${XDG_RUNTIME_DIR}"
+ fi
+fi
+```
+
+---
+
+**Sources**:
+
+- [Weston](https://wiki.gentoo.org/wiki/Weston)