8
            
            votes
        
        
            
        Using notify-send with cron
                    I use i3 on Ubuntu 18.04. My way to solve this is:
* * * * *  XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send Hey "this is dog!"
                
            
       
        
            
                5
            
            votes
        
            
                
                Accepted
            
        
            
        Arch linux: Notifications not working in i3wm - dunst: CRITICAL: Cannot open X11 display
                    Instead of installing dunst as a service, add it to your i3 config:
Edit ~/.config/i3/config and add:
exec --no-startup-id dunst
                
            
       
        
            
                3
            
            votes
        
            
                
                Accepted
            
        
            
            
        How do notifications work on linux?
                    What is a notification server, and what does it serve?
In general terminology, a server is a program that clients connect to in some way (whether over network or over local IPC mechanisms). The ...
                
            
       
        
            
                2
            
            votes
        
            
                
                Accepted
            
        
            
        `notification-daemon` completely absent although libnotify installed
                    The notification daemon is available in its own package, notification-daemon.
                
            
       
        
            
                2
            
            votes
        
            
                
                Accepted
            
        
            
        What are the differences/(dis)advantages of zenity vs notify-send?
                    Functionality comparison
zenity --notification is equivalent to notify-send for the most simple cases.
For example, these two commands are equivalent:
$ zenity --notification --text=Title
$ notify-...
                
            
       
        
            
                1
            
            vote
        
        
        Arch linux: Notifications not working in i3wm - dunst: CRITICAL: Cannot open X11 display
                    Because of the Warning: That basically just means that systemd is trying to start the dunst notification daemon (small program that runs in your user desktop session, listening to libnotify based ...
                
            
       
        
            
                1
            
            vote
        
        
            
        Arch linux: Notifications not working in i3wm - dunst: CRITICAL: Cannot open X11 display
                    from: https://wiki.archlinux.org/index.php/Dunst#Installation
Installation Install the dunst package.
An example configuration file is included at /usr/share/dunst/dunstrc.
Copy this file to ~/....
                
            
       
        
            
                1
            
            vote
        
        
            
        notify-send/notification-daemon: disable tray icon
                    For what it's worth, I had the opposite request.  I wanted the list of notifications to show up.  Turns out the default in lxde (or maybe ubuntu) is notify-osd, which doesn't show this icon or the ...
                
            
       
        
            
                1
            
            vote
        
        
            
        notify-send not working under ssh
                    IMO, may be you could use:
ssh user@host 'export DISPLAY=:0 && notify-send "test message"'
This of course assuming ":0" is the real value of the DISPLAY variable, if it is the only user ...
                
            
       
        
            
                1
            
            vote
        
        
            
        Using notify-send with cron
                    In my case, the issue was with using root user with notify-send. I realized this when I saw that sudo notify-send didn't work on the terminal but just notify-send (i.e. with current user) did.
So ...
                
            
       
        
            
                1
            
            vote
        
        
            
            
        Using notify-send with cron
                    Use printenv for print environment variables from your normal terminal. And then paste all environment variables in starting of crontab file.
                
            
       
        Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
libnotify × 31notifications × 13
notify-send × 7
d-bus × 5
cron × 3
python × 3
bash × 2
debian × 2
scripting × 2
i3 × 2
gnome-shell × 2
lxde × 2
linux × 1
shell-script × 1
shell × 1
ssh × 1
command-line × 1
arch-linux × 1
grep × 1
systemd × 1
xorg × 1
logs × 1
raspberry-pi × 1
environment-variables × 1
email × 1
 
         
         
         
         
        