The officially official Devuan Forum!

You are not logged in.

#1 2019-02-04 15:44:59

franko
Member
Registered: 2019-02-04
Posts: 33  

Software update notifications in XFCE

Do anyone use any kind of software update notification in Devuan XFCE?  I can't seem to find anything working...

Offline

#2 2019-02-04 19:36:53

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

The Point Linux Update Notifier. Read the whole thread...I show two ways of getting it and how to do a little configuration to it.

https://dev1galaxy.org/viewtopic.php?id=2381

Last edited by MiyoLinux (2019-02-04 19:37:23)


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

#3 2019-02-04 23:46:27

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

This doesn't seem to work for me, since I am using Beowulf, and gksu, which is a dependency, has been deprecated... :-/

Offline

#4 2019-02-05 01:03:31

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Software update notifications in XFCE

franko wrote:

This doesn't seem to work for me, since I am using Beowulf, and gksu, which is a dependency, has been deprecated... :-/

I also beat my head against the disappearance of gksu.  I worked it out in this thread on the Xfce forum.   I'm not often in beowulf (VM) so will have to revisit this myself soon.

Offline

#5 2019-02-05 02:29:17

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

franko wrote:

This doesn't seem to work for me, since I am using Beowulf, and gksu, which is a dependency, has been deprecated... :-/

Oh...didn't know you were on beowulf!

You could see if...

pk-update-icon

...is in the repos (I can't check right now).

It's similar to the Point Linux notifier, but requires a lot more dependencies.


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

#6 2019-02-05 09:46:21

Geoff 42
Member
Registered: 2016-12-15
Posts: 461  

Re: Software update notifications in XFCE

Although I use LXQt much of the time, it does mean that I have found lxqt-sudo. A quick check suggests that you could install it without pulling in too much else. I have been using this in Beowulf as a replacement for gksu.

Geoff

Offline

#7 2019-02-05 17:44:27

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

golinux wrote:
franko wrote:

This doesn't seem to work for me, since I am using Beowulf, and gksu, which is a dependency, has been deprecated... :-/

I also beat my head against the disappearance of gksu.  I worked it out in this thread on the Xfce forum.   I'm not often in beowulf (VM) so will have to revisit this myself soon.

pkexec seems to work fine for me on Beowulf. Only Mousepad, for some reason, gives me an error if I try to open it with pkexec... But I'm good enough with nano when I need to edit a file as root.

Geoff 42 wrote:

Although I use LXQt much of the time, it does mean that I have found lxqt-sudo. A quick check suggests that you could install it without pulling in too much else. I have been using this in Beowulf as a replacement for gksu.

As stated above, I'm fine with pkexec for now... But that's off topic and beside the point. The point here is I can't use the update notifier suggested by MiyoLinux, because the deprecated gksu is a dependency, and I am no coder, so I don't know how to change sources and recompile the whole thing to work with pkexec or anything else.

MiyoLinux wrote:

You could see if...

pk-update-icon

...is in the repos (I can't check right now).

It's similar to the Point Linux notifier, but requires a lot more dependencies.

It is in the repos, alright. I've tried it, but it pulls in with it the same updating software used in Ubuntu, which at first I thought was cool, since I came here from Ubuntu, but then it didn't work on Devuan... XD Sofware and Updates spits up some errors and then it doesn't start, and Software Updater, which is related, start up, and without checking it says there are no updates available, and it shuts down as soon as you click "OK", so you can do nothing to re-check or anything.

So, yeah.... Any other idea? :-D

Offline

#8 2019-02-05 21:19:26

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

I wonder if the pk-update-icon problems could be related to it being broken in "testing" versions...possible, but I don't know.

The only other indicator that I'm aware of is...

package-update-indicator

...but I've never tried it.


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

#9 2019-02-05 21:54:30

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Software update notifications in XFCE

I understand we all have our way of doing things but does it have to be an "update notifier"?  If there is a really important update, it will be mentioned on DNG or here at the forum etc.   Otherwise, why not just remember to update every so often.  I personally use gkrellm's "Reminder" plugin with a musical sting via VLC for recurring tasks.

Offline

#10 2019-02-06 00:02:17

xinomilo
Unknown
Registered: 2017-07-02
Posts: 315  

Re: Software update notifications in XFCE

golinux wrote:

If there is a really important update, it will be mentioned on DNG or here at the forum etc.

unattended-upgrades is a very good package if set with automatic security updates. i think it should be recommended, not just for servers, but also pc.

Offline

#11 2019-02-06 00:37:23

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

MiyoLinux wrote:

I wonder if the pk-update-icon problems could be related to it being broken in "testing" versions...possible, but I don't know.

The only other indicator that I'm aware of is...

package-update-indicator

...but I've never tried it.

They're one and the same. apt search says:

package-update-indicator/testing,unstable 2.0-1 amd64
  Notify about available software updates

pk-update-icon/testing,testing,unstable,unstable 1:2.0-1 all
  transitional dummy package for package-update-indicator
golinux wrote:

I understand we all have our way of doing things but does it have to be an "update notifier"?  If there is a really important update, it will be mentioned on DNG or here at the forum etc.   Otherwise, why not just remember to update every so often.  I personally use gkrellm's "Reminder" plugin with a musical sting via VLC for recurring tasks.

Personally, I have the habit to upgrade my system at least twice a week. But I installed Devuan also on a friend's laptop, because it's old, and all... He's no computer geek, and such a utility comes out quite handy and makes things easier.

Also, I don't want a solution that would just automatically install, I want the user to be aware of available upgrades and let him/her decide if and when to install them, at best convenience.

Offline

#12 2019-02-06 09:13:55

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

franko wrote:
MiyoLinux wrote:

I wonder if the pk-update-icon problems could be related to it being broken in "testing" versions...possible, but I don't know.

The only other indicator that I'm aware of is...

package-update-indicator

...but I've never tried it.

They're one and the same. apt search says:

package-update-indicator/testing,unstable 2.0-1 amd64
  Notify about available software updates

pk-update-icon/testing,testing,unstable,unstable 1:2.0-1 all
  transitional dummy package for package-update-indicator

Personally, I have the habit to upgrade my system at least twice a week. But I installed Devuan also on a friend's laptop, because it's old, and all... He's no computer geek, and such a utility comes out quite handy and makes things easier.

Also, I don't want a solution that would just automatically install, I want the user to be aware of available upgrades and let him/her decide if and when to install them, at best convenience.

Okay...I may have a solution. First, let me apologize. After reading your comments, I did more research. Both of those packages are developed by the same person. The developer has dropped pk-update-icon from further development (except for important fixes), and has started package-update-indicator as its replacement. I'm sorry that you installed things (that I suggested) for nothing. sad

Now for the possible solution. I've wanted to do this for a while, and you gave me the inspiration to see what I could do. I've done some modifications to the PointLinux Update Notifier; in that, instead of it having the ability to actually install updates, it now only notifies the user that updates are available...the user will have to manually install updates through the terminal or synaptic. This negates the need for gksu or pkexec...it's just a notifier that lets you know updates are available. smile

So...are you (or anyone else) willing to test this out for me? The reason I ask, is that I no longer have a pure Beowulf build to test it on...I had to sacrifice that partition for the new i3 version I'm working on. tongue  Also, I only use window managers. I know it works on ascii with Openbox, ascii with i3 (what I'm working on now), and on an upgraded version of ascii to beowulf with Openbox.

If so, I have everything in a .zip file. There's nothing to actually "install"...after unzipping the file, you'd just need to open the file manager as root, and put things where they go. Here are the instructions that are included in the .zip file. Look them over, and if you (or anyone) is willing to try it, the download link will be below the following instructions...

Notifications for updates are presented with a desktop notification and an icon in the system tray.

The notifier will only notify you that updates are available. Clicking on the desktop notification or icon in the system tray WILL NOT perform any updates. You will have to do that manually through the terminal or synaptic.

To close the icon in the system tray, simply click on it one time.

The notifier will check for updates every two hours. That means that two hours after you start your computer, it will run its first check. Then it will check every two hours after that.

If you want to change the time-frame for when it checks for updates, open the update-notifier.py with your text editor as root. I'll use leafpad as the example, but substitute leafpad with your preferred text editor...

sudo leafpad /usr/share/update-notifier/update-notifier.py

When it opens, enable line numbers, and go to line 38. It looks like this...

interval = 7200, # 2 hours

The 7200 is 7200 seconds (which equals 2 hours). If you want to change that to a different time-frame, you'll have to convert the hours into seconds. For example, if you wanted it to check every 5 hours, you would use the following example...

60 x 60 x 5 = 18000

60 seconds x 60 minutes x 5 hours = 18000 seconds

So you would edit line 38 to read as...

interval = 18000, # 5 hours

VERY IMPORTANT: DO NOT PLACE A COMMA INSIDE THE NUMBERS! Such as, 18,000 (with a comma). The number MUST BE 18000 (without a comma). However DO PLACE A COMMA AFTER THE NUMBER as given in the examples above.
___________________________________________________

To install, open your file manager as root, and...

1. Place the update_notifier text file in /etc/cron.d/

2. Place the Update Notifier application in /etc/xdg/autostart/

3. Place the update-notifier folder in /usr/share/

4. Reboot
___________________________________________________

If the notifier isn't working, make sure that you have the following installed...

python-gtk2
libnotify-bin
python-notify

Here's the link where the .zip file can be downloaded...

LINK DOWN FOR NOW...Sorry.

Thanks,
Miyo

Last edited by MiyoLinux (2019-02-07 19:31:18)


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-02-06 17:24:52

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

Thank you. I am a bit busy ATM, so I will try it out later. :-)

Offline

#14 2019-02-06 18:18:55

geki
Member
Registered: 2019-02-04
Posts: 103  

Re: Software update notifications in XFCE

MiyoLinux Thank you! Script autostarts. Let's see, if there will be a notification. Running Beowulf with MATE here.

Offline

#15 2019-02-06 19:28:33

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

Sure thing geki. smile

Also, I've improved it already. smile tongue

I figured out how to close the system tray notification icon without killing the notifier. In other words, clicking the system tray icon will still close it, but the notifier continues to check for updates. That's much better for those on beowulf. smile  ...'cause updates are a'comin'!  big_smile tongue

If you want to make that change, open the update-notifier.py with your text editor as root. I'll use leafpad as the example, but substitute leafpad with your preferred editor.

sudo leafpad /usr/share/update-notifier/update-notifier.py

If you enable line numbers, scroll down to line 76. It presently looks like this...

gobject.timeout_add(1, exit)

Change it to this...

gobject.timeout_add(1, self.destroy)

Save the file, and close it. Then reboot for it to take effect.


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-02-06 22:32:50

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

OK, I've set it up. But there are no upgrades available ATM, so we have to wait to see how it works here... XD

Offline

#17 2019-02-06 22:46:51

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

All right, it seems to work as expected. :-) It notified me of upgrades a minute ago, and I am upgrading just now.

Offline

#18 2019-02-06 23:18:59

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

franko wrote:

All right, it seems to work as expected. :-) It notified me of upgrades a minute ago, and I am upgrading just now.

Hooray! Thanks for testing it franko...and the feedback!

Make sure to make that change in the update-notifier.py so the notifier will continue monitoring after closing the system tray icon. I'm planning to make a new zip file later with that change and edit the instructions with how to change how often it checks for updates. As it is, it checks every 15 minutes.


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

#19 2019-02-06 23:38:24

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

OK, thanks! Indeed, I would make it a bit less frequently... :-)

Offline

#20 2019-02-07 01:50:34

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

franko wrote:

OK, thanks! Indeed, I would make it a bit less frequently... :-)

Okay...open the update-notifier.py as root with your text editor...

If line numbers are enabled, it's line 38, and looks like this...

interval = 900, # 15 minutes

The interval is in seconds.

60 seconds x 15 minutes = 900 seconds

So we have to figure out how many seconds are in the time interval that we want to use. I change mine to check every 4 hours. So to turn that into seconds, I do...

60 seconds x 60 minutes x 4 hours = 14400 seconds

So I would edit that line with my desired amount of seconds...

interval = 14400, # 4 hours

Adjust to your desired time frame.

VERY IMPORTANT!!! DO NOT PUT A COMMA INSIDE THE NUMBER THAT YOU COME UP WITH. In other words (using my example), don't write the number as 14,400 (with a comma). It needs to be 14400 (without a comma). BUT DO LEAVE THE COMMA AFTER THE NUMBER THAT YOU USE.


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-02-07 06:51:08

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

Okay, I've made a new zip file. I've also cut out some of the code in the update-notifier.py to avoid possible confusion by those who may look at it. I rewrote the instructions and also set the notifier to check for updates every 2 hours instead of the default 15 minutes.

I went back and edited the post where I presented it with the new instructions and provided the new download link there too.

If you've already installed it, you don't have to use the newer 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

#22 2019-02-07 10:40:29

franko
Member
Registered: 2019-02-04
Posts: 33  

Re: Software update notifications in XFCE

Thank you again! I have just adapted it more to my liking. :-)

Offline

#23 2019-02-07 13:12:14

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Software update notifications in XFCE

I installed from your first zip. I saw the icon and clicked on it, but it just disappeared. Made the changes you suggested and I'm waiting to see that icon again. Anyway, I have a question and a comment.

How/where is 'apt-get update' happening?

This code won't work with a devuan-live (or with most debian-live derivatives):

# Do not run in a LiveCD session
import os.path
import sys
if os.path.exists('/etc/pointlinux-installer/install.conf'):
    print "Can't run in a LiveCD session!"
    sys.exit()

This would probably work better:

# Do not run in a LiveCD session
import os.path
import sys
if os.path.exists('/lib/live/mount/medium'):
    print "Can't run in a LiveCD session!"
    sys.exit()

Note: It will still work in a live session with persistence, because in that case, the path would be '/lib/live/mount/persistence'. If you used '/lib/live/mount' in the code, that would keep it from working in both cases (with or without persistence.)

Offline

#24 2019-02-07 19:30:36

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Software update notifications in XFCE

fsmithred wrote:

I installed from your first zip. I saw the icon and clicked on it, but it just disappeared. Made the changes you suggested and I'm waiting to see that icon again. Anyway, I have a question and a comment.

How/where is 'apt-get update' happening?

This code won't work with a devuan-live (or with most debian-live derivatives):

# Do not run in a LiveCD session
import os.path
import sys
if os.path.exists('/etc/pointlinux-installer/install.conf'):
    print "Can't run in a LiveCD session!"
    sys.exit()

This would probably work better:

# Do not run in a LiveCD session
import os.path
import sys
if os.path.exists('/lib/live/mount/medium'):
    print "Can't run in a LiveCD session!"
    sys.exit()

Note: It will still work in a live session with persistence, because in that case, the path would be '/lib/live/mount/persistence'. If you used '/lib/live/mount' in the code, that would keep it from working in both cases (with or without persistence.)

fsr,

The icon disappearing is all that was supposed to happen. I wanted it to simply notify that updates are available, and leave it up to me to install them manually. On the original Point Linux Update Notifier, clicking on the icon in the system tray would open Synaptic and install updates (if you clicked to mark them).

Did you make the changes after you clicked on the icon?  Did you logout/login or reboot after you made the changes?

If you clicked on the icon before making the changes, it killed the whole process, so it wouldn't run again until a logout or reboot.

That section of code that you pointed out is actually part of what I removed in the second version. However, I've temporarily taken the download link down while I investigate a couple of things.


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

#25 2019-02-07 22:20:22

geki
Member
Registered: 2019-02-04
Posts: 103  

Re: Software update notifications in XFCE

MiyoLinux Thanks again - edited the script. Works just fine.

Offline

Board footer