Run Gui Programs Under Cron, Monitor Root Filesystem Disk Usage And Send Alarm
The article provides instructions on running GUI programs with cron in Linux and monitoring root filesystem disk usage using notify-send and setting environment variables. It also includes a script for disk usage monitoring that sends alerts when the root filesystem has less than 10% free space.
the ultimate solution:
copy all current user environment variables to crontab.
to run notify-send you have to set DBUS_SESSION_BUS_ADDRESS
to run other gui programs you set DISPLAY and XAUTHORITY
wall works for tmux and ssh sessions but not gnome-terminal.
in kde everything works fine. install konsole instead.
script for monitoring disk usage:
| 1 | 
 |