aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2018-05-30 19:56:43 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2018-05-30 19:56:43 +0300
commit17d11d0a1cc876a28638a0221b333bf16c391605 (patch)
treea57b908f87ea586577fdd4dd99ff7e2b517b4e61 /%HOME%
parent.profile: more POSIX sh-compatible (diff)
downloadlinux-home-17d11d0a1cc876a28638a0221b333bf16c391605.tar.gz
linux-home-17d11d0a1cc876a28638a0221b333bf16c391605.zip
add .xsessionrc
Diffstat (limited to '')
-rw-r--r--%HOME%/.xsessionrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/%HOME%/.xsessionrc b/%HOME%/.xsessionrc
new file mode 100644
index 0000000..ebf62d1
--- /dev/null
+++ b/%HOME%/.xsessionrc
@@ -0,0 +1,10 @@
+# .xsessionrc might only be read on Debian and its derivatives like Ubuntu.
+
+# This is a workaround to make notify-send inside cron jobs work.
+# Thanks to this dude: https://unix.stackexchange.com/a/111190/60124
+# Then you source ~/.dbus/Xdbus inside your cron job, and voilĂ !
+touch "$HOME/.dbus/Xdbus" \
+ && chmod 0600 "$HOME/.dbus/Xdbus" \
+ && [ -n "${DBUS_SESSION_BUS_ADDRESS+x}" ] \
+ && command -v printf > /dev/null 2>&1 \
+ && printf -- 'export DBUS_SESSION_BUS_ADDRESS=%q\n' "$DBUS_SESSION_BUS_ADDRESS" > "$HOME/.dbus/Xdbus"