jasonwryan.com

Miscellaneous ephemera…

Console Fonts in Ubuntu

image

Invariably, an Ubuntu upgrade only ever brings me pain in one area: the framebuffer. Granted, most Ubuntu users probably don’t care about the resolution of their framebuffer because they probably rarely venture there.

For me, however, having the correct resolution and a decent font is important. Not because I spend a huge amount of time there (I don’t), but because in the past I have been forced to — and quickly learned that if the resolution is off, it makes it very difficult to work with.

So the recent, otherwise completely successful, upgrade to Maverick Meerkat once again left me with an almost useless console. Fortunately, the hack for forcing a 1680x1050 resolution worked1, so it was just a matter of getting Terminus to stick as the default console font.

This was one instance where Google failed me. There doesn’t seem to be any authoritative guide to setting your console font permanently. I edited /etc/default/console-setup and added Terminus as the font, like so:

1
2
3
CODESET="Lat15"
FONTFACE="Terminus"
FONTSIZE="16"

Issuing, from the console:

1
sudo setupcon -v

would change the font to Terminus for that session but a reboot soon reverted it to the default fixed (which, given Ubuntu have been working on their fonts, is spectacularly ugly).

I finally asked in #ubuntu and was pointed in the right direction:

1
sudo dpkg-reconfigure console-setup

And now I have a workable framebuffer.

Notes
  1. Hack to force higher framebuffer resolution in /etc/default/grub
1
GRUB_GFXPAYLOAD_LINUX=1680x1050

Vimprobable

image

After just posting details of my setup, I have made a reasonably significant (and it goes almost without saying, unplanned) change: after uzbl began unaccountably maxxing out my CPU, I decided to give Vimprobable a go.

I covered it briefly in my review of 5 alternate browsers and liked the idea of another vim-based browsing experience.

There are two versions of Vimprobable; the differences, as described on the website:

Both versions are actively maintained. The first version can only be customised by editing config.h before compiling. It is pretty stable and very usable. Version 2 has grown fairly stable already as well, but it’s still seeing bigger changes, of course. It aims at allowing more customisation, for example through :set and :map commands.

I downloaded the tarball for Vimprobable2 from the AUR, extracted the files and built the package.

Customization occurs in 3 files1: the first two, config.h and keymap.h both require you to recompile after editing, which is a trivial task given the size of the programme.

Vimprobable2 also features a third configuration option that doesn’t require compiling after changes, vimprobablerc. Should you wish to use it, you will need to create this file in ~/.config/vimprobable/. Helpfully, there is a man page for all of the options in this file, to read it issue:

1
man vimprobablerc

Despite it’s spartan appearance, Vimprobable is a full-featured browser — with the advantage of being driven solely from the keyboard. It handles bookmarks (and the tagging thereof, which is impressive and handy), multiple search engines, cookies, history, etc…

I have made a number of changes to the defaults, including moving some of the keybindings to be closer to uzbl’s (habit, really). The other area where I made some minor changes was to the hinting style. Hinting is just the way Vimprobable (and other browsers like uzbl and Conkeror) follow links; the default is, to put it mildly, garish2, so I hacked around in hinting.js to make it more attractive.

If you are interested, my vimprobable files are in bitbucket, including the modified hinting.js.

Update

I think this is a keeper. I installed tabbed and now open Vimprobable in tabbed for tab management. A quick addition to my keybinds in dwm and I have a minimalist and powerful browser…

Notes
  1. Of course, you are not limited to these files; the beauty of free and open-source software is that you can change any of it…

  2. To support this claim, I searched google for an image of the default Vimprobable hinting style, and I could only find this screenshot of conkeror, which will give you an idea…

The Setup

image

Inspired by The Setup1, I decided to document the free (as in freedom) and open source software tools I use daily.

I made the move to using open-source about four years ago. At the time it was mostly a practical decision — the Pentium 4 laptop that I was using with XP on it had slowed to a crawl and I wasn’t keen to replace it, so I installed Ubuntu (Hardy Heron) on it and haven’t looked back.

That same machine, incidentally, is still happily churning away, but it now runs a lightweight Debian Stable.

Desktop

My primary home machine is a one I had built from spec two to three years ago. It was always intended to be a long-term investment, with sufficient power and storage to last for the better part of a decade.

Centurion is an Asus P5E-V motherboard with an Intel Core 2 Quad 6600 2.4GHz CPU and 4GB of DDR2 RAM. The sound card is an M-Audio Audiophile 2496 and the graphics card is a 1GB nVidia GeForce 9600GT driving an LG 22” flat panel 1680x1050 display.

Software

I dual boot this machine, switching between the current Ubuntu (10.04) and Arch Linux.

There are two 1TB Seagate drives in a RAID1 array, and a 500GB Seagate which has Arch on it as well as a couple of virtual machines. I back up the RAID array frequently, using rsync, as it holds my /home but don’t worry about the 500GB drive as I figure it is simple to reinstall Arch or a virtual machine…

I try to use the same software across all of my machines to simplify my working habits, however I am experiencing some tension between Ubuntu and Arch insofar as Arch is a rolling release and you very quickly get used to the most recent builds…

Applications specific to the Ubuntu box include:

  • Firefox: I also have Chrome installed on this machine, but stick with the ‘fox for Firebug and other extensions

  • Thunderbird: with the Enigmail extension. One of those areas of tension - it’s just a matter of time before I move to mutt (see EeePC)

  • Squeezeserver: I have a Logitech Squeezebox to serve my music and it runs off this great open source software

  • Virtualbox (OS): for running virtual machines - currently Slackware and FreeBSD.

EeePC 901

Archer is a 901 I bought two years ago – the Linux model with the 4/16GB SSD, and I absolutely love it. I put a second GB of RAM into it and another 16GB SD Card (for /music) and it does everything that I need. The Atom 1.6GHz processor handles compiling relatively smartly and the screen and keyboard, while small (9” at 1024x600) are not uncomfortable to use for protracted sessions. It is also deathly quiet. The only other addition is a second 6 cell battery so I can safely count on 8-10 hours out of it.

One of the reasons that it works so efficiently is that it is an extremely minimal Arch Linux setup.

Software

Applications specific to this machine are:

  • dwm: the suckless window manager. With added functionality of some patches: init-pertag, cycle and push: see the patchset for details
  • dmenu: application launcher, again from suckless.org
  • mutt: the best email client I have used - requires some setup, but –if you want your mail client to run exactly as you would like– then this one repays the investment in spades. Mutt is just a MUA, the rest of the email cycle is handled by:

  • uzbl: a lightweight webkit browser that is infintely extensible and configurable^2^

  • Vimprobable in tabbed: another lightweight webkit browser that can be customized to your heart’s desire…
  • A host of small programs that make life easy:
    • feh: image viewer
    • autocutsel: synchronize clipboards
    • dzen and conky: to print system stats to dwm’s status bar
    • surfraw: command line search client
    • unclutter: hides the mouse cursor (don’t really need a mouse with this setup)
    • xmodmap: map Caps Lock to Escape

Common tools

Applications and utilities that I use across all of my machines include:

  • Urxvt: I would’nt dream of using another terminal… Run as a daemon, with these applications:

    • tmux: for local and remote terminal sessions
    • Vim: with a simple notes function in my .bashrc
    • Vifm: Vi-like file manager – for when I am not using coreutils
    • TTYtter: fantastic Twitter client: if it could integrate Identi.ca into a single feed, it would be perfect…
    • irssi: for IRC
    • Mplayer: for movies
    • MPD and ncmpcpp: music player daemon and ncurses player
    • mpdscribble: for scrobbling to Libre.fm and Last.fm
    • rtorrent: run inside tmux for remote sessions. Genius.
  • Dropbox: the daemon is closed source, but this is the best tool I have found for synching across machines. If the Ubuntu One devs ever focus on other Linux distros, I’d move across.

  • Truecrypt: a TC volume in Dropbox and you are set
  • Skype.

Other Utilities

I use mercurial and bitbucket to share my dotfiles between Arch machines (one of my work boxes is also running Arch). I have two Linksys WRT54GL routers, both running Tomato, to handle my routing and wireless networking (thanks to @jethrocarr for solving that puzzle). For LAN file sharing I use NFS and I use OpenSSH to access my machines remotely. I have a third generation iPod) and I run Rockbox on it.

You can see screenshot of these machines on flickr.

Notes
  1. …and the fact that, apart from RMS, it is pretty much MacBookPros all the way down.

  2. Updated 9/10/10 - moved to Vimprobable after some issues with uzbl.