New Unstable Branch for Liferea 1.11: Support for InoReader and Reedah

Yesterday I started a new 1.11 release branch in git. And my first goal is to introduce working support for the two free online aggregators

Both have a Google Reader like JSON API, so code reusage is possible. The challenge at the moment is to have as much shared code as possible while still covering the differences.

And each time your hear someone claim this or that online service is Google Reader API compatible ask: which the Google Reader Atom API or the JSON API.

Actually every combination: pure JSON, mixed Atom/JSON and Atom APIs are out there. And noone is encoding a simple thing like the read state of an item the same way. What usually is the same like back with Google Reader are the names of the API endpoints :-)

Still normalizing all the APIs is a challenge itself, which is why I'm working on it. If at the end Liferea users will have a choice I'll be happy. If you are using either of those two InoReader or Reedah please leave a short note in the comments! Both readers were requested in comments to earlier post and it helps decisions a lot to know what everyone is using!

HowTo: Munin and rrdcached on Ubuntu 12.04

Let's expect you already have Munin installed and working and you want to reduce disk I/O and improve responsiveness by adding rrdcached... Here are the complete steps to integrate rrdcached:

Basic Installation

First install the stock package

apt-get install rrdcached

and integrate it with Munin:

  1. Enable the rrdcached socket line in /etc/munin/munin.conf
  2. Disable munin-html and munin-graph calls in /usr/bin/munin-cron
  3. Create /usr/bin/munin-graph with
    nice /usr/share/munin/munin-html $@ || exit 1
    nice /usr/share/munin/munin-graph --cron $@ || exit 1 

    and make it executable

  4. Add a cron job (e.g. to /etc/cron.d/munin) to start munin-graph:
    10 * * * *      munin if [ -x /usr/bin/munin-graph ]; then /usr/bin/munin-graph; fi

The Critical Stuff

To get Munin to use rrdcached on Ubuntu 12.04 ensure to follow these vital steps:

  1. Add "-s <webserver group>" to $OPT in /etc/init.d/rrdcached (in front of the first -l switch)
  2. Change "-b /var/lib/rrdcached/db/" to "-b /var/lib/munin" (or wherever you keep your RRDs)

So a patched default Debian/Ubuntu with Apache /etc/init.d/rrdcached would have

OPTS="-s www-data -l unix:/var/run/rrdcached.sock"
OPTS="$OPTS -j /var/lib/rrdcached/journal/ -F"
OPTS="$OPTS -b /var/lib/munin/ -B"

If you do not set the socket user with "-s" you will see "Permission denied" in /var/log/munin/munin-cgi-graph.log

[RRD ERROR] Unable to graph /var/lib/munin/
cgi-tmp/munin-cgi-graph/[...].png : Unable to connect to rrdcached: 
Permission denied

If you do not change the rrdcached working directory you will see "rrdc_flush" errors in your /var/log/munin/munin-cgi-graph.log

[RRD ERROR] Unable to graph /var/lib/munin/
cgi-tmp/munin-cgi-graph/[...].png : 
rrdc_flush (/var/lib/munin/[...].rrd) failed with status -1.

Some details on this can be found in the Munin wiki.

Liferea Code Repo Moved to github

I moved the source repo away from SourceForge away to GitHub.
It is currently located here:

If in doubt always follow the "Code" link from the website to find the repo.

Sorry, if this causes troubles for you. I'll contact all with current git write
access directly to see how we can continue on github and who will be able
to merge.

Please keep contributing! I think with github this can actually become
easier and more developers are familiar with its best practices.

GLib GRegex Regular Expression Cheat Sheet

Glib supports PCRE based regular expressions since v2.14 with the GRegex class.


GError *err = NULL;
GMatchInfo *matchInfo;
GRegex *regex;
regex = g_regex_new ("text", 0, 0, &err);
// check for compilation errors here!
g_regex_match (regex, "Some text to match", 0, &matchInfo);

Not how g_regex_new() gets the pattern as first parameter without any regex delimiters. As the regex is created separately it can and should be reused.

Checking if a GRegex did match

Above example just ran the regular expression, but did not test for matching. To simply test for a match add something like this:

if (g_match_info_matches (matchInfo))
    g_print ("Text found!\n");

Extracting Data

If you are interested in data matched you need to use matching groups and need to iterate over the matches in the GMatchInfo structure. Here is an example (without any error checking):

regex = g_regex_new (" mykey=(\w+) ", 0, 0, &err);   
g_regex_match (regex, content, 0, &matchInfo);

while (g_match_info_matches (matchInfo)) {
   gchar *result = g_match_info_fetch (matchInfo, 0);

   g_print ("mykey=%s\n", result);
   g_match_info_next (matchInfo, &err);
   g_free (result);

Easy String Splitting

Another nice feature in Glib is regex based string splitting with g_regex_split() or g_regex_split_simple():

gchar **results = g_regex_split_simple ("\s+", 
       "White space separated list", 0, 0);

Use g_regex_split for a precompiled regex or use the "simple" function to just pass the pattern.

Chef: How To Debug Active Attributes

If you experience problems with attribute inheritance on a chef client and watch the chef-client output without knowing what attributes are effective you can either look at the chef GUI or do the same on console using "shef" or in "chef-shell" in newer chef releases.

So run

chef-shell -z

The "-z" is important to get chef-shell to load the currently active run list for the node that a "chef-client" run would use.

Then enter "attributes" to switch to attribute mode

chef > attributes
chef:attributes >

and query anything you like by specifying the attribute path as you do in recipes:

chef:attributes > default["authorized_keys"]
chef:attributes > node["packages"]

By just querying for "node" you get a full dump of all attributes.

No More Liferea Tray Icon in KDE

With bug report SF #1118 Mike Robinson reported the tray icon not working on KUbuntu. Quote:

I'm using version 1.8.10 on Kubuntu and the "Integrate with the 
messaging menu" doesn't cause the program to appear in the KDE 
system tray. When I click to close the application, I can see that it 
is still running in the background, and when I try to re-open it, it 
immediately pops up the window. I would assume that it is trying to 
integrate itself into a non-existent Gnome system tray instead of 
playing nice with KDE. I feel having this is essential to KDE users.

And he is right, as reported in other locations too (e.g. Redhat ticket #716358) it turns out that using GtkStatusIcon (the long needed EggTrayIcon replacement introduced in GTK+ 2.10) breaks the tray icon in KDE.

As explained in the Redhat ticket Ubuntu and KDE boldly went ahead an implemented a new XEmbed specification, while GNOME/GTK (and GtkStatusIcon used by Liferea) stayed with the old. While KDE tries to be backwards compatible it still fail with sizing issues. This is known for many different applications with tray icons.

For Liferea we intentionally leave all the complexity to the GtkTrayIcon widget implementation by GTK. There is no other portable way to do it right in GTK+ AFAIK.

And yes, effectively this means you cannot use the tray icon with recent KDE versions. For Ubuntu itself Liferea has libindicate support solving the issue there.

Liferea 1.10.3 Released: Support For TinyTinyRSS Categories

This release improves the TinyTinyRSS support: now Liferea supports nested categories when subscribed to TinyTinyRSS! Grab the new release from SourceForge and try it. It should seamlessly display your categories once you start 1.10.3

The detailed changes:

* Asking for credentials again if TinyTinyRSS login fails
* Asking for TinyTinyRSS credentials only 3 times
* Checking wether TinyTinyRSS base URL is lost
* Added warning on TinyTinyRSS login when source is not self-updating
* "--debug-net --debug-verbose" now traces POST data
* Patch #230 Add GNOME AppData XML (Mikel Olasagasti)

* Updated Italian translation (Gianvito Cavasoli)
* Updated Italian localized feed list (Gianvito Cavasoli)

TinyTinyRSS Categories Support Finished

git master now has TinyTinyRSS categories (hierarchic folders) enabled. It will automatically reorganize your subscriptions into the folders.

Please help testing git master with this feature!

Liferea Trick #7: Force Read Full Posts

Give a +1 if you found this post useful!

The Problem

When you have subscribed to an interesting feed that does not provide full posts it can be frustrating. Short of using website scraping as described in the latest post there is nothing you can do to enhance the feed content.

There are legitimate reasons for feed publishers to do so. One might be that the site is earning by display ads, another might be that the publisher wants to engage users directly on their own website.

How To Solve It?

So why not follow that wish and simply read the entire website? Liferea allows you to do so by enabling an option in the subscription properties. Just open the subscription properties dialog by right clicking the subscription as selecting "Properties ..." and select the last tab "Advanced":

Here you can enable the second option "Auto-load item link ...". From now own you will read the website directly and see full content!

Liferea Distro Watch

Distribution adoption is slow as always, bugfixes released take time to end up at the users...

Ubuntu 13.04 1.8.10
Debian Wheezy 1.8.6
Debian Wheezy Backports 1.8.15
Debian Experimental 1.10.1
OpenSuSE 12.3 1.8.14
Gentoo Stable 1.8.8
Fedora 19 1.8.15
Fedora 20 1.10.2
FreeBSD 1.8.15
Arch Linux 1.10.3

1.8.15 is latest stable version of 1.8 line. So using Debian Backports, FreeBSD and Fedora 17-19 you are up-to-date. Only in Debian Experimental and Fedora 20 you get the most recent stable line.

Syndicate content