I would be interested in seeing what you come up with. The Ubuntu notifications are handled in a separate file, /usr/local/bin/librarian-notify-send. The reason I elected to run it like this is because I could not get around having to use the sudo -u command in order to become the desktop user and send a notification to the desktop user's notification bubble.
If there is a better way of performing a notification from the non-GNOME Desktop user rather then using a
sudo -u $username librarian-notify-send "title" "message" "info"
I'm all ears mang.
You can find the librarian-notify-send script here: https://sourceforge.net/projects/mythica...d/download
I would love to make it a single script with no secondary scripts.
BASH2 will not allow sudo commands for functions and a sudo su command drops the script out. sudo FunctionName returns command not found. The major limitation is BASH itself. I'm sure these limitations are for security purposes. It may be possible to create a function to generate a new script from within the program, then make it executable, then run it, however that would not be very clean and I feel that I'm already pushing the limits of clean programming with using the sudo command to start with and have made it clear in the wiki that it is a security risk.