Linux Software Blog A blog dedicated on bringing Linux tutorials and how-to's to the masses...Sun, 13 Jan 2013 12:59:58 +0000en-UShourly1 domain is up for sale, 13 Jan 2013 12:59:58 +0000Rob time has come to sell this domain.

Over the last 3 years, the website has attracted just over 155,800 page views, from across the globe (thanks Google Analytics).

If you’re interested in acquiring the domain:

Please contact me directly: robstewart57 [then an at sign] gmail [then a dot] com

It’s been fun!


Generate Bibtex file for Authors on DBLP, 15 Aug 2012 10:48:37 +0000Rob wanted a full DBLP database file containing all publication information for a given author (presumably yourself)? DBLP is a computer science bibliography database. Journals tracked on this site include VLDB, the IEEE Transactions, the ACM Transactions, and conference data.

I’ve put together a dblp2bibtex utility, written in Haskell, that enables authors to download all publication data from DBLP, for a given author. It’s open source on GitHub. Usage:

dblp2bibtex [OPTIONS]
A Haskell utility to generate bibtex files for an author identified with a DBLP URI

Common flags:
-g --generatebibtex=Author URI Get bibtex file for given URI
-s --search=Author name Search for URI by name (e.g. "Joe Bloggs")
-l --listpapers=Author URI List papers for an author URI
-o --outfile=Bibtex filename (default 'export.bib')
-x --xref Include cross reference entries
-h --help Display help message
-v --version Print version information

For an example of use, and instructions on how to download and install, see this README on the GitHub page. Any problems, feedaback.. or pull requests ;-) then get in touch!

Generate web reports for GPS track files, 26 Dec 2011 22:24:25 +0000Rob’ve updated my hobby project over the Christmas holidays. It combines my enjoyment for cycling in and around Scotland, with my addiction to Haskell programming. The source code is on Git Hub, here

Screenshot of the software in action

The main changes from the previous release include:

  •  Generating Open Street Map images with the GPS track overlays is now much quicker
  • Added runtime flags to generate tar archives for the generated web content
  • Bug fixes

To install and use the software, you first of all need the haskell-platform, and then cairo, GraphcsMagick and gtk2hs-buildtools. For example, on Fedora Linux:

$# yum install haskell-platform GraphicsMagick cairo gtk2hs-buildtools


$ cabal update
$ cabal install gps2htmlReport
$ gps2HtmlReport --help
 gps2HtmlReport [OPTIONS]
 A Haskell utility to generate HTML page reports of GPS Tracks
 and Track overlays on OpenStreetMap tiles
 Common flags:
 -i --imageonly Generates only an image of the track overlay on an OpenStreetMap layer
 -a --archive Produce tar archive for web and image files
 --hashnames Create reports in hashed directory names
 -h --help Display help message
 -v --version Print version information
 -V --Verbose Loud verbosity
 -q --quiet Quiet verbosity
Calling all Bloggers: Semantic Text Annotation with RDFa, 09 Dec 2011 04:06:52 +0000Rob

Connected web of semantic content

The semantic web is not the “future”, it is the now. Semantic web technologies have matured in recent years, at the rapid rate in which enriched web content has emerged on the linked open data cloud. Take a look, ! Whatever language you choose to adopt, you can be sure that they’ll be a feature rich semantic web library to match. I can vouch for RDF4H [1] for Haskell and Jena [2] for Java.

Why the need for embedded semantics?

Firstly, to understand embedded RDFa, one should appreciate the value in semantics on the web. Why have many organizations (including the BBC [3] and the British Library [4]) invested a lot of time semantizing existing web content and data? Simply put, from the very beginning of the World Wide Web, it has been a connected network of human readable documents, largely made up of documents written in the markup language – HTML. We’ve been able to learn from one another, distribute information to wide audiences, and read weather reports for our respective regions of the world.

The problem

Web 1.0 and Web 2.0 are both broadly defined as a connected network of human readable resources. Given two blog posts on two separate webpages, how do I discover whether they discuss similar or identical concepts? I have to read them and check! Isn’t this all a bit cumbersome?! How do people make discoveries on the web… Search for text in one’s favourite search engine? When I’m enthralled by an entertaining blog post, how do I find other posts that touch on similar issues, or by the same author, or posted within the last month etc…

The Solution? RDF + Ontology Reuse!

The fundamental building block, RDF [5] is one of the simplest data models there is, and there are some important principles built into the Semantic Web that are crucial to its success. This includes a paramount rule that resources on the web should be referenced using a unique resource identifier (URI), wherever possible. This is a mechanism to disambiguate terms on the web, meaning that we can unequivocally state that two separate web pages are referring to the same concept, place, person, or date in time. This is a machine readable representation of web content, and the powers of reasoning over a collection of documents containing disambiguous terms is obvious, albeit simple and probably not powerful enough to warrant attention and convergence to the Semantic Web.

But crucially, the RDF model allows resources to be described using ontological vocabularies. Some popular examples include DBPedia [6] (structured content derived from and FOAF [7] to describe people, and the links between them. These ontologies define concepts hierarchically, and the properties between them. So for instance, I might one day blog about my favourite sport, tennis, using my semantic web-aware blogging engine. Underneath my blog post, I have an unambiguous machine readable annotation of this term, which implicitly holds more information about “tennis” than I have mentioned in the blog post. For example, what does DBPedia tell us about tennis? . As you can see, there is a substantial amount of structured data about this resource: the equipment includes a tennis ball and a tennis racquet; it is not a contact sport; a list of tennis associations etc… The list is very extensive.

So, now we have my blog post about my favourite sport, human readable for my avid followers, and hidden beneath that – a machine readable document holding much more information for the concepts I have written about. This information even includes a broader classification for tennis: racquet sports. You can crawl up or down the resource hierachy in DBPedia in this way.. for instance the next level up is sports, above that is hobbies, leisure, recreation, games, entertainment, and excercise. The potential for machine based semantic web reasoning now appears a lot more exciting.

Wow, I’m convinced! I want my blog content semantized!

Good decision! If you’re using WordPress, I can recommend rdface [8] – “It supports different views for semantic content authoring and uses existing Semantic Web APIs to facilitate the annotation and editing of RDFa contents.”. In essence, it allows you to select one or a number of external APIs including DBPedia Spotlight, Open Calais, and Alchemy to inspect the text of your blog post, to search for associated URIs on the cloud of Linked Open data, and to add them to the underlying HTML of your page, using RDFa [9], which is a mechanism to embed URIs into HTML documents.

I’ve been playing with rdface for the last few days, and it’s a lot of fun! I’ve even run it on this blog post, and so if you inspect the source for this page, you should see ‹span› tags scattered around, containing URIs. Remember – this is the language that’s really only useful for machines to reason on the content, but it’s reassuring to see it there!

I’ll see you in Web 3.0.. just get those blog posts annotated first!

1 –
2 –
3 –
4 –
5 –
6 –
7 –
8 –
9 –

RDF graphs to sparql update requests, 24 Oct 2011 10:59:16 +0000Rob’ve recently encountered a need transform named graphs expressed in RDF, into sparql update requests… with the ultimate goal of autonomously pushing named graphs into rdf stores via a sparql endpoint.

The Jena APIs provide excellent support for describing and transforming RDF graphs, though it doesn’t support named graphs, or sparql requests out of the box. So for this, I needed to combine the expressivity of the NG4J APIs and the Fuseki APIs.

Below, is compilable code that:

  • Uses Jena models and NG4J named graphs
  • Transforms a named graph into a sparql update request
  • Runs the sparql update request against a fuseki sparql endpoint, running locally

API versions used: Jena 2.6.4, ng4j 0.9.3, fuseki 0.2.0

 * Author: Rob Stewart
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.Statement;
import com.hp.hpl.jena.sparql.modify.request.QuadDataAcc;
import com.hp.hpl.jena.sparql.modify.request.UpdateDataInsert;
import com.hp.hpl.jena.update.Update;
import com.hp.hpl.jena.update.UpdateRequest;
import de.fuberlin.wiwiss.ng4j.NamedGraph;
import de.fuberlin.wiwiss.ng4j.NamedGraphSet;
import de.fuberlin.wiwiss.ng4j.Quad;
import de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetImpl;
import java.util.Iterator;
import org.openjena.fuseki.http.UpdateRemote;

public class RdfToSparqlUpdate {

 public RdfToSparqlUpdate() {

   * First, create the Jena model,
   * for user "PeterSmith"
  Model model = ModelFactory.createDefaultModel();
  String foafNS = "";
  model.setNsPrefix("foaf", foafNS);
  Resource user = 
  Property givenNameProp = model.createProperty(foafNS, "givenName");
  Property familyNameProp = model.createProperty(foafNS, "familyName");

   * Next, create the NamedGraph using
   * ng4j classes, into the named graph
   * ""
  NamedGraphSet graphset = new NamedGraphSetImpl();
  NamedGraph graph = 

  // Add the triples about Peter Smith
  // into the named graph
  Statement s;
  s = model.createStatement(user, givenNameProp, "Peter");
  s = model.createStatement(user, familyNameProp, "Smith");

   * Let's prepare the named graph
   * to become a sparql update request
  QuadDataAcc data = new QuadDataAcc();
  Iterator iter = 
      graphset.findQuads(Node.ANY, Node.ANY, Node.ANY, Node.ANY);
  com.hp.hpl.jena.sparql.core.Quad quad = null;
  Quad next = null;
  while (iter.hasNext()) {
    next =;
    quad =
     new com.hp.hpl.jena.sparql.core.Quad(next.getGraphName(), next.getTriple());

  // Create an Update, with the quads extracted
  // from the named graph
  Update updateData = new UpdateDataInsert(data);

  // Create the sparql update request,
  // and add prefixes
  UpdateRequest req = new UpdateRequest();
  req.setPrefix("foaf", foafNS);

  // Finally, execute the sparql update
  // against the sparql endpoint
  new UpdateRemote().execute(req, "http://localhost:3030/dataset/update");

 public static void main(String[] args){
    new RdfToSparqlUpdate();
GPS to HTML Report with Haskell, 10 Aug 2011 15:00:21 +0000Rob I’ve combined my new found hobby – cycling; my favourite gizmo – my Android phone; and my favourite programming language – Haskell, to implement the project: Gps2HtmlReport.

The program takes exported GPS tracks (gpx files), and generates a HTML report providing information such as:

  • Journey distance & time, and when the journey took place
  • Two diagrams charting elevation, accumulated distance and average speed over time
  • An OpenStreetMap diagram illustrating the journey

Here’s an example HTML report, generated by the program:

I have released the source code on GitHub, should you want to use program (please do!).

I would greatly appreciate feedback, and bug reports if you find them. To use the program, all you need is:

  • A GPS tracking device. Most Smart Phone markets will have Apps to do the job. I certainly recommend the open source  OSMTracker App. It appears to play nicely with this Haskell program.
  • The Glasgow Haskell Compiler platform
  • A few additional system packages, `GraphicsMagick’ and `cairo’

For Fedora at least, you simply need to run:

$# yum install GraphicsMagick cairo

Have fun tracking !!

Ubuntu 11.04 Wifi for HP Pavilion [SOLVED], 05 Jul 2011 09:33:29 +0000Rob the HP Pavilion tx2500 model, you can get your wifi working by simply:
$ sudo apt-get install bcmwl-kernel-source

Then reboot !

Fedora 15: Back in the game!, 14 Apr 2011 00:28:07 +0000Rob have previously blogged about the future direction of the Fedora project here

But what is all of this skepticism around Gnome 3? Yesterday, I pushed through into Rawhide, so I could get my hands on the first major release of Gnome in many years. And may I just say:

Congratulations to everyone involved in the Gnome project !!!

Gnome 3 feels very sleek, unobtrusive, extremely solid, and intuitive. There may be (deliberate) functional omisions through its design mandate, but give it time – a few things feel more natural after a few hours of using the environment. Such as the lack of a maximize button… For a start, I’ve been a KDE user for the last 3 years, and I’ve always used the ‘drag-to-edge’  function for doing this. And this behavior just feels `right’.

Well done designers, coders, testers, contributors… The fact Gnome 3 will be the default DE for Fedora 15 really does put the Fedora Project back in the game!

Gnome 3.0 backlash, 08 Mar 2011 14:13:36 +0000Rob

Yikes !!

I read Planet Fedora each day, and the disgruntled voice of early Gnome 3.0 adopters is getting louder by the day. The feelings are epitomized by this graphic (source here):

I dabble between fluxbox and KDE 4.5 on my main PC, depending on my intention to be productive against my desire to have some eye candy. But… can I say that I *love* the state the the KDE Desktop Environment is now in, at 4.5! It is super stable, kwin is now more efficient than ever, and the DE really does feel polished and carefully considered in every corner of its design.

How did the KDE project achieve this? I remember back when KDE 4.0 was released. The backlash from the faithful KDE community was a lot louder than the Gnome 3.0 complaints. This link shows the state of the DE when it was released. Sure, version 4.0 was feature incomplete, but KDE 4.5 wouldn’t be so brilliant if it wasn’t for the fundamental rewrite in the KDE4 libraries. It is people like Aaron Seigo, of the KDE team, who had a vision. and wasn’t deterred during the KDE 4.0 transition, and can now see the fruits of his labour present throughout the KDE DE. Check out his blog.

So, KDE 4.0 was ultimately good for the KDE project. Why can’t Gnome 3.0 be great for the Gnome project? And for those people who are disappointed that their distro of choice is planning to move to Gnome 3.0, there is an answer. It was the approach that was taken by many KDE 3.5.* fans. And that is – stick with your current distro version release. Take Fedora – Fedora 14 came with Gnome 2.32 by default. A lot of Fedora users want new software as soon as it lands, to test, explore, and provide early feedback upstream. Failing that, when Fedora 15 is released with Gnome 3.0, don’t upgrade. It’s quite simple. What about your favourite software packages? Many of them will be packaged for Fedora 14. This page makes is clear that Fedora 14 will actively maintained until 1 month after Fedora 16 is released. By then, Gnome 3.* may have some of the features you’d have missed in 3.0.

Definitive Guide to LinkedData Visualizations, 24 Feb 2011 15:14:31 +0000Rob

Aba-Sah Dadzie and Matthew Rowe have put together a comprehensive review of many of the LinkedOpenData and RDF visualization tools freely available. Find Matt on Twitter: Matt Rowe

Take a look at the abstract, and the download link is on this page:

Approaches to Visualising Linked Data: A Survery