Skip to content

Instantly share code, notes, and snippets.

@vansoest
Created March 13, 2016 19:54
Show Gist options
  • Select an option

  • Save vansoest/c437b5c256f49ad660fc to your computer and use it in GitHub Desktop.

Select an option

Save vansoest/c437b5c256f49ad660fc to your computer and use it in GitHub Desktop.

Revisions

  1. vansoest created this gist Mar 13, 2016.
    6 changes: 6 additions & 0 deletions dbus-session-helper
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash
    WINDOWMANAGER=i3
    if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then # Looks like we are outside X
    eval $(tr '\0' '\n' < /proc/$(pgrep $WINDOWMANAGER | head -1 )/environ | sed -e 's/^/export /') #export all environment variables
    fi
    $@