# Desktop notifications from borgmatic when it is run from systemd
How to set up desktop notifications to an arbitrary user, while borgmatic is automatically run from a systemd timer. That implies a Linux machine, of course.
This includes workarounds for current (borgmatic 1.5.13, borg 1.1.16) limitations of borg/borgmatic. They may or may not be necessary in the future. This HowTo was written on 2021-05-17, some downloaded files may have changed since then.
The following needs to be set up for the notifications:
### In the systemd timer
The template from the borgmatic site (the`borgmatic.timer`) is fine, insert a string for `Description=…`, and set the `[Timer]` section if not already done. No special changes here.
### In the systemd service
@ -23,7 +22,7 @@ The line `CapabilityBoundingSet=…` must give the additional capabilities `AP_S
*_This means a softening of security settings._ Make sure all permissions on borgmatic and scripts are set correctly!*
### In the borgmatic config
@ -42,7 +41,7 @@ hooks:
(Note: The config file is in YAML, you cannot use the shell line continuation (" \\"). And use spaces, not tabs.)
#### Notifications from a script
Borgmatic calls an executable script that can do more magic and send the notifications in the same way as explained above.
@ -70,7 +69,7 @@ sudo -u NAME DISPLAY=:0 \
(Note: Line continuation and the use of variables make complexer notifications substantially easier to set up than in `config.yaml`.)