@Heiko:
I just installed the Fedora 19 Alpha in VirtualBox, downloaded pyupdatesd and then modified its configuration section to change the "interval" from 900 seconds down to 10 (to get quicker feedback on whether the script is working or not). It worked for me. After about 10 seconds from running the script, the tray icon and message appeared, and clicking it brought me to the yumex GUI.
This script waits /at least/ until the interval is first reached (i.e. 15 minutes after the script is run, in the default configuration), before it runs `yum check-update` to see if there are updates. When there are, `yum check-update` exits with status 100, and that's how the script knows when to show the icon and notification. If this isn't working, can you try debugging it? Around this part of the code, you can have it print the status and output of check-update:
if int(time()) >= next_check: status, output = commands.getstatusoutput(c['check']) status = status >> 8
+ print "status:", status + print "output:", output
# Updates? if status == 100:
Also the results of running, in bash: `yum check-update; echo $?`
@Frank:
Make sure you're running the script from within X11 (so that $DISPLAY is set). I see that error message if I attempt to run the script from text mode. ;) In my XFCE desktop, adding the script to my session startup list works for me.
$ cat ~/.config/autostart/Update\ Daemon.desktop [Desktop Entry] Encoding=UTF-8 Version=0.9.4 Type=Application Name=Update Daemon Comment= Exec=/home/kirsle/bin/pyupdatesd OnlyShowIn=XFCE; StartupNotify=false Terminal=false Hidden=false
-Noah
On 05/26/2013 05:00 AM, xfce-request@lists.fedoraproject.org wrote:
Message: 1 Date: Sun, 26 May 2013 09:37:52 +0200 From: Heiko Adams heiko.adams@gmail.com To: Fedora Xfce users and developers xfce@lists.fedoraproject.org Subject: Re: pyupdatesd: A Yum Updates Tray Icon for XFCE Message-ID: 51A1BBD0.2020707@gmail.com Content-Type: text/plain; charset=UTF-8 Hi, it looks like your script doesn't work on Fedora 19. I've tested it this morning and absolutely nothing happened. No errormessages but also no notifications about new updates - but updates were available.
Message: 2 Date: Sun, 26 May 2013 09:41:10 +0100 From: Frank Murphy frankly3d@gmail.com To: xfce@lists.fedoraproject.org Subject: Re: pyupdatesd: A Yum Updates Tray Icon for XFCE Message-ID: 51a1caa8.c248b40a.5742.ffffb486@mx.google.com Content-Type: text/plain; charset=US-ASCII
On Fri, 24 May 2013 14:15:50 -0700 Noah Petherbridge root@kirsle.net wrote:
Fedora 18.x86_64
traceback (most recent call last): File "/etc/sysconfig/pyupdatesd", line 55, in <module> import gtk File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module> _init() File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init _gtk.init_check() RuntimeError: could not open display
-- Regards, Frank - I check for new mail app. 20min www.frankly3d.com
Hi, I made some small modifications to your script to make it checking for updates on its startup which works fine here.
Hey,
I've moved my pyupdatesd script to GitHub: https://github.com/kirsle/bin/blob/master/pyupdatesd - so, git pull requests are welcome if anyone has any tweaks they'd like for this script.
I've added a few features to it, in the form of command-line options:
* You can set/override the $DISPLAY for X11 by using the --display option (useful if you launch the script from an environment where $DISPLAY isn't set). * Debug mode with --debug will make the script print things verbosely (including the exit status code and output from `yum check-update`) * Testing mode with --testing will force the script to disregard the output from `yum check-update` and pretend that it returned with code 100 (indicating updates are available), so the script will show the icon and notification pop-up.
I've also made the script schedule its first update check for "now" on startup, so you don't have to wait 15 minutes to get the first notification to appear.
On Tue, 11 Jun 2013 13:27:01 -0700 Noah Petherbridge root@kirsle.net wrote:
Hey,
I've moved my pyupdatesd script to GitHub: https://github.com/kirsle/bin/blob/master/pyupdatesd - so, git pull requests are welcome if anyone has any tweaks they'd like for this script.
...snip...
Cool. ;)
So, I wonder if someone would be interested in packaging this up for Fedora and getting it in. It's too late to add to the f19 spin probibly, but we could add it in 20. ;)
kevin