Saturday, October 29, 2011

Quick Terminal in Ubuntu Oneiric

If you've tried to open the terminal using alt+F2 in the new Ubuntu (Oneiric), it probably didn't work.  That's because it has a new shortcut: Alt+Ctl+T.

I'm sure it's a fine shortcut, but it's hard to reverse years of habit.  Feel the same?

It's easy to switch back.  Go to:

System Settings > Keyboard > Launchers.
Select Launch Terminal.
Press Backspace to clear Alt+Ctl+T,
Then press Alt+F2.  

You're done.

Supposedly, you can skip the step of clearing the old shortcut and just hold down the new one for a moment to replace it.  Didn't work for me.

Tuesday, June 07, 2011

The truth of the kernel

For various reasons I sometimes have to know what Linux kernel I'm using with Ubuntu.  It's easy, but I always forget how, so this is as much for my own use as anything else:

To find your current Linux kernel, at the command prompt:
uname -r (quick, short reply)
uname -a (same with a little more information)
The difference between those two is that -r just tells you the version of the Linux kernel.
l@l:~$ uname -r
That's pretty straightforward.  The first two numbers, in this case the 2 and the 6, are major and minor releases.  The third number, 32, is the version.  The fourth number, 21, reflects the back-ports that are incorporated into the kernel.

An rc.x at the end means the version is a release candidate, the last revisions before a version is ready for use.

If you're curious, you can browse through the history of Linux 2.6.x.  Or back to the very beginning.  If you want to how Linux kernel numbering has changed over the years and why it changed, you can read the history, complete with primary documents.

Chances are, you're using an operating system that makes use of the Linux kernel, like Ubuntu, Red Hat, Open SUSE and so forth.  These are sometimes called "flavors" of Linux.  Frankly, I find they all taste the same, but they look and operate a little differently.

By using -a, you'll get a response like this:

l@l:~$ uname -a
Linux l 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux

Another way to get information about your kernel is by looking at the /proc file.  The command is:
cat /proc/version
The result, will look like this:

l@l:~$ cat /proc/version
Linux version 2.6.32-21-generic (buildd@yellow) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010
What does it all mean?  
  • Linux version 2.6.32-21-generic The complete Linux version.
  • (buildd@yellow) The username and host name of the person who compiled the kernel.  Thanks buildb, home everything's going well at yellow.
  • (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) The version of the compiler buildb used.
  • #32-Ubuntu SMP The type of the kernel (SMP means Symmetric Multi-Processing, which means the kernel makes use of multi-core processing)
  • Fri Apr 16 08:09:38 UTC 2010 The time and day that the kernel was compiled.

Git a minute: organize your email, the easy way

Get a lot of email?  Sometimes it hard to keep the inbox from growing.  It's tempting to go through it as quickly as possible, skimming the important stuff, saving some for later and deleting the rest.

Those last two things (saving and deleting) offer you some opportunities to get control of your inbox, rather than just getting through it. And if you do it strategically, you can do in in a minute, literally.

Each time you clear your inbox, take a minute to set up a filter that handles the saving or deleting of one message.

Here's an example: the online statement from your gas company, an investment account, or your mortgage.  If you use Gmail (or another web mail service) you can click:

More actions > Filter messages like these

And then set some rules for handling the message, like storing it for the day you pay bills, permanently storing it (if it's on autopay), or starring it so it's an obvious priority when the next one comes in.

You can do that in 60 seconds.

With some creative use of the filtering rules, you can be amazingly precise in what you do with what message, like highlighting a bill you have to pay, but saving or deleting the company's newsletter, even if they come from the same email address.  You can learn some tips and tricks here.

If you get Facebook alerts, you can star responses to things you've posted, save for later other messages and delete the list of birthdays.

If you commit to permanently handling one message each time you read email, in a week you'll notice how much faster you can get through your inbox.

Tuesday, May 24, 2011

Installing Gimp Plugins

If you ever want to install plugins for The Gimp, the image editing app, you'll have to first install the gimp-dev and glib-dev packages.  It's easy.  You can use the Synaptic Package Manager or apt-get.  But the names are tricky.  Instead of gimp-dev and glib-dev, they're called:

  • libgimp2.0-dev
  • libglib2.0-dev

Monday, April 25, 2011

Replace a Key on a Sony Vaio Laptop

The shift key popped off the keyboard on my laptop. Don't ask. It's a Sony Vaio VPCS111FM with a chiclet-style keyboard.

Putting it back on wasn't hard, it just took a little while to figure out.

After the key came off, I had a hole in the keyboard that looked like this.

And the key and a U-shaped pin that came flying off when the key went.

The underside of the key has two tiny clamps at the top: one for holding the pin and one for attaching the key to a bracket on the keyboard.  The top set of brackets is for the pin.

The pin just snaps into the upper set of clamps.

On the keyboard, theres are two upside-down-U-shaped brackets that you have to slide the legs of the pin into.

There's also a plastic bracket that I've lifted up with a screwdriver here.  It has two pins sticking out from the top that snap into the bracket clamps on the key.

You have to slide the legs of the pin into the brackets on the side, then snap the bracket clamps on the key onto the pins sticking out from the bracket.

I slid the pin into the holes, then slid the top of the key down into the hole in the keyboard so that the bracket clamps were just behind the pins on the bracket.  Then I used a small screwdriver to push the pins into the clamps until they clicked.  It's a very quiet click.

The picture shows how I had it positioned.  Didn't have enough hands to snap a picture while using the screwdriver to push the bracket pins into the clamps.  It's pretty straightforward though.  Just move the key and the bracket so the pins are right between the arms of the clamp, then push the pin in.

After that, just lower the bottom of the key and push down so that the bottom snaps into place.  Should be good until the next time you drop your computer.

Monday, March 14, 2011

Setting mailto: in Chrome and Ubuntu

I must have had an extension that made Gmail the mailto: app in Chrome. Mailto: is what automatically opens up a new email message when you click on an email address, helpfully inserting the address as the recipient.  After cleaning out some extensions I didn't think I used, mailto: stopped working.

No problem. Ubuntu has a convenient way to make mailto: work. It's called Desktop Webmail.

Applications > Internet > Desktop Webmail

That gets you a dropdown menu from which you can pick the webmail you use, like Gmail, Yahoo, etc.

Check Gmail (or whichever service you use) and clicking on an email link will open your mail service to a new message addressed to the address you clicked.

I'd show you a picture of the dropdown menu, but I can't. Below the dropdown menu there was a cryptic checkbox labelled simply "Ask again." I didn't know what it meant, but assumed it had something to do with asking which webmail service I wanted to use each time I clicked on an email address. I unchecked the box.

Now when I go to Applications > Internet > Desktop Webmail it opens Gmail instead of opening the menu. Apparently "Ask again" meant giving me the option of changing my default webmail service. Oh well.

Incidentally, if you don't see Desktop Webmail among your applications, you can install it from the repository or with:
sudo apt-get install desktop-webmail

Monday, February 28, 2011


The first thing I ever heard about Google's new keyboard was it's lack of a Caps Lock button. My response was instant and visceral. Years, wait, no, it’s decades, of inchoate anger and frustration suddenly came into focus. It hit me LIKE A TON OF BRICKS: I hate caps lock.

I do. I really do.

The caps lock button is a nearly useless imposition in almost exactly the wrong place on a keyboard.

Think about it. How often do you have to, or even want to, type something in all caps. And even when you’ve wanted to, did you really, after some reflection and hindsight, really want to. Or was it a juvenile outburst that ultimately detracted from what what you were trying to say. Like crying during a confrontation with your boss, or insulting someone’s mother during an argument (that’s not in any way related to the person’s mother).

Without the caps lock button, you would have had to hold down one of the shift buttons while typing each letter. That’s awkward. Appropriately awkward. Awkward enough that it forces you to think about the appropriateness of capitalizing every letter.

In this case, eliminating caps lock is like storing a rifle unloaded. Or counting to ten before replying.

And even if you could come up with a reason for having a caps lock button, why would it be right between two important and useful buttons like Shift and Tab; right where my little finger can tap it when I'm trying to capitalize a single letter (which serves a useful purpose) or tabbing (to indent or move to a different box in a form). How many times have I screwed up a log in because I accidentally hit caps lock and, as a result, typed my (hidden) password with lowercase and uppercase reversed.

Sure keyboards include a little LED to let you know that you've accidentally hit the caps lock button, but that's like building the Eiffel Tower so that you can put a red light on top of it so airplanes don't hit it.

No caps lock is an ingenious innovation. Sure it's nice to invent something new, but to accomplish something new by getting rid of something old, omnipresent and useless is a triumph of imagination. It's like Sherlock Holmes hearing the silence of the dog that didn't bark.

Not everybody is enthusiastic about living without caps lock. I listened to a Slate podcast with people complaining about it.

“We need capital letters,” one person said, as if Google were trying to ban capital letters altogether. I don’t believe that’s Google’s (note the G) intent or the effect of it’s action.

Want proof? I’m writing this on CR-48, using the very keyboard onto which Google ingeniusly eliminated caps lock. Note the capital letters at the beginning of sentences.

Capitalization can survive without caps lock. (Whether it can survive Twitter, instant messages, and Generation Y is a different issue).

Wednesday, February 16, 2011

It's all in a uname, if you use ` and not '

If you want know which Linux kernel you're running, you can just type "uname - r" (without the quotes) into the terminal -- we've been through that before.

You can also use uname to insert your kernel version into another command.  For instance, if you want to install the linux headers (which have to be the right ones for your kernel) you could use:
sudo apt-get install linux-headers-2.6.35-26-generic
Assuming that's the kernel you're running.

Unless you know the version off the top of your head, you can save yourself a step by putting uname into the command, as in:
sudo apt-get install linux-headers-`uname -r`
Seems simple, huh?  But there's a catch: those aren't single quotation marks surrounding uname -r.  They're backticks.

If you look closely, you'll see that they're ` and not '.  The backtick (aka grave accent) is often on the same key as the tilde (~) just under Esc on the upper left of the keyboard.

Stop that!

Sometimes it seems easier to start something from the command line than to stop it.  Ping, for instance.

To stop whatever you're running in the terminal, type:


That's it.

If the issue happens to be ping, you can do it preemptively, by limiting the number of pings.  Just use this command:

ping -c [number of pings you want]
as in:
ping -c 7