Page 2 of 5

Re: Script to detect new upgrades graphically on XFCE

Posted: 16. Nov 2009, 22:45
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 ;)

Re: Script to detect new upgrades graphically on XFCE

Posted: 17. Nov 2009, 00:01
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 ^_^

Re: Script to detect new upgrades graphically on XFCE

Posted: 17. Nov 2009, 08:20
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 :)

Re: Script to detect new upgrades graphically on XFCE

Posted: 20. Nov 2009, 11:37
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

Re: Script to detect new upgrades graphically on XFCE

Posted: 20. Nov 2009, 16:47
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

Re: Script to detect new upgrades graphically on XFCE

Posted: 21. Nov 2009, 13:30
by laprjns
Never mind, pilot error. All is working now.
Very nice, I like it!

Re: Script to detect new upgrades graphically on XFCE

Posted: 22. Nov 2009, 15:42
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

Re: Script to detect new upgrades graphically on XFCE

Posted: 22. Nov 2009, 16:10
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.

Re: Script to detect new upgrades graphically on XFCE

Posted: 22. Nov 2009, 19:30
by gapan
salix-update-notifier 0.1 just endered our repository. :)

Re: Script to detect new upgrades graphically on XFCE

Posted: 22. Nov 2009, 19:51
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.