Dom0 Notifications in Bash Scripts?

I want to show pop up notifications that trigger from a bash script.

Is there a way to tap the dom0 notifications library, and send notifications thru that library, mirroring the dom0 notifications?

(These scripts will be running from dom0 and from inside appVms. I can imagine the former might be possible, not the latter?)

Like notify-send hello "this is me" ?

1 Like

Thanks. Is there a place I can get a searchable list of all these available commands?

How to find them best is really topic-dependent. For simple cases like this where you can find a single keyword, (good?) old apropos is still good.

Otherwise you have to identify the service and follow the links. Here that’s not ideal, as Desktop Notifications Specification does not point to any list of implementors.

Your search engine of choice will be helpful, and in fact can often bring you to the Arch wiki, which is a very high quality source of information of many topics (although when they get too Arch-specific you’ll have to map to Fedora/Debian/etc). Here that is Desktop notifications - ArchWiki.

My silly shortcut is to type “which”, a space, and then hit tab. It’ll ask about whether to show the current list of ~2000 executables on the path and I say yes.

[admin@dom0 ~]$ which 
Display all 2216 possibilities? (y or n)

The traditional way using bash, which will also gather and display bash internal commands is:

compgen -c | sort | uniq

Then, obviously, man commandname for the manual page.


1 Like

I take it if I wanted to attach a user input to a notification, and pass that input to a bash script I would have to install another package in dom0 (4.1)? Or is there a way to do this with 4.1 existing libraries?