The officially official Devuan Forum!

You are not logged in.

#1 2019-09-03 08:25:55

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

[MiyoLinux] Update on the Update Notifier

I've been working on the update notifier in preparation for the next release of Miyo-Modern. The new version will have more functionality than what I used on previous releases this year.

On those, when you clicked the icon in the system tray, a notification would pop up showing what updates were available (thanks fsmithred!). After that, it was up to the user to decide when to manually install the updates via the terminal (or synaptic).

With the new version, when you click the icon in the system tray, a window will open that asks if you want to upgrade your system now. There are three buttons... 

Yes       Show Updates       No

"Show Updates" does what it did before. Opens a notification displaying the available updates...which allows you to decide Yes or No. wink

"No" closes the window until the next notification appears.

"Yes" opens x-terminal-emulator as root and "semi-automatically" installs the updates. I say semi, because the user needs to enter their root password and answer Y when prompted to install the updates. After it's finished, the terminal closes automatically.

It works on ASCII and Beowulf. smile  If anyone has any input or suggestions, I would appreciate it.

It can be seen in this video if interested...

https://www.youtube.com/watch?v=6iI37DgPcpQ


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#2 2019-09-03 14:37:59

nixer
Member
From: North Carolina, USA
Registered: 2016-11-30
Posts: 71  

Re: [MiyoLinux] Update on the Update Notifier

If anyone has any input or suggestions, I would appreciate it.

Available for download?

Offline

#3 2019-09-04 06:08:42

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

nixer wrote:

Available for download?

Hi nixer.

It can be downloaded from here...

MiyoLinux-Update-Notifier-2.0

Thank you.

Last edited by MiyoLinux (2019-09-06 09:31:02)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#4 2019-09-04 21:29:03

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

It works here. I thought I'd have to type some commands when I told it Yes to upgrade, but I only had to enter the password. Nice work.

Offline

#5 2019-09-04 23:05:55

Ron
Member
Registered: 2018-04-22
Posts: 205  

Re: [MiyoLinux] Update on the Update Notifier

Is there supposed to be an icon in the panel? I don't have one. I copied the files/folder according to the instructions and rebooted. I didn't have any updates (checked in Synaptic) so is that why?

Last edited by Ron (2019-09-04 23:06:48)

Offline

#6 2019-09-05 00:43:20

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

Ron wrote:

Is there supposed to be an icon in the panel? I don't have one. I copied the files/folder according to the instructions and rebooted. I didn't have any updates (checked in Synaptic) so is that why?

Hi Ron! Yes sir, that's correct. It won't appear until updates are available.

Thanks for trying it out! smile


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#7 2019-09-06 09:36:45

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

The link above now points to a .deb package (thanks again fsr).

VERY IMPORTANT:  If you have an older version of the Update Notifier installed...whether the older .deb package or manually installed...it will need to be removed before installing the new version's .deb package. After installation, remember to log out (or reboot) for it to begin working.

Here is the new download link again...

MiyoLinux-Update-Notifier-2.0

Last edited by MiyoLinux (2019-09-06 09:37:48)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#8 2019-09-06 21:50:48

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

notify-send isn't working for me in openbox. The updates icon shows up in lxpanel, and when I click on it, the window comes up to ask me what to do. show-updates makes the list (I tested the script alone) but notify-send doesn't display. Is this normal, or am I missing something for openbox?

Offline

#9 2019-09-06 23:01:17

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

fsmithred wrote:

notify-send isn't working for me in openbox. The updates icon shows up in lxpanel, and when I click on it, the window comes up to ask me what to do. show-updates makes the list (I tested the script alone) but notify-send doesn't display. Is this normal, or am I missing something for openbox?

Hmmm...interesting. I feel silly asking you this.

Are you using the native notifications that lxpanel provides? If so, do you receive any other notifications?

I really feel silly asking you this, but is libnotify-bin installed?

I'll install lxpanel and see what happens. Might be a while though. I'm writing this from my phone.

I know that when I made Miyo-Xtra, I installed lxpanel with no-recommends, and the native lxpanel notifications weren't included.


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#10 2019-09-06 23:56:08

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

Okay. I did a fresh install of Miyo-Modern so that I knew I'd have updates.

Installed lxpanel (did not use no-recommends).

Removed xfce4-notifyd

Set lxpanel to start at system startup.

Installed the notifier.

Logged out/in. Ran the show-updates script, and nothing happened. When the icon appeared in the system tray, I clicked on it and chose Show Updates. Nothing. Nada. Zilch.

Apparently, the lxpanel notifications aren't included in Devuan's version...unless it comes with the full lxde desktop environment???

I installed dunst, and it works as normal, but dunst takes some configuring to get it how you want it to look. So, I presume you'll either need to install dunst or xfce4-notifyd. Sorry fsr.

Here's what the dunst notifications look like out of the box...

2019-09-06-195718-1280x1024-scrot_orig.png

Last edited by MiyoLinux (2019-09-07 00:05:57)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#11 2019-09-07 09:59:33

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

I didn't know anything about lxpanel's notifications, so I looked it up. Arch wiki pulled through again. I added notification-daemon, started it, and notify-send immediately works. 

For openbox, the .desktop files in /etc/xdg/autostart don't do anything. I added the following lines to ~/.config/openbox/autostart:

/usr/share/update-notifier/update-notifier.py &
/usr/lib/notification-daemon/notification-daemon &

Offline

#12 2019-09-07 10:49:45

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

fsmithred wrote:

I didn't know anything about lxpanel's notifications, so I looked it up. Arch wiki pulled through again. I added notification-daemon, started it, and notify-send immediately works. 

For openbox, the .desktop files in /etc/xdg/autostart don't do anything. I added the following lines to ~/.config/openbox/autostart:

/usr/share/update-notifier/update-notifier.py &
/usr/lib/notification-daemon/notification-daemon &

Good deal. I didn't know about needing the notification-daemon on lxpanel. Thank you.

On the download site's readme file, I do have a note about window managers may need to add the commands for the update notifier to their autostart file, but I mainly had i3 in mind. wink

I'll add that about lxpanel to the readme file.

I guess your Openbox must be even more base than Miyo-Modern...the .desktop files in /etc/xdg/autostart work on my Miyo (openbox) builds but not on i3. tongue

Thanks fsr!

Last edited by MiyoLinux (2019-09-07 10:54:13)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#13 2019-09-07 11:57:16

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

I'm wondering if we should add a list of these as Recommends or maybe Suggests or put something about it in a readme. The last would be the easiest - it's a long list, and full desktop environments have their own ways of doing it.
https://wiki.archlinux.org/index.php/De … on_servers


Thought of one other question: What happens if there's no root account? Does the user's password work? I don't think I've ever tried 'su' without a root account.

Oh, I just got another idea about the notification. Gonna do a test.

Offline

#14 2019-09-07 12:10:26

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

Test failed. I thought I could use yad to show the list if notify-send failed, but notify-send doesn't actually fail. It works, but without the notification-daemon, the message isn't delivered to the desktop. Oh well, the wm users might have to read a little bit. They should be used to it.

Offline

#15 2019-09-07 12:16:23

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

fsmithred wrote:

I'm wondering if we should add a list of these as Recommends or maybe Suggests or put something about it in a readme. The last would be the easiest - it's a long list, and full desktop environments have their own ways of doing it.
https://wiki.archlinux.org/index.php/De … on_servers


Thought of one other question: What happens if there's no root account? Does the user's password work? I don't think I've ever tried 'su' without a root account.

Oh, I just got another idea about the notification. Gonna do a test.

When I originally coded it, I had the terminal open and ask for the sudo password. Then I thought that there are probably more people who have root accounts than people who only have sudo accounts. So I changed it to using the root password. So as it stands right now, if you just enter the user's password, the terminal just closes and doesn't install the updates. I'm not sure how to code it to use either su or sudo both, but I can try to figure it out.

I know we added xfce4-notifyd to either recommends (or suggests), but that was the only one.


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#16 2019-09-07 12:23:14

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

I guess another option would be to make a small note on the window where you choose Yes, Show Updates, or No that says the user will need to enter their root password.


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#17 2019-09-07 14:21:07

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

Here's an alternate version of upgrade-yes (borrowed from refractainstaller-wrapper.sh) I'll add it to the next version. I think I've tested this with no root account, but if someone else can test that, it would be good. If sudo with no password is enabled, it just runs without asking for the password.

#!/bin/bash
x-terminal-emulator -e "echo 'If user password fails, use root password.' && sudo apt dist-upgrade || su -c apt dist-upgrade"

Offline

#18 2019-09-07 14:52:23

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

One more. Someone noted a high number of available updates in ascii this morning, so I added a count to show-updates.

#!/usr/bin/env bash

list=$(apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }')

count=$(echo "$list" | wc -l)

notify-send "$count updates available:

$list"

exit 0

If you like it, I'll add this, too.

Offline

#19 2019-09-07 16:55:01

norb
Member
Registered: 2017-01-01
Posts: 3  

Re: [MiyoLinux] Update on the Update Notifier

Thank you for making the .deb pkg available, I installed, logged out and back in, a few moments later a notification popped
up in the tray informing of updates, it worked as expected, very easy to use, Thanks again.

Offline

#20 2019-09-07 17:09:37

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

norb wrote:

Thank you for making the .deb pkg available, I installed, logged out and back in, a few moments later a notification popped
up in the tray informing of updates, it worked as expected, very easy to use, Thanks again.

You're welcome.

It's still being worked on...trying to improve it more. wink


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#21 2019-09-07 17:13:10

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

fsmithred wrote:

One more. Someone noted a high number of available updates in ascii this morning, so I added a count to show-updates.

#!/usr/bin/env bash

list=$(apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }')

count=$(echo "$list" | wc -l)

notify-send "$count updates available:

$list"

exit 0

If you like it, I'll add this, too.

I like both changes! So yes...let's include them!

Just used the new changes on beowulf. Had something like 91 updates! yikes

Worked fantastic. I haven't updated my ASCII yet...will try it soon.


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#22 2019-09-07 18:27:15

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

The new upgrade-yes isn't working for me in ASCII for some reason. All I get is an open terminal with the message in the title bar (?) and a solid cursor in the terminal itself...it doesn't accept any input.

I'm busy right now and can't investigate, but I will when I can.


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#23 2019-09-07 21:19:16

Ron
Member
Registered: 2018-04-22
Posts: 205  

Re: [MiyoLinux] Update on the Update Notifier

I had updates today and I didn't get any icon in the panel. I am using the original download. I followed the instructions to a tee but it still didn't work.

Offline

#24 2019-09-08 11:26:49

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,207  

Re: [MiyoLinux] Update on the Update Notifier

Ron, what DE or WM and panel are you using?

Did you verify in a terminal (or in synaptic) on that same system that there are updates? I'm pretty sure the update-sync script, which runs 'apt-get update' is not working.  (You can check to see who's running that script with 'ps aux | grep update')

Offline

#25 2019-09-08 12:03:52

MiyoLinux
Member
Registered: 2016-12-05
Posts: 963  

Re: [MiyoLinux] Update on the Update Notifier

The update-sync script definitely could be the culprit in Ron's case. It seems to only sync the repos at system start-up. It's supposed to do it at start up and periodically throughout the day.

So...if the updates came down sometime after start up, it didn't detect them.

I was trying to keep from running a cron job to sync the repos, but I might return to that if I have to...but we'll see.

Thanks for the report Ron.


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

Board footer