You are not logged in.

#1 2020-10-31 16:45:07

adventurer
Member
Registered: 2014-05-04
Posts: 128

[Solved] Desktop notifications under Wayland with cron

In order to automatically check for updates I wrote this simple script:

!/bin/bash

checkupdates > /tmp/updates.txt

if [ -s /tmp/updates.txt ]

then

	 zenity --warning --width=500 --height=500 --title="Updates available" --text " $(cat /tmp/updates.txt)"
	 
fi


FILE="/tmp/aurupdates.txt"

yes N | pacaur -Sua > $FILE

STRING="Es gibt nichts zu tun"

if ! grep -q "$STRING" "$FILE" 

then 
   
   zenity --warning --width=500 --height=500 --title="AUR-Updates available" --text " $(cat /tmp/aurupdates.txt)"
         
fi

The corresponding entry in /var/spool/cron/adventurer is:

*/20 * * * *	DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus /home/adventurer/bin/updatecheck

This works flawlessly on KDE with X11 - but unfortunately no longer with Wayland. Those files in /tmp are only written and the zenity popup only appears if the script is manually executed. And I'm seeing this in journalctl:

org.kde.kf5.kwindowsystem.kwayland: This compositor does not support the Plasma Window Management interface

An internet search suggested some other solutions (e.g. here, here or here) but none of them worked.

Do you have any suggestions how to make this work?

Last edited by adventurer (2021-11-21 11:12:03)

Offline

#2 2021-11-21 11:11:15

adventurer
Member
Registered: 2014-05-04
Posts: 128

Re: [Solved] Desktop notifications under Wayland with cron

Sorry! I had forgotten about this post although I had found a solution: simply create a systemd user service and timer. I'm embarrassed that this hadn't come to my mind earlier.

Offline

Board footer

Powered by FluxBB