Posts
Fixing microphone input on ThinkPad R61 in Ubuntu / Linux Mint
Yesterday I tried using the internal microphone on the ThinkPad R61 for the first time, in an attempt to make a Skype call. Skype kept saying there was an error in the sound configuration. After the usual Google searching and flailing about, I made the following changes to my system to fix the problem. It’s not clear whether all of these changes are necessary, but using them all certainly doesn’t hurt.
May 2, 2009
Three Bad Designs
Most modern computers, and especially laptops, are afflicted with three especially poor design choices. We seem to be stuck with these choices, because the market, in its infinite wisdom, has decided that they are somehow an improvement over the old ways, or at least different. I’ll start with the oldest problem first. Caps Lock in the wrong location Up until around the mid-80s all terminals and computer keyboards had a Control key placed where God intended it, next to the A key on the home row. This was extremely convenient when using programs like editors (especially Emacs and it imitators). Even Windows has plenty of keyboard shortcuts that use the Control key. So having that key within easy reach was a big plus.
March 2, 2009
Upgrading from Rails 2.1 to 2.2
I have a small project that I developed at work using Rails 2.1. After installing the latest version of Rails, 2.2.2, I had to do the following to get my project working again: Edit config/environment.rb and change the value of RAILS_GEM_VERSION to ‘2.2.2’. Edit config/environments/development.rb and comment out the config.action_view.cache_template_extensions line. Run rake rails:upgrade. This added a new file, script/dbconsole, and modified the following files: config/boot.rb public/javascripts/controls.js public/javascripts/dragdrop.js public/javascripts/effects.js public/javascripts/prototype.js
February 25, 2009
Power-off fix for Linux Mint 6 / Ubuntu 8.10
The older computer on which I installed Linux Mint recently wouldn’t power off properly after a shutdown. This used to work on Mandrake 10.2. Apparently the problem is due to the newer Linux kernels requiring ACPI by default for power management, and this machine’s BIOS doesn’t seem to provide a compatible ACPI implementation. After the usual slogging through Google search results and numerous experiments, the fix was extremely simple: add the following line to /etc/modules:
February 14, 2009
Fixing screen resolution in Linux Mint 6 / Ubuntu 8.10
I installed Linux Mint on my parents’ computer today, replacing Mandrake 10.2. (Yes, grandparents can use Linux.) This older computer has a motherboard with a built-in VGA adapter by Trident, connected to an ancient CRT display with a maximum resolution of 1024x768. But for some reason, Linux Mint set the resolution to 800x600, and the Screen Resolution tool in the Control Center would not allow it to be set higher.
February 10, 2009
Batch resizing images in Linux Mint / Ubuntu
I recently switched my two main laptops to Linux Mint. I’ve been running KDE-based Linux distributions for years, and this is my first experiment with Gnome. Right away, I discovered that there are apparently no Gnome applications that can resize multiple images as easily as the premier KDE photo application, Digikam. GThumb, an otherwise decent photo viewer, has a memory leak bug in its “scale images” feature that quickly brings the system to its knees; this bug was supposedly fixed long ago but has resurfaced in Ubuntu 8.10. The batch plugin for Gimp looks like it ought to work, but almost always fails with various errors.
January 5, 2009
Human-sized software
The piece of software that I’m most proud of is a tiny real-time kernel that I wrote for the Intel 8080 back in 1979. The 8080 was a very early predecessor to the now-ubiquitous Pentium. It had specs that seem laughable now: 8-bit data, 16-bit addressing, 2 MHz clock speed. Obviously, with a chip this slow, efficiency was the name of the game in software. So I wrote the scheduler and interrupt handler in assembly language, based on the design (but obviously not the actual code) of Intel’s own RMX-80 kernel. I don’t have the source code to this kernel, but I recall that it amounted to less than 2K of assembled code.
November 20, 2008
Convert tabs to spaces in one line of Ruby
Here’s a one-liner Ruby script that converts tabs to spaces: ruby -pe 'gsub(/([^\t]*)(\t)/) { $1 + " " * (8 - $1.length % 8) } I’m in the early stages of rewriting a tiny editor, MicroEMACS, in Ruby, and needed a tab converter. I was sure I’d seen this somewhere before, but couldn’t find it with Google, so rewrote it from scratch.
November 19, 2008
Creating an encrypted directory on Linux
There are a number of ways to encrypt a file system on Linux, and the choices of strategies (single directory or entire partition) and tools (dm-crypt, LUKS, losetup) can be bewildering. I didn’t have a spare partition to play with, and I wanted to use what seemed to be regarded as the preferred tool (LUKS). So here’s how I created an small encrypted directory on SLED (SUSE Linux Enterprise Desktop 10 SP2). (I cobbled together this information from Encrypted Root File System with SUSE and File System Encryption.) I performed all of these steps as root in root’s home directory.
October 25, 2008
Reviving an old ThinkPad with TinyMe 2008
#Linux#Pclinuxos#Software#Thinkpad
I bought my first ThinkPad nine years ago, and now have five of them. Two of them (an A30p and a T40) are hopelessly broken, with system boards that either won’t power up or won’t stay powered up. The others are working pretty well, including the oldest one, a model called the 380Z, which despite the name, has no relation to Datsun sports cars. The 380Z served me well for a couple of years. It was running Mandrake Linux practically from day one, and was a reliable, non-sleek tank. Recently I thought it might be fun to update it to a more recent Linux. But its specs are quite modest by today’s standards. Its power is about 1/10th that of a modern laptop in just about every area: 96 MB of RAM, a 233 MHz Pentium II processor, and a 4 GB hard disk. Nothing could be done about the RAM, and that’s the biggest problem, because most Linux GUIs these days (KDE being my favorite) require about 256 MB at a minimum if you want some memory left over for running a browser. The hard disk problem solved itself: when I powered the machine on yesterday for the first time in a year, the disk made terrible clunking and seeking noises and the BIOS reported it as dead. So I swapped in an 80 GB disk from the dead T40.
October 19, 2008