This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.local/bin/get_dbus

19 lines
572 B
Bash
Executable File

#!/usr/bin/env sh
######################################################################
# @author : swytch
# @file : get_dbus
# @license : GPLv3
# @created : Wednesday May 20, 2020 18:04:01 CEST
#
# @description : retrieve and store DBUS_SESSION_BUS_ADDRESS in case
# some utilitary needs it (e.g. cronie)
######################################################################
env | grep DBUS_SESSION_BUS_ADDRESS > "$HOME/.dbus/Xdbus"
echo "export DBUS_SESSION_BUS_ADDRESS" >> "$HOME/.dbus/Xdbus"
chmod 600 $HOME/.dbus/Xdbus
exit 0