Simple Software Update for XFCE Notification Plugin
1. Install octopkg and xfce4-notifyd
$ pkg install octopkg xfce4-notifyd
2. Create /usr/local/lib/pkg-update.sh (updated)
3600 = 1 hour, update check frequency
300 = 5 minutes, network check frequency
3. Create a /usr/local/libexec/pkg-update symbolic link
$ cd /usr/local/libexec
$ ln -s /usr/local/lib/pkg-update.sh pkg-update
4. Add a /usr/local/etc/sudoers.d/pkg-update file with (users must belong to wheel group)
%wheel ALL=(ALL) NOPASSWD: /usr/sbin/pkg upgrade -n
5. Add a ~/.config/autostart/Software\ Update.desktop file with
And that's it!
We got update notifications.
1. Install octopkg and xfce4-notifyd
$ pkg install octopkg xfce4-notifyd
2. Create /usr/local/lib/pkg-update.sh (updated)
Bash:
#!/usr/local/bin/bash
notified=false
while true; do
ifconfig | grep -q 'broadcast'
if [ $? == 0 ]; then
sudo pkg upgrade -n | grep -q 'Number of packages to be'
if [ $? == 0 ]; then
if [ $notified == false ]; then
notified=true
$(notify-send "Software Update" "There are new available package updates." --icon software-update-available --action octopkg=Update)
fi
else
notified=false
fi
sleep 3600
else
sleep 300
fi
done
3600 = 1 hour, update check frequency
300 = 5 minutes, network check frequency
3. Create a /usr/local/libexec/pkg-update symbolic link
$ cd /usr/local/libexec
$ ln -s /usr/local/lib/pkg-update.sh pkg-update
4. Add a /usr/local/etc/sudoers.d/pkg-update file with (users must belong to wheel group)
%wheel ALL=(ALL) NOPASSWD: /usr/sbin/pkg upgrade -n
5. Add a ~/.config/autostart/Software\ Update.desktop file with
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Software Update
Comment=Check for software updates
Exec=/usr/local/libexec/pkg-update
OnlyShowIn=XFCE;
RunHook=0
StartupNotify=false
Terminal=false
Hidden=false
And that's it!
We got update notifications.
Last edited: