Skip to content

Instantly share code, notes, and snippets.

@VTimofeenko
Created December 19, 2019 20:45
Show Gist options
  • Save VTimofeenko/916c8e02d7fd0008561e24109a6fff07 to your computer and use it in GitHub Desktop.
Save VTimofeenko/916c8e02d7fd0008561e24109a6fff07 to your computer and use it in GitHub Desktop.
#!/bin/sh
# This script allows calling notify-send as root for it to appear on ${USERNAME}'s desktop
sudo -u ${USERNAME} DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${UID}/bus notify-send $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment