Logstalgia (aka ApachePong) now in Debian

Andrew Caudwell's Logstalgia (aka ApachePong) has made it to Debian! It's a fun little Apache access log viewer which replays old logs (or streams live ones) as an OpenGL pong game.

So grab your favourite high-traffic access log and head over to the download page to check it out. There's also a youtube video if you can't find an interesting log file to use it with.

Encrypting your home directory using LUKS on Debian/Ubuntu

Laptops are easily lost or stolen and in order to protect your emails, web passwords, encryption keys, etc., you should really think about encrypting (at least) your home directory.

If you happen to have /home on a separate partition already (/dev/sda5 in this example), then it's a really easy process.

Do the following as the root user:

  1. Install the cryptsetup package:

    apt install cryptsetup
    
  2. Copy your home directory to a temporary directory on a different partition:

    mkdir /homebackup
    cp -a /home/* /homebackup
    
  3. Encrypt your home partition:

    umount /home
    cryptsetup -h sha512 -c aes-xts-plain64 -s 512 luksFormat /dev/sda5
    cryptsetup luksOpen /dev/sda5 chome
    mkfs.ext4 -m 0 /dev/mapper/chome
    
  4. Add this line to /etc/crypttab:

    chome    /dev/sda5    none    luks,timeout=30
    
  5. Set the home partition to this in /etc/fstab (replacing the original home partition line):

    /dev/mapper/chome /home ext4 nodev,nosuid,noatime 0 2
    
  6. Copy your home data back into the encrypted partition:

    mount /home
    cp -a /homebackup/* /home
    rm -rf /homebackup
    

That's it. Next time you boot your laptop, you will be prompted for the passphrase you set in Step 2.

Now to fully secure your laptop against theft, you should think about an encrypted backup strategy for your data...

Choosing the right license for your new Free Software/Open Source project

Writing the software is only one component of a successful Free Software project. If you want to build a community around your pet project, there are a number of important things you need to do but which typically fall outside of the "coding" job. One of these tasks is choosing a license.

A license choice is very personal since it involves putting in writing the permissions and protections that you want to give with respect to your code. However, your choice of license will have a number of implications.

"A license can ruin a perfectly good piece of software" - Jon Stevens

Whenever possible, try to avoid:

  1. writing your own license
  2. choosing a license which is incompatible with the GPL

To make sure that your project can be included in a Free Software distribution like Debian and to make your code most useful to other people, it is highly recommended that you choose a standard license. Common ones include the GPL, LGPL, the Modified BSD license and the Apache license. You can find a more exhaustive list on the Free Software Foundation website.

Common licenses are well understood by the community and have stood the test of time. Their compatibility with other licenses are also much clearer. This is important if you'd like your code to be reused inside other projects, but also if you want to include code from other sources inside yours.

The standard licenses are also more likely to make sense in different countries. The latest version of the GPL, for example, was reviewed by lawyers from all over the World. Whatever you come up with is unlikely to have this level of scrutiny. If you think that the existing licenses don't fit your needs, please write to licensing@fsf.org to discuss your specific situation and avoid practical problems.

So take the time to familiarize yourself with common licenses and then decide for yourself what protections you want to give to your code. Then, add the following to your tarball before you publish your source code online:

  1. a copy of the license
  2. a clear copyright statement in a file like README

Here's an sample copyright statement for a piece of software under the latest version of the GNU General Public License:

Email-Reminder - Receive emails for events like birthdays and anniversaries
Copyright (C) 2004-2008 by Francois Marier (francois@fmarier.org)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.

This helps distributors and contributors by explicitly stating the license version as well as the name and contact details of the copyright holder.

Next up: some tips and ideas about what to provide along with your source code