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 »

OK, so here's salix-update-notifier. :D

http://pnboy.pinguix.com/gapan/salix/sa ... 86-1gv.txz

Nothing to do with JRD's code, just took the idea. :ugeek:
This one is DE independent, it should work with xfce, gnome, kde or any other xdg compliant DE. Requires slapt-get, gslapt and zenity. Checks for updates every 2 hours, but can be set to any interval using a config file. See the README file for more details. Right now, it checks for package updates as soon as it is run for testing purposes, but a delay of 10mins will be inserted for the 1st time it does that after boot.

You'll have to restart xfce or start it manually from a terminal.

It's also ready for translation, so get the .pot file from svn and start translating!
http://salix.svn.sourceforge.net/viewvc ... nk/locale/

And damNageHack, don't worry, lot's of people don't like that kind of automation, so we'll make it optional. Also, this is not a popup notification, it's only an icon in the system tray, which is far less obtrusive ;)
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 proposed the script I used. I didn't say that this script is good for everyone. I just shared it.
I you remove the "notify-send" from the script, there is no notifications and only the icon color changed where there are new updates available.
My script only work on XFCE because I didn't want to make something complicated and wanted to have this feature quick and easy. It's not polished or thought for everyone. If such a thing should be included in Salix, I agree with thenktor about independance.

I need now to check what gapan prepared us ^_^
Image
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Script to detect new upgrades graphically on XFCE

Post by Akuna »

Adopted!
It is quite useful to have a way to know that updates are available in such a semi-automated yet unobstructive way.
Well done JRD & Gapan :)
Image
What really matters is where you are going, not where you come from.
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Script to detect new upgrades graphically on XFCE

Post by laprjns »

Salix-updater doesn't seem to be running automatically here. The only time I get an update is when I run it manually. When I do this from a terminal I get the notification icon in the system tray and then I can click on it to get the update, but it also throws this error in the terminal

Code: Select all

root[rich]# salix-update-notifier 
libnotify-Message: Unable to get session bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Did I miss some post install configuration?
Thanks
Rich
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
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 »

When exactly do you get that? As soon as you launch salix-update-notifier or when you click on the icon? Do notifications work for you? Try

Code: Select all

notify-send test
Image
Image
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Script to detect new upgrades graphically on XFCE

Post by laprjns »

Never mind, pilot error. All is working now.
Very nice, I like it!
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Script to detect new upgrades graphically on XFCE

Post by laprjns »

gapan wrote:When exactly do you get that? As soon as you launch salix-update-notifier or when you click on the icon? Do notifications work for you?

Code: Select all

notify-send test
I guess i never answered these questions. I got the error message right after executing the command salix-update-notifier on the command line. But notice that I did this as su from my normal user account. If I do notify-send test as su root, then I get the same error message. If done from a normal user's command line, I don't get the error.

Anyway, like I said it's all working now.

Thanks
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
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 »

laprjns wrote:I guess i never answered these questions. I got the error message right after executing the command salix-update-notifier on the command line. But notice that I did this as su from my normal user account. If I do notify-send test as su root, then I get the same error message. If done from a normal user's command line, I don't get the error.
OK, that's normal. You're not supposed to run salix-update-notifier as root anyway, it always runs as the user you're logged in.
Image
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 »

salix-update-notifier 0.1 just endered our repository. :)
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 »

gapan wrote:salix-update-notifier 0.1 just endered our repository. :)
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.

I use XFCE.
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.
Post Reply