Changing Ubuntu startup splash screen

Tip of the day: To change the boot-up splash screen on Ubuntu (ex., the Ubuntu, kubuntu, xubuntu, etc. logos that are displayed before gdm/kdm fire up), `sudo apt-get install startupmanager`, then launch it from “System -> Administration > StartUp Manager”. Select the “appearance” tab, and choose the desired splash screen.

The StartUp Manager application also lets you tweak grub settings, in case you don’t care to edit the files manually.

Hiding an idle mouse cursor on Ubuntu

One of the obscure features of OS X that I love is that the mouse cursor hides itself when idle. By doing so, it stays out of the way when reading on-screen. When I made the shift to using Ubuntu at work, the non-hiding cursor was one of those little details that annoyed me. Of course, like most things on linux, someone else had the same opinion and has solved the problem already. The solution is a tool called unclutter (easily installable with a `sudo apt-get install unclutter`.)

Unclutter takes a few optional parameters. I like: `unclutter -idle 1`, which hides the cursor after one second of inactivity. The hidden cursor not eliminates the potential annoyance while reading on-screen, but may also serve to remind the user that keyboard shortcuts are faster anyway ;-)

For more, see: unclutter: hide the mouse cursor after a period of inactivity

Recovering deleted images from a Nokia N90 (Symbian OS)

Over the holidays we had an accidental deletion of every image on one of our phones (a Nokia N90, Symbian OS device.) Mild panic was quickly replaced with a gentle pondering on the difference between what a normal person would do in this situation vs. what a geek would do. The geek process goes something like this:

Step 1: Get the memory card out of the phone as quickly as possible

Either shut the phone down and pull the card, or use the super-secret combo hidden within the profile-switching shortcut to have the phone un-mount the card.

Step 2: Obtain a USB memory card reader

I’ve needed a reason to buy one of these for a long time. Good thing I had a gift card left from the holidays. I went with a Dynex gazillion-to-one card reader, not for it’s technical superiority, but because it was the only thing the shop nearby had.

Step 3: Stick the memory card into the reader, and plug the reader into your Linux box

Mine happens to run Ubuntu at the moment, but the results will likely be similar on other distros.

Step 4: sudo apt-get install testdisk

Testdisk “was primarily designed to help recover lost data storage partitions…” and includes a utility called “PhotoRec“, which is what you want.

Step 5: Run photorec

PhotoRec is a data recovery tool designed specifically for recovering files from digital camera media. It supports a number of file-system formats, including the FAT format that Symbian OS uses on it’s memory cards. PhotoRec is a text-based, terminal application, but it does the job perfectly.

Select the mounted memory card from the list of drives (which should be easy to spot given how small memory cards are relative to modern hard drives), and send it scanning. PhotoRec can be told to look for specific file types (you want JPG’s, in this case), but by default it will look for just about any media file format that you’re likely to have on your phone. Files will be recovered and written to a local directory.

Step 6: Sigh in relief when you see your beloved cat pictures returned to you

PhotoRec isn’t going to restore the images to the memory card’s file system such that the phone can see them again, but you’ll have the pictures on your Linux box now, and can copy them back over if you choose to. The naming scheme will be different, but that’s an acceptable compromise.

The Adruino Diecimila board supposedly h…

The Adruino Diecimila board supposedly has circuit protection to ensure that one doesn’t fry their computer accidentally, but just in case, I figured it might be better to use a spare machine for my Arduino hacking. I happened to have an older PowerBook that fits the bill perfectly; however, I run Ubuntu PPC on it, and it didn’t take long for me to realize that neither the Arduino OS X or Linux builds would work on it.

Not to be discouraged, some quick googling led to the instructions on patching up the OS X release for Ubuntu PPC. However, a little more googling dug up something much more interesting: Arduino from the Command Line [Update 10/08/17: Build Process.]

It’s not obvious while using the Arduino/Wiring IDE, but you’re really just writing C without includes and prototypes. When you save, the IDE patches up your code, then passes it to gcc-avr for compiling and avrdude for flashing. Therefore, if you’re so inclined (or happen to prefer vi and be on a non-supported platform), one can simply add the extra code manually and build/flash yourself.

The docs on this (linked above) tell the story, but they’re a little out of date (since they reference release 0007.) You still need to “sudo apt-get install gcc-avr avr-libc avrdude”, but after that, download the “Arduino 0009 installer for Linux” [the newest at the time of writing] instead, uncompress it, and look in “lib/targets/arduino/” for the Makefile and libraries you need. Read the comments in the Makefile — they explain it all quite well.

Once you stash the libraries somewhere handy, starting a new project goes like this:

  1. Create a new directory to work in
  2. Write your Arduino code as a *.cpp instead of a *.pde file
  3. Copy and modify the Makefile for your project
  4. Run ‘make’ to compile it
  5. Run ‘make upload’ to flash your code to the Arduino

It’s not as simple as the IDE, but it works, it lets you use any text editor you want, and gets you a little closer to whats going on behind the scenes.

For those curious, I’ve included an example of how the supplied “Blink” sample looks once modified for command-line building. It’s a bit longer… but still manageable:


/*
 * Blink (modified for command-line building)
 *
 * The basic Arduino example.  Turns on an LED on for one second,
 * then off for one second, and so on...  We use pin 13 because,
 * depending on your Arduino board, it has either a built-in LED
 * or a built-in resistor so that you need only an LED.
 *
 * http://www.arduino.cc/en/Tutorial/Blink
 */

#include <WProgram.h>

void setup();
void loop();
int main();


int ledPin = 13;                // LED connected to digital pin 13

void setup()                    // run once, when the sketch starts
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()                     // run over and over again
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}

int main() {
  init();
  setup();

  for (;;)
    loop();
	
  return 0;
}

Ubuntu + Hildon UI = in-Car PC UI

Awhile back, Ubuntu announced a mobile and embedded edition of it’s popular Linux distribution. The buzz was around the possibility of Ubuntu Mobile showing up on future UMPCs. The news caught my eye, but didn’t really get my attention until the plans for Ubuntu 7.10 (Gutsy Gibbon) were announced:

“Ubuntu 7.10 will be the first Ubuntu release to offer a complete mobile and embedded edition built with the Hildon user interface components” (developed by Nokia for the Maemo platform.)

Now that’s interesting. Could it be that we’ll see Ubuntu Mobile booting on Nokia N800’s? It’s certainly a possibility — and one that could bring a larger breadth of software to Nokia’s mobile Linux tablets.

However, as interesting as it may be if Nokia adopts Ubuntu, the possibilities for wider Hildon support didn’t hit me until my drive home today. It was one of those obvious moments. I had been using my Nokia N800 while walking to my car, so the touch- and small-screen friendly UI was fresh in my mind. Then I started thinking about my Car PC. It uses a 7″ touch screen and runs Ubuntu (a full distribution, with a UI designed for full-size monitors.) Running Gnome on my cheap, in-car 7″ monitor makes for a pretty lousy experience. Text is hard to read, and everything is too small to click on. However, if this news is right, Ubuntu 7.10 will change all of that. I’ll be able to run Hildon on my Car PC! That’s killer. Imagine having Canola running in-car, sitting on 100GB of multimedia…

ColorZilla conflict causes FireBug 1.0 to not display on FF 2.x on Ubuntu (update: getting better)

Just wanted to share this find: After the 1.0 update of FireBug last month, the extension stopped working for me on Firefox 2.0.x on Ubuntu. Thanks to a quick Google search, I found that FireBug conflicts with ColorZilla. After disabling ColorZilla, FireBug now works again.

(Via the comments in: Firebug 1.0: Public Beta, Still Free, and a Lite version for other browsers.)


Update 2007-02-08: The author of ColorZilla contacted me, and while we still haven’t isolated the problem, we did find that my ColorZilla extension was at version 0.8.x, and wasn’t finding the 1.0 update. After un-installing and re-installing ColorZilla, it is now somewhat more compatible with FireBug. Both extensions load, and everything except the ColorZilla Eyedropper works.

Update: It’s broken again… And once again, disabling ColorZilla got my FireBug working again. I don’t know which extension is causing the problem, but there seems to be a conflict.