Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # usage: dbus-fix.sh /usr/bin/discord
- if [[ -r '/etc/machine-id' && -v DISPLAY ]]; then
- path="$HOME/.dbus/session-bus/$(cat /etc/machine-id)-${DISPLAY#:}"
- if [[ -r "$path" ]]; then
- eval `grep -vE '^#' "$path" | sed -e 's/./export \0/'`
- else
- echo 'bus file does not exist' && exit 1
- fi
- else
- echo 'no machine-id or DISPLAY' && exit 1
- fi
- $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement