Bash

Two things that improve my bash productivity – stopping the cursor keys inserting characters in vim and history search in bash.

Edit ~/.vimrc or /etc/vim/vimrc (for system wide) and add turn off vi compatibility:

set nocompatible

The latter can be improved by editing ~/.inputrc (or /etc/inputrc for everyone). Pressing the up key scrolls through all the commands you’ve typed but by adding:

"e[A":history-search-backward
"e[B":history-search-forward

You can type the first letter or two and get the command you need, so if you typed “mysql -u root -p” last Tuesday but can’t remember the options, typing “my” and pressing the up key will find it.

Watch TV with VLC and a Freecom DVB-T Stick

One of the things I need my Aspire One to do is watch TV.  When you’re away, it’s nice to be able to watch a little TV.  I bought a Freecom DVB-T USB stick years ago and have always had success under Linux.  It’s small, sensitive and selective.

I was surprised, especially on Ubuntu, how easy it was to setup.

My netbook runs Arch, so I installed it on that and my Dell 1545 running Ubuntu 9.04.
Continue reading “Watch TV with VLC and a Freecom DVB-T Stick”

Building PDF from Ubuntu Documentation

People frequently ask for PDF versions of the Ubuntu System Help. We have a toolchain to build them but why not do it yourself?

This is true of any DocBook – dblatex is in the Ubuntu repositories and can transform DocBook in to many formats, the default being PDF.

Usually it is as simple as:

dblatex filename.xml

To generate filename.pdf. Most errors are easy to rectify because dblatex calls other tools and you can step through some (such as pdflatex).

However if you get an error along the lines of:

Overfull @hbox (20.76302pt too wide)

Well that is a bit of a pain. The prescribed wisdom is that something (usually a ulink) is just really too long, such as one of those really long URLs. In the case of DocBook, more often than not it’s a table that it just cannot render – so keep them simple!