Skip to content

Instantly share code, notes, and snippets.

@RomainGehrig
Created February 27, 2018 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RomainGehrig/68dc5843bcd891a2138fbd997cdd6b3a to your computer and use it in GitHub Desktop.
Save RomainGehrig/68dc5843bcd891a2138fbd997cdd6b3a to your computer and use it in GitHub Desktop.
Import DBUS variables of the current user
# Source dbus variables to enable dbus-dependant commands, like notify-send
# Integrate this gist in a script where you want to use said commands
# /!\ Security is not guaranteed, be careful when sourcing external files
set -o allexport
source $(readlink -f ~/.dbus/session-bus/*)
set +o allexport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment