Category Archives: English

Backported patches to sarge and dapper

Johh has backported the latest patches he created for the etch/edgy versions of Last.fm to version 1.0.7, so Debian sarge and Ubuntu dapper users can benefit for them. Changes include the ability to select the web browser from the configuration dialog, a new ALSA plugin and some other minor fixes.

Last.fm 1.1.3.0 for Debian etch and Ubuntu edgy has been updated too, including a fix for environments with several sound cards.

Full changelog and source code here. Binaries here.

Last.fm in your language: 1.1.3.0 is out!

Just a couple of days after we published an update for Last.fm 1.0.9.6, a new version was released: Last.fm 1.1.3.0.

Besides some bugfixes, the UI has been translated into several languages, so you can run this program in english, italian, german, french, spanish, portuguese, polish, russian, japanese and korean.

Moreover, this time the Last.fm team has released a Debian package (for Debian etch), available from the Last.fm downloads page.

However you still might find our packages interesting because:

  • We’re including some enhancements not available in the official version.
  • We have packages for several distros: Debian sarge and etch, Ubuntu dapper and edgy.

As usual, you can get the source code and diff at John’s page for original source code, Debian diff and a description of our changes. The compiled packages are available here.

And as usual, feedback is appreciated. Enjoy!

Last.fm 1.0.9.6 updated

John has been working in the Last.fm client code and prepared some nice patches, so here’s a new minor release for Debian etch (1.0.9.6-0etch3) and Ubuntu edgy (1.0.9.6-0edgy3).

Changes include:

  • Some leaks were fixed, so now the client wastes less memory 😉
  • A new ALSA plugin has been introduced.
  • Users can select the web browser from the options dialog.

Get the full changelog and source code at John’s page.

As usual, compiled packages are available from my webpage. Comments and suggestions are welcome.

Enjoy!

My first programming book

I don’t remember exactly what my first programming book was, as it was many years ago (when I was about 12) and I keep a number of programming books from that time, but it was probably this one:

Novas aventuras no seu ZX Spectrum

It was a Portuguese translation of “Creating Adventure Programs on the ZX Spectrum“, originally by Peter Shaw and James Mortleman.

It explained how to design and code text adventures, one of the earliest genres of computer games that was about to disappear completely in the early 90s but fortunately is still alive thanks to the Internet (although it’s not a commercial genre anymore, obviously). There’s a number of free software programs for Unix-based systems to play classic and new games from that genre. Maybe one day I’ll post something about them 😉

With this book I learned some interesting things about algorithms, text parsing and data structures. All the programs included in the book were written in Sinclair BASIC, the first language that every Spectrum owner learned as the computer included an interpreter.

However, it wouldn’t be fair to say that I learned programming thanks to any book, because without any doubt almost all of my early programming experiences began with MicroHobby, a Spanish magazine dedicated to Sinclair computers. Thanks to the work of some enthusiastic fans who scanned all the issues, MicroHobby is available online in the MicroHobby Forever site.

Last.fm 1.0.7 updated

I have updated the last.fm packages for Debian sarge (1.0.7-0sarge2) and Ubuntu dapper (1.0.7-0dapper2). This update solves a bug that caused the program to segfault when double clicking on Friends.

Download them at http://people.igalia.com/berto.

Version 1.0.9.6 is not affected by this bug, so if you’re using Debian etch or Ubuntu edgy you don’t need to do anything.

Happy holidays.

A Christmas gift for you

I’m pleased to announce the availability of new Debian and Ubuntu packages of the the latest version of the Last.fm client for x86 systems.

New versions have been released by the Last.fm team, being 1.0.9.6 the current one. However the only official download for GNU/Linux is still several months old and lacks the newest features and bug fixes.

I have been combining efforts with John Stamp and we have prepared packages for Debian and Ubuntu. We’ll try to keep them updated with every new release from Last.fm (you can subscribe to this blog’s feed for announcements if you want to).

Go here for downloads and more information.

These packages are unofficial and they haven’t been tested thoroughly, so comments and suggestions are welcome.

Merry Christmas for you all!

P.S.: I’m sure that some of you know where I took this post’s title from. Highly recommended, of course, and not just for these dates 😉

Last.fm client for Debian and Ubuntu

I wrote about Last.fm some time ago in this blog, and mentioned some of the programs you can use to listen to this internet station.

However, the previous official player is deprecated and no longer supported (although it still works) as the Last.fm team has released a new client (in beta stage for GNU/Linux systems). This new client can be downloaded here, but there’s no Debian package, just a precompiled binary in a .tar.bz2 file. Moreover, this binary does not work in sarge, the current stable release of Debian.

As this new client is GPL too (congratulations!) I downloaded the source code and made a Debian package ready to run in sarge systems. You can get it from my webpage. I have been using it successfully for some time, but any comments regarding its packaging are welcome. Enjoy!

Updated 03-12-2006: I also built another package for Debian testing (etch). You can download it from the same page I mentioned above.

Updated 04-12-2006: Now a package for Ubuntu edgy is available too!

Disk encryption in Linux (IV): Encrypting a full partition with LUKS

LUKS is a hard disk encryption standard for Linux created by Clemens Fruhwirth. Althought the reference implementation is based on dm-crypt, it has several improvements over plain dm-crypt (as seen in the third post in this series), including support for multiple keys and passphrase revocation.

To use LUKS you’ll need a recent cryptsetup package (Debian sarge users can get it from backports.org). You will also need an empty partition to encrypt. You should fill it with random data before beginning:

$ shred -v /dev/hdaX

Now you have to initialize that partition with LUKS:

$ cryptsetup luksFormat /dev/hdaX

A random key will be generated and you will be asked a passphrase to encrypt it. Now you can decrypt your newly created LUKS partition and begin to use it:

$ cryptsetup luksOpen /dev/hdaX myname

Here, myname is the name of the device that will be created under /dev/mapper. Now it’s time to create a filesystem:

$ mke2fs /dev/mapper/myname

Now you can mount and use /dev/mapper/myname just like any other filesystem. When you’re done, unmount it and close the LUKS device so it won’t be accessible anymore until you open it again:

$ cryptsetup luksClose myname

So far so good, but how do you mount that partition automatically on boot? Just put this in your /etc/crypttab (and don’t forget to add /dev/mapper/myname to your /etc/fstab file!):

myname    /dev/hdaX    none    luks,check=ext2

myname is the encrypted device that will appear under /dev/mapper and /dev/hdaX is the original device.

The third field, none, means that the key to decrypt the filesystem is not stored anywhere, so cryptsetup will ask you during boot.

The fourth field lists misc options: luks means that the partition is encrypted with LUKS format (as opposed to plain dm-crypt format). check=ext2 will make cryptsetup look for an ext2/ext3 filesystem on the decrypted partition. That way, cryptsetup will notice whether you introduced the right passphrase and ask it again in case you typed it incorrectly. There are several partition checks (not just ext2), and you can write your own scripts. Just have a look at /lib/cryptsetup/checks/.

And that’s all for the basic usage, but there are some other nice things that you can do, such as adding more valid passphrases to a LUKS partition:

$ cryptsetup luksAddKey /dev/hdaX

You can see some information about the partition (including the number of valid passphrases available):

$ cryptsetup luksDump /dev/hdaX

And obviously you can remove any passphrase:

$ cryptsetup luksDelKey /dev/hdaX slot

Where slot is the number of the key slot you want to remove (you can see it with luksDump).

And that’s enough by now. As you can see, it’s not that hard to keep your data secure. Keep in mind, however, that encrypting a whole partition introduces some extra overhead, so your system will be slower. You don’t have to encrypt everything (i.e. under /usr you probably don’t have any confidential data). Choose wisely and enjoy!.