Detect new upgrades graphically (XFCE and others DE)

Other talk about Salix
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Script to detect new upgrades graphically on XFCE

Post by gapan »

damNageHack wrote:It detected here its own available update. 8-)

But when i start the repos version, no icon visible. Tried to start in console, it only hangs without any error.
That's no problem. It does the first check 10 mins after it is run, so it doesn't delay boot.
Image
Image
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: Script to detect new upgrades graphically on XFCE

Post by damNageHack »

Just a hint.

Please take a look into /etc/cron.hourly/slapt-get-update. There, you can see that the local repos cache will be updated every hour.

So, the salix-update-notifier script can not be more current than one hour cause it does only (--)simulate an (--)upgrade process. If it wants to be more current (makes no sense in my opinion anyway) it has to do an (--)update call by itself additionally.

Last but not least, i would not recommend changing the interval for checking available updates. Unclear what sense this feature should have ... :roll:
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Script to detect new upgrades graphically on XFCE

Post by gapan »

damNageHack wrote:Just a hint.

Please take a look into /etc/cron.hourly/slapt-get-update. There, you can see that the local repos cache will be updated every hour.
Yes, just the way it is meant to be.
damNageHack wrote:So, the salix-update-notifier script can not be more current than one hour cause it does only (--)simulate an (--)upgrade process. If it wants to be more current (makes no sense in my opinion anyway) it has to do an (--)update call by itself additionally.
So, you really don't mind if you will be prompted for the root password every now and then, just to update the package database. Unless you're already running your system as root of course (you'll have other issues to worry about then).
damNageHack wrote:Last but not least, i would not recommend changing the interval for checking available updates. Unclear what sense this feature should have ... :roll:
Aren't you the one that thought the notification should read "You have spam" instead? What if someone wants to see spam every hour, or maybe once a day?
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Script to detect new upgrades graphically on XFCE

Post by JRD »

gapan wrote: So, you really don't mind if you will be prompted for the root password every now and then, just to update the package database. Unless you're already running your system as root of course (you'll have other issues to worry about then).
One solution is adding the exact command (slapt-get --update) to sudo file without password for users in the group "users" and exec the command with sudo.
Exactly like shutdown.
Image
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Script to detect new upgrades graphically on XFCE

Post by gapan »

JRD wrote:One solution is adding the exact command (slapt-get --update) to sudo file without password for users in the group "users" and exec the command with sudo.
Exactly like shutdown.
So every user should have the right to update the package database? That really doesn't sound good to me.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Script to detect new upgrades graphically on XFCE

Post by JRD »

Create your own group or specify a user in particular. That was just an example by the way ^_^
Image
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Script to detect new upgrades graphically on XFCE

Post by gapan »

JRD wrote:Create your own group or specify a user in particular. That was just an example by the way ^_^
So, what happens to a slackware user that doesn't have our own "special" version of slapt-get that includes that certain group, or existing salix users for that matter that have no such group and just wants an update notifier (let me remind you that salix groups/users are exactly the same as slackware ones). It's simple as it is, no reason to try to make it more complex and constantly finding workarounds for problems created by complexity.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Script to detect new upgrades graphically on XFCE

Post by JRD »

I just said this for someone who want to tweak his system, not for making a package for Salix. Sorry if it wasn't clear.
Image
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: Script to detect new upgrades graphically on XFCE

Post by damNageHack »

gapan wrote:
damNageHack wrote:Last but not least, i would not recommend changing the interval for checking available updates. Unclear what sense this feature should have ... :roll:
Aren't you the one that thought the notification should read "You have spam" instead? What if someone wants to see spam every hour, or maybe once a day?
Yes, that is exactly the point. My intention was to make clear that the updater can not be more current of state than twice the automated cache update processing interval. That means for the user that wants to change the update interval, it has to consider about two different configuration files in two different folders.

The sudo idea does not sound good for me, either. sudo is somehow a security leak, especially then without password requirement configured. We should not start the "Ubuntu way" ( :shock: ) of doing things, nevertheless Ubuntu asks for user's password, it is cached for a period of time. Setting suid flag for update-process-notifier or using a little daemon script will be the nicer way of doing such a watch job. What if you run on a server, i would not suggest such things, but what if the user likes it?
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Script to detect new upgrades graphically on XFCE

Post by gapan »

damNageHack wrote:Yes, that is exactly the point. My intention was to make clear that the updater can not be more current of state than twice the automated cache update processing interval. That means for the user that wants to change the update interval, it has to consider about two different configuration files in two different folders.
Sorry, but you have not understood how salix-update-notifier works. There are no two different configuration files in two different folders (it's all in the README). slapt-get -u runs every hour using cron. The actual notifier runs every 2h by default, but it can be changed globally or per user using a config file.
Image
Image
Post Reply