Category Archives: Technology

Shotwell ate my photos

I’m not sure what happened, but when I launched the Shotwell photo management application a couple of days ago, it started deleting my entire library of photos and by the time I realised what was happening, they were gone. Fortunately I have a backup, but that only goes as far as the middle of 2016, for he rest PhotoRec proved to be a life-saver (note to self — next time make sure to uncheck all the file types you don’t want to recover).

What did strike me when recovering my JPGs was the number of files that have been sitting on my hard drive that I had never actively downloaded. Clearly these are all images on various websites that I have visited. While I understand that a browser needs to download the contents of a page in order to display it, I was slightly taken aback at just how much of my browsing history was captured in these deleted files.

For now, though, most of my photos are restored and I am continuing with the slow and painful process of going through the recovered photos, removing duplicates and copying them back into my photos folder.

Once this is done, I shall be uninstalling Shotwell and looking for a safer photo management solution. To be fair, it is possible that I did something foolish when launching Shotwell — although what, I have no idea — but even if that is the case, I am not going to trust an application that starts deleting stuff without warning.

And I really should start thinking about a better backup strategy.

Flattr this!

Merging multiple PDF files with pdfunite

One thing that using Linux has taught me is to always look for the simplest solution, because it probably exists. As it turned out in this case.

In this case, I was emailed a five page PDF document that I had to print, sign, scan and send back. Printing and signing, of course, was easy enough and I can scan the five pages to get five, separate PDF files. Merging these files back into a single document is where pdfunite comes in, and it really is as simple as:

pdfunite page1.pdf page2.pdf page3.pdf page4.pdf page5.pdf outfile.pdf

You can specify as many source files as you like and the last file is the destination file.

And if I’d known about pdfseperate, I could have probably avoided printing the entire document in the first place.

Flattr this!

Crowdsourcing road safety

Ping if you care: volunteers map cycling danger spots

The Brussels-Capital Region has launched a pilot project that will allow cyclists to contribute to a map showing the danger spots on the region’s roads. Secretary of state for road safety Bianca Debaets sent out 540 volunteers this week equipped with “pingers” linked to an app that highlights dangers.

Each volunteer uses an app, connected by Bluetooth to a piece of kit attached to their handlebars like a bicycle bell. If the cyclist feels unsafe on the road at any point, they tap once on the pinger and the app records the location.

Once the information is uploaded to the database, along with any feedback the cyclist wants to give, it can be added to a map of the most dangerous places for cyclists on the region’s roads. It would then be up to the authorities to do something to remedy the situation if possible – in the case of a dangerous junction, for example, though not in the case of a vehicle parked on a cycle path.

Ping If You Care is one of those ideas that is both brilliant and really obvious now that someone else has thought of it.

Flattr this!

Solving the wrong problem

Dave Winer thinks that podcast RSS feeds should be ghettoised.

Here’s the problem. If you put a link to the RSS feed alongside the links to iTunes and Stitcher and whatever else, you’re going to get a bunch of emails from users about how your site is broken. I know, because I’ve gotten those emails.

And here’s his answer:

Create a simple page that says “This is a link to our RSS feed. It’s used by developers and hobbyists to build their own listeners and it helps support innovation on the internet.”

This is a terrible solution, for a number of reasons.

Firstly, the suggested statement is flat-out not true. Speaking for myself, I don’t use iTunes or Stitcher. I use gPodder. If I find an interesting podcast I need an RSS feed to follow it — if you don’t give me a feed I’m not going to follow your content. It really is as simple as that.

This leads to the second problem, which is that Winer is assuming that proprietary feeds are the norm and should therefore be given preferential treatment to open standards. I’m not going to dispute the first part of this assumption but to present RSS as some curiosity that is only of interest to hobbyists is to consign it to history. If you want RSS to remain a viable standard, the RSS feed needs to be given at least the same precedence as the proprietary feeds.

As to the problem that Winer is trying to solve. How many people, really, are incapable of clicking on the correct link? A quick search across the corporate podcasts that I listen to reveals that neither the BBC nor The Guardian feel the need to make some special “your’re stupid” statement about RSS. In fact, The Guardian even manages to force a few extra clicks out of you regardless of what feed you choose.

Of course, the best approach is that taken by the Duffercast1. A single subscribe link takes you to all the feeds with no special statements about any of them, because some audiocasts have listeners who are capable of using the internet.

Footnote

  1. Disclaimer: Yes, I am a duffer

Flattr this!

Smarter Coffee and Systemd User Units

One of the particularly handy features that systemd supports is the ability to set up unit files on a per-user basis. You simply put the unit files in your home directory and tell systemd to start using them.

I have a couple of these and, because I can never remember the details, I’m putting them here to save me trawling through the interwebs next time I change something.

The user level unit files all go in ~/.config/systemd/user

If this folder doesn’t already exists, you will need to create it.

You can then manage the unit by adding a --user switch to the normal systemctl commands.

Clear as mud, I know, so here’s an example.

Back in October I was given a Smarter Coffee coffee machine — this is a filter coffee machine that can connect to your home network in order to send alerts to your phone. On receiving this, my first thought was to wonder if I could direct these alerts to my laptop.

Some searching revealed that not only is this possible but someone else has already done it. So I forked nanab’s repository and started playing around with the code, managing to direct the notifications to the Gnome notifications area. All of this is available on GitHub, but the systemd bit is described below.

First, I should mention that I have a small binary file (smartercoffee) in /usr/local/bin that points to the actual code. This looks like this:

#! /bin/bash
python2 /path/to/smartercoffee/pollingStatusMessage.py --notify GNOME

So the service file (smartercoffee.service), which needs to be dropped in ~/.config/systemd/user, looks like this:

[Unit]
Description=Monitor the coffee machine

[Service]
Type=simple
ExecStart=/usr/local/bin/smartercoffee
StandardOutput=journal
Restart=on-abort

[Install]
WantedBy=basic.target

You can enable the service with:
systemctl --user enable smartercoffee

And start it with:
systemctl --user start smartercoffee

So now, whenever I boot up my laptop, the first thing it does is tells me the status of the coffee machine.

Flattr this!

Quote of the day: A beautiful, flexible, powerful mess

The web thrives on diversity. It’s the diversity of the web that sustains it and it’s the thing that will mean it’s still around long after all the monocultures, whether they be browsers or Facebooks or Googles, have long since vanished from the online ecosystem.

Scott Gilbertson on the value of diversity and why Firefox still matters

Flattr this!

Rolling back

I noticed that the Twenty Seventeen Theme that I installed on this blog at the start of the year wasn’t playing too nicely with Epiphany. Having lots of links in a post is a bit pointless if you have to hover your mouse over them in order for them to be highlighted.

So I have rolled back to the previous theme which, if I’m honest, looks a lot nicer than all this new-fangled modernity,

Flattr this!

Freedom to tinker

Talking about the way in which his embrace of Free Software has changed his attitude to computers, Bruce Byfield reaches a conclusion that rings very true for me.

All unknowing, I had wandered into the world of do-it-yourself. Originating in small groups of hobbyists who had few resources except themselves, free software naturally required more independence of its users. Far from discouraging users from tinkering, free software actually encouraged it with text configuration files and scripting so simple that it could be learned without taking classes. Because there were so many choices, it encouraged me to explore so I could make informed decisions. Just as importantly, because free software was a minority preference, the necessary compatibility with proprietary operating system sometimes required considerable ingenuity.

As a result of these expectations, I gradually lost my learned helplessness. I can’t say exactly when I shed the last of my conditioning, but after a couple of years, I realized that a major shift in my thinking had occurred. I still didn’t — and still don’t know everything about free software, but I no longer panic when a problem strikes.

Although I was using a number of open source applications before, I didn’t really start to delve into GNU/Linux until early 2007 when I installed Ubuntu on my PC alongside Windows XP. And, over the past ten years I have gone from being excessively cautious to (probably) a bit too casual.

There was never a sudden shift but, the more I have poked around the more I have found — all documented and backed by a helpful community. I have moved from really not wanting to do anything that might cause any sort of problem at all to being willing to break my install, safe in the knowledge that if the worst comes to the worst, I can just reinstall the operating system without even risking my data.

I am far from being able to claim any expertise but the openness and availability of information surrounding Free Software means that for any problem I am generally able to understand what the issue is and find or figure out how to fix it.

And that’s freedom.

Flattr this!

Learning Genie with Project Euler

I searched for Gnome Genie and was attacked by a Gnome Ninja.

I’ve recently started playing around with the Genie programming language. This is a variation of Vala but with a more Pythonesque syntax. And I do like Python.

Genie is a compiled language that uses the Vala compiler to produce C code which then compiles to an executable binary. This means that it has less overhead than programs written in Python and should run faster. This is not always a consideration but it can certainly be useful.

The inevitable Hello World program looks pretty simple:

[indent=4]
init
    print "Hello World"

The only problem I’ve found so far is that there appears to be a dearth of “Teach Yourself Genie” resources, either online or off. This is not helped by some of the results that come up when you search for “Genie” or even “Genie Gnome”.

So I’ve decided to have another crack at Project Euler. I have already solved a fair few of these problems in Python, if I can re-implement the same solutions in Genie I will count myself as having made some progress.

One down, 592 to go.

Flattr this!

Removing crapware from the phone

After wasting my time last night, I realised where I’d gone wrong. It appears that the Google Apps Installer on the Fairphone installs the Google Apps as System Apps. So they can’t (easily) be removed and the factory reset does nothing to them.

So what I need to use is the /system/app mover and BusyBox to make the system apps into user apps.

I have tried this with iFixit and successfully removed the default version and upgraded to the F-Droid version.

Going through the actual Google apps will require a little more care and may take some time.

Update

Now I’m confused. I’ve just glanced at the phone and the Google Apps appear to have vanished. The only thing I can think is that, when I restarted the phone, some cleanup happened. But the apps are removed, which is what I was trying to achieve, even if I’m not entirely sure how I achieved it.

Flattr this!