I had been cultivating a fascination with Jekyll for blogging for a short while. It looked oh so clean, and minimalist, and sleek. It has its fans, for sure, and I am one of them.

If I were starting my blog from this day, I would almost certainly consider using Jekyll for it, rather than WordPress.

WordPress: better the devil?

But, I am not. Back in 2007 (can it really be so long ago?!), when I started blogging, I didn’t give much thought to my requirements eight years down the line. And the funny thing is, they have hardly changed.

Org2Blog is everything I need from blogging. It’s quick, because I can compose my text in Emacs, and also supply my category and tag information directly too.

When saving the post in Emacs, I can save a local copy using the same date-title-based file name schema that Jekyll would expect (e.g.: 2015-10-28-Assessing_Jekyll_as_an_alternative_blogging_platform.org).

Further benefits to Emacs/WordPress duality

Emacs Rocks.
Emacs Rocks.

As indicated by the previous filename example, blogs can be saved locally on my hard disk in Org-mode format, allowing me the option later on to convert everything for a Jekyll-based future. In other words, making the decision to hard-switch from one system or another need not be rushed and can, in fact, be assessed based on technical need.

Another “turn-off” from Jekyll is that, despite various attempts to make it easy to migrate WordPress posts, I found the process awkward and the documentation confusing. There is more than one way to skin this cat.
For me, Emacs provides such a comfortable environment using Org2Blog that it’s really hard to justify the alternative approaches of org-jekyll or Org+Jekyll.

Disadvantages to using WordPress

Well, it’s not elitest ūüėČ

But aside from that, there are a few serious disadvantages. And these are ones you already know about: there’s lots of (potentially-vulnerable) PHP running, which is a security risk and also makes WordPress ‚Ķ slow.

Also, WordPress makes microblogging, or “notes” in IndieWeb parlance, not very easy. I want to publish my own microblog on my site and publish it elsewhere, but this will take futher investigation.

WordPress, also, has a reputation. It’s a bit like Walmart (or Asda in the UK). It’s a great, hulking CMS that everyone knows. It’s everywhere. Everyone uses it. Which means there’s less that’s “special” about it. And that’s a shame, because for all of that it’s really quite brilliant.

What WordPress gives me

Yoast SEO screenshot
Managing SEO settings per-post in WordPress

Like others, I’m a firm believer in the IndieWeb movement, but I don’t have enough time to write software for personal use right now. Luckily, many talented and dedicated individuals have stepped up and kindly donated their time and code to enable the IndieWeb on WordPress sites. This suits me down to the ground. At least I can support the movement by advocating and using their code.

WordPress also gives me flexibility. If I wish to write a short post about some coffee I’ve tried, I can. Picture too. If I wish to incorporate a video or music in a page fo rsome reason, the built-in editor makes that effortless. As it does, embedding a tweet too. WordPress is doing favours for the web at large, by keeping our writing options open and encouraging open sharing, rather than feeding us silo-centric drivel-data that we see so often from certain social networks!

One last thing WordPress gives is the ability for people who are not computer-confident to use a device like a Chromebook, or even their phone, and still provide a compelling and easy-to-use platform for sharing content.

There is a growing movement.

The movement is towards a free web, unimpeded by the silos that threaten to own us, and liberated from social-networking norms that diminish our individuality.

And yet, there isn’t actually one movement; there’s two. ¬†In fact, there are many more than two, but I’ll focus on just these for now.

 

Friendica

Friendica is a social networking platform which is decentralised, distributed and fully privacy-respecting. ¬†It is, of course, open source too. ¬†Friendica’s purpose is to be an ‘alternative to those “creepy” social networks that don’t really care about your privacy’. ¬†It is primarily a web site with components that interact with other social networks (Facebook, Twitter, etc) as well as other instances of Friendica.

Friendica requires self-hosting.

 

Indieweb

Conversely, the “Indieweb” is more of a concept than a specific implementation. ¬†Its guiding principle is that “When you post something on the web, it should belong to you, not a corporation.” ¬†Although similar ideologically to Friendica, the implementation is less defined. ¬†Some people have implemented it via WordPress plugins, others through Jekyll and other static blogging systems.

Indieweb’s principles can even be implemented in “closed” systems, provided the data can always be accessed by its owner.

 


A 200 word post.

Free software such as Linux is great at many things, including keeping your data very safe.  That is, if you are in relative control of it yourself.

Nautilus window open in GNOME.
Transferring sensitive files from one machine to another – offline, via USB stick.

Linux is also used by the likes of Google, Facebook, et al., not to mention most western governments.¬† In fact, its flexibility, suitability and cost-effectiveness means it’s pretty much there, in most pieces of consumer electronic equipment, plus any networking kit employed in telephone exchanges and data centres, through to the end points – the receiving servers which constitute “the cloud”.

Its use and application is rich and strange: sometimes in your interests, and often, arguably, not so.¬† But whether you’re a Linux/UNIX, Windows or Mac user, taking care of your own data is vital for a life of value!

Making your digital life private, again

Is it possible to retract data that you previously opted to store online, and be confident that cloud service providers no longer keep it stashed somewhere?  There are two responses to this:

  • “yes”
  • “no”

Let’s assume for a moment that “yes” is, by far, the prevailing truth.¬† “Yes”, data which I previously uploaded was properly deleted when I deleted it, and an online service provider no longer has any copy, nor any meta data about my data (ok, I’m laughing now).

“there are many ways in which you can protect your data, and protect your privacy”

Many of us have done it: uploaded photos to Google Photos, posted images or event information to Facebook, shared our location on Twitter, set up an account on … well, the list goes on.¬†¬† But forgetting the “privacy” policy of such entities, just for a second (well, ok then – it’s not that easy to put aside “We store data for as long as it is necessary to provide products and services to you and others”, but even so!!), there are many ways in which you can protect your data, and protect your privacy.¬† It starts with a little effort and time.

First things, first: get a backup routine!

Rome wasn’t built in a day, and neither is your data security.¬† For example, consider the following:

  • Is any of your personal data stored on company equipment?
  • Do you absolutely know, hand on heart, that your data is backed up?
    • Did you go ahead and do that yourself?
    • Did someone sign a certificate and say, in no uncertain terms, that they did that on your behalf?
    • When?
  • When did you last audit your data?

A friend of mine recently lost years of pristine digital photos due to a failure of company equipment (“the company laptop”) and because he hadn’t backed them up to a secondary device – even though he had one of sufficient capacity in his possession!

Don’t let this be you!¬† Get a routine in place for backing up. Even if it’s only monthly, usually cameras and phones have enough capacity to store a month’s worth of shots.

Designate somewhere safe for your backup!

A safe location can be anywhere.¬† You don’t have to get a fireproof safe – although I’m not saying don’t!¬† But if you backup your personal data at home, try not to keep your backup at home.¬† A USB drive costs so little these days, that it’s the perfect medium for backing up photos and then taking it to work and locking in your desk drawer.

Encrypting your data is always a good idea for a removable storage device, provided you can easily remember a strong password.  Although the ease of managing encrypted removable storage varies between operating systems (note, it is very easy to encrypt data on GNU/Linux).

Test restoring from your backup and backup again!

A backup is no good if you can’t restore files from it.¬† Luckily, with a simple backup process you can easily monitor and validate that your backups have occurred successfully.¬† If you are confident that your system backups work ok, do another one.¬† Then store.¬† Wash, rinse, repeat.

How does this keep my data private?

By setting a rule for yourself to back-up your own data, you won’t become so dependent on cloud services for backing up your photos.

Common objections to keeping data off the cloud include the oft-argued (but ill-conceived) notion that it’s free of cost.¬† Let’s just examine this for a brief moment:

  • Data centres cost hundreds of thousands, to millions of ¬£/$/‚ā¨ to build
  • Running costs are tens to hundreds of thousands of ¬£/$/‚ā¨ each month
  • They must be staffed, too – requiring monthly salaries
  • If everyone is uploading for free, how can it pay for itself?
  • There must be an end-purpose: the end does not justify the means!

The value of your “free” data storage is in the metadata that is stored with it.¬† Tied to your user account (that same user account you might use to log in to other services, signifying your activity at other times even when not using the primary service…) is data – in the form of metadata – that describes it quite clearly.

What photo metadata tells my cloud provider about me

That photo which was kindly synced to your cloud provider’s account will contain data, like:

  • Where you were (where you live, work, visit, or where friends, family live, work, etc)
  • What local time it was (when you may not be working, placing you into a social demographic)
  • What equipment you were using (which brand you like to buy)
  • What network you were using (who you are a customer of)
  • What the weather was like at the time of the photo
  • Who you were with from the faces of people you were with & photographed … thus registering where they were at that time too (thanks to facial recognition technology and perhaps against their will)
  • Due to prominent colouring in the photo, whether you were inside or outside
  • … and much more.

When free is not free

If I am a massive indexing engine and I start aggregating and analysing these data, I will be able to determine some interesting trends:

  • How many people use my service in an area/region/country
  • How many people who use the service were in a particular area/region/country at a specific time
  • How many of those use Camera brand “B” or Phone brand “A”
  • How many faces I recognise (people who have opted in to facial recognition)
    • Who is in whose “networks” and extended networks (friends of friends)
  • How many faces I don’t recognise (potential targets for acquisition – new users)
  • How many people like being outdoors on a bright, dry day
  • And how many don’t
  • Whether you like being outdoors … or not
  • Who you like being with during those conditions
  • What you might be doing at that time, on that type of day, in those conditions, with those people, while using your “brand X” device.

we are now at a stage where it is easier to get a phone, and rely on Facebook for photo storage

Some people I know seem apathetic towards online security, and yet suspicious towards cloud service provider’s intentions too.¬† Perhaps we are now at a stage where it is easier to get a phone, and rely on Facebook for photo storage, than to “bother” seeking alternatives.¬† “The answer is not readily to hand, so let’s move on.”

Living a life less ordinary

The problem with systems is that they need parameters.¬† Do a search on something, somewhere, and you’ll be sure to see ads and sponsored links of that thing, somewhere else.¬† This is, and has been for a while, the new internet “norm”.

Breaking out of this “think, search (hunger); feed (consume with contextual data)” lifestyle has been described as the “search bubble”.¬† A self-fulfilling data management and presentation matrix based on your lifestyle habits.

By adopting a simple routine such as taking care of your own data and not subscribing religiously to online services, it’s possible to find not only more sanctity in life’s unique moments, but also more richness from the due consideration of others.¬† Where people know you a little less, and are curious to know you a little more.

Gtypist menu options
Gtypist menu options
GNOME Terminal showing gtypist menu

Looking for a free software program to help me learn to touch-type, and shortly after my search started I found GNU Typist.  And GNU Typist (gtypist) is a gem.

The instructions are simple and the purpose of the program is equally simple: to “condition” the user into adopting and maintaining good typing habits.¬† After starting the basic lessons (“Quick QWERTY course”), it soon became clear that my touch-typing capability was far poorer than I had hoped and my typing speed these days is generally just luck-driven.

Thankfully, a considerate fellow called Simon Baldwin decided to write gtypist, and here we are.  The online documentation is equally useful; not only do you get help regarding how to acquire, install and invoke gtypist on your machine, but also a list of alternative free software typing programs which are a good fit in various situations (general, education, games-playing, etc).  Like most GNU software, a man page is also provided.

It is so easy to take this effort for granted, and yet how useful is this resource! Such is the way with free software: quite often, somebody already had that itch and had to scratch it.

Jetpack's homepage is your standard, modern affair.
Jetpack’s homepage is your standard, cloudy affair.

If you are a blogger, and you use WordPress, you will undoubtedly heard of Jetpack.¬† Jetpack for WordPress provides a ton of enhancements to any WordPress install.¬†¬† Among the goodies is something for the socialite in all of us: the ability to automatically “broadcast” our blog posts to social networks, including Facebook, Twitter, LinkedIn and Google+, via the Publicize feature.

All this free stuff of course comes with a “price” – having a user account on WordPress.com itself.¬†But, if you are a blogger – or at the very least you read other people’s blogs and contribute comments – this is not exactly a hardship.

Set-up and Testing

Setting up Jetpack is as easy as installing a WordPress plug-in.  If you are familiar with the process, you will probably have already seen Jetpack in the Add Plugin page.

The Publicize feature is equally easy to set up:¬† you simply click on the button corresponding to the social network you wish to link with, a page/pop-up opens to allow you to authenticate with that social network, and then you return to the Publicize page with a “Connected as…” confirmatory message.

Jetpack confirming account connections.
Jetpack confirming account connections.

The next step is to write a post and then publish it.  Simple, huh?  Well, not quite.

Content Formatting

Due to the different ways social networks publish posts, your “write once, publish many” WordPress post may need a little tweaking before it looks as good as possible.

Google+

Image of G+ post
Google+ rendered my blog post with lots of ! ūüėź

 

Facebook

 

Facebook produced a worthwhile post, with backlink.
Facebook produced a worthwhile post, with backlink.

Twitter

Twitter rendered my image sideways
Twitter did what it does best: stays brief

Links:

plus.google.com/+SteveDowe/posts/5eSkkPVLAfb

twitter.com/doweio/status/629950053499584512

Further Testing

Finding the most effective way to post requires more testing.  My main aim was to find a way in which one post can look great on the three main social platforms (Google+, Twitter and Facebook Рnot that I care too much about the latter).

[ This is a legacy-published post, originally written but unpublished on 13 August 2015.  Some details may not longer apply to recent software releases. ]

Seems that my clever little spelling ideas have fallen foul of the English language yet again!

I believed that a double-S in a word (like “hiss“) always requires a soft “ssss“, whereas a single-S is harder – a bit like “szszsz“. ¬†But no. ¬†That would be too easy.

Take “issue” (I do, quite often – but anyway..). ¬†You could say “i-shu” or “iss-yu“. ¬†But what about¬†“dissolve” (“dizz-olve“) – that conflicts¬†with¬†my rule, although “dissolution” (“diss-o-lu-shun“) doesn’t.

Disappear ? ¬†Soft “ssss” – again, a conflict. ¬†Occasion?

Yes, I really could not think of a better title for this. ūüôā

Recently I added a new drive, connected by USB, to a test server. It was for sharing with a virtual machine running on that server.

Chain of oops

When I connected the drive to the host, I decided to create a volume group and logical volume on it. This would have been fine, were it not that I then attempted to mount this logical volume in the host, rather than the guest.¬† The problem, as I later discovered, was that I’d created a volume group in the host, with the same name as a volume group in the guest.¬† Again, this would have been fine on its own, but the chain of errors was complete when I made the following next moves:

  • Shared the physical disk with the virtual machine
  • Activated the LVM volume group on the physical disk inside the virtual machine’s operating system (debian)

To its credit, LVM seemed to handle this quite well, and (if memory serves) merged my new logical volumes into one great volume group.

Identity crisis

Switching between different “hosts” (physical host and virtual guest) to edit logical volumes is not very clever, though.¬† The reason is that lvm, within an operating system with drives available at certain locations, will update those drives’ metadata where each drive is a physical disk that is assigned to a volume group.

Let me put this another way:¬† if you have /dev/sda1, /dev/sdb1 and /dev/sdc1 all as PVs (physical volumes) that belong to a VG (volume group), then making a change to the volume group – e.g. something simple like vgrename – will affect those three physical volume’s metadata.

Now, once you have finished doing this in the physical host and start playing around with the VG in your guest’s operating system, things aren’t going to look quite right.¬† If you exported /dev/sdc1 from the host to the guest, the guest might:

  • recognise the device at another location, such as /dev/sdb1
  • look at it with¬†lvm and wonder where /dev/sda1 and /dev/sdc1 are…
  • let you edit this physical volume’s metadata (using LVM tools) in such a way that you cause further problems for yourself back in the physical host, if you planed to share it back there again.

The golden rules for an easy life, so far, are:

  • Don’t share volume groups and logical volumes between hypervisors and guests.
  • You can share a physical disk to a guest, but if you intend to use a logical volume on it within the guest, create it within the guest.¬† And use it only within the guest.
  • If you must manage and share logical volumes from the host to the guest, use NFS.

If you have already created a nightmare of “unknown” disks and missing PVs…

It’s not too difficult to remedy a tricky situation with messed up volume groups.¬† If you are absolutely, positively, 100% certain that you no longer require the missing physical volumes in your VG, then there are actually only three (or four) commands you need:

# lvm vgreduce --removemissing -f <volume group name>

This attempts to remove the missing PVs from your VG and writes an up-to-date config file in /etc/lvm/backup/.¬† If you inspect that file you’ll see a physical_volumes { } stanza which encompasses the physical volumes now remaining in your VG.

However, pay close attention to the status attribute of each PV.   You may also see the remaining entry has:

status = ["MISSING"]

If you then attempt a

# vgchange -ay <volume group name>

you may find that the VG will not become active and this file again contains several entries, related to the missing PVs that you thought you’d just removed.¬† The reason for this is that the remaining PV(s) have old meta-data which hasn’t been updated by LVM when you did that lvm vgreduce, earlier.¬† Fear not.

Issue:

# lvm vgextend --restoremissing <volume group name> /path/to/PV

e.g. /path/to/PV might be /dev/sdb1 – you’ll need to know this, no guesses ūüôā

After this, inspect the backup config file that you looked at previously.¬† The status should have changed from “missing” to “allocatable”.¬† However, the missing PVs will still be present, so let’s get rid of them:

# lvm vgreduce --removemissing -f <volume group name>

Now take one more look at that config file.  It should just contain the PVs that are present and assigned to your VG.

Try activating the VG:

# vgchange -ay <volume group name>

1 logical volume(s) in volume group "<volume group name>" now active

If you’ve got this far, you’re basically on the home straight. ¬†Simply mount the LV on the file system and away you go!

Using Debian Wheezy, I found that trying to use Evolution as my task source for hamster-applet was not working.

I enabled Evolution as my source for tasks in Hamster. When executing hamster-time-tracker from the CLI, an error would appear in my terminal:

** (Time Tracker:14088): WARNING **: Failed to open calendar (type 1): Authentication required

I first thought that the problem was with hamster, that it was an outdated version. So I downloaded the source from github, re-built it and installed it on my system (after removing the old hamster). This didn’t help. But, as I had the source handy, I thought I’d take a look.

In the hamster-master/src/hamster directory is a file called external.py and, in that, this:

try:
import evolution
from evolution import ecal
except:
evolution = None

So, I know I have found the right area to start investigating this issue further.

For python applications to interface to Evolution, which is written in C, some interfacing software is required. This is installed generally in the form of the package “python-evolution” (http://packages.debian.org/wheezy/python-evolution). As shown at the top of that page, the source for this binary package is gnome-python-desktop (http://packages.debian.org/source/wheezy/gnome-python-desktop).

The next step was to search for the source package responsible for interfacing to Evolution’s calendar. I soon found this. From the Packages Debian page (packages.debian.org) you would click the Developer Information (PTS) link (http://packages.qa.debian.org/gnome-python-desktop). Once there, on the right hand side, click browse source code (http://sources.debian.net/src/gnome-python-desktop/2.32.0%2Bdfsg-3). You end up at a page listing folders containing source files. Simply click into evolution and then click on evo-calendar.c (http://sources.debian.net/src/gnome-python-desktop/2.32.0%2Bdfsg-3/evolution/evo-calendar.c).

I don’t profess to know programming in C, or even how to read much of it really, but you learn by doing – so let’s give it a go. Around lines 24-34, we see the declaration of what I believe is a structure:

#include “evo-calendar.h”

ECal *
evo_cal_source_open_source(const char *uri, ECalSourceType type)
{
ESourceList *sources = NULL;
ESource *source = NULL;
ECal *cal = NULL;
GError *gerror = NULL;

g_debug(“Opening calendar source uri: %s\n”, uri);

This looks like what we need – some code that is trying to open the calendar. It’s also including the header file, evo-calendar.h, which we may need to look at in a sec. So, the main purpose of this code is to open a calendar:

if (strcmp(uri, “default”)) {
if (!e_cal_get_sources(&sources, type, &gerror)) {
g_warning(“Unable to get sources for calendar (type %u): %s”,
type, gerror && gerror->message ? gerror->message : “None”);
g_clear_error(&gerror);
return NULL;
}

source = evo_environment_find_source(sources, uri);
if (!source) {
g_warning(“Unable to find source for calendar (type %u)”, type);
return NULL;
}

cal = e_cal_new(source, type);
if(!cal) {
g_warning(“Failed to create new calendar (type %u)”, type);
return NULL;
}

if(!e_cal_open(cal, FALSE, &gerror)) {
g_warning(“Failed to open calendar (type %u): %s”,
type, gerror && gerror->message? gerror->message : “None”);
g_object_unref(cal);
g_clear_error(&gerror);
return NULL;
}
} else {
if (!e_cal_open_default (&cal, type, NULL, NULL, &gerror)) {
g_warning(“Failed to open default calendar: %s”,
gerror && gerror->message ? gerror->message : “None”);
g_clear_error(&gerror);
return NULL;
}
}

return cal;

If you read closely, you’ll see that we have an IF statement, followed immediately by another IF statement:

if (strcmp(uri, “default”)) {
if (!e_cal_get_sources(&sources, type, &gerror)) {
g_warning(“Unable to get sources for calendar (type %u): %s”,

strcmp may be a string-compare function. Regardless, because of our error message in the terminal, cited previously, it’s fair to say that this strcmp is returning a TRUE. In other words, a basic test is conducted based on the URI that is being passed in to this function, and an error is being returned.

The error returned, “Failed to open calendar”, is a string within the C source code in this same file, at around line 57:

if(!e_cal_open(cal, FALSE, &gerror)) {
g_warning(“Failed to open calendar (type %u): %s”,
type, gerror && gerror->message? gerror->message : “None”);
g_object_unref(cal);
g_clear_error(&gerror);
return NULL;
}

This is the error message we are seeing! The (type %u) bit after the message is probably the return code (a general rule is that if the return code is 0, everything is ok, and any valyue other than 0 means there’s a problem)¬† and the¬† : %s bit is the string returned from the function trying to open the calendar, giving a reason why.

So, to reiterate our error message:

** (Time Tracker:14088): WARNING **: Failed to open calendar (type 1): Authentication required

The function e_cal_open() is returning this error code.¬† To understand this function more, and what’s happening in this code, we need to look at the source for this function and also understand what data we’re passing to it.

Firstly, our call to the function is this:

e_cal_open(cal, FALSE, &gerror)

We can come back to what we’re passing to this function in a moment.¬† Firstly, though, where is the e_cal_open function?¬† We need to find out how it works!

Remember earlier that our file evo-calendar.c has an “include” pointing to the file evo-calendar.h?¬† Well, that means “grab the file evo-calendar.h and make its resources available to me”.¬† Within evo-calendar.h, there is no e_cal_open() function, but there are other includes, including one pointing to libecal/e-cal.h.

On debian, lib-ecal is another package installed along with Evolution.¬† So, finding the file e-cal.h is as simple as using find or locate.¬† On my system, the complete path to the file is /usr/include/evolution-data-server-3.4/libecal/e-cal.h. Hurrah – let’s go searching that C for e_cal_open:

$ grep -i e_cal_open /usr/include/evolution-data-server-3.4/libecal/e-cal.h

gboolean e_cal_open (ECal *ecal, gboolean only_if_exists, GError **error);
void e_cal_open_async (ECal *ecal, gboolean only_if_exists);
gboolean    e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointer data, GError **error);

The first one is the one we’re interested in at present: e_cal_open.

[ Sorry.  This is an incomplete post, published for completeness instead of binned.]