Skip to content

Instantly share code, notes, and snippets.

@jpralves
jpralves / BatchNotifyDesktop.md
Created May 18, 2020 22:02
batch notify to desktop from scripts

batch notify to desktop from scripts

To be able to send notifications to the logged in user you must add the file session-local.conf to folder /etc/dbus-1/session.d Then you can use the command in notify-command.sh to display a message. Don't forget to match the UID with the one currently running the session.

This was tested in Fedora 31/32.

@jpralves
jpralves / clean-vm.sh
Last active January 30, 2019 23:23
Clean VM for compacting
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "Please run as root or sudo"
exit 1
fi
set -e
if [ -f /etc/os-release ]; then