I’ve been annoyed by the Banshee notification area icon in Ubuntu for a while now. I’ve changed Ubuntu to use the darker Ambiance theme as opposed to the light (blinding) Radiance theme. I really like it, except that Banshee’s notification area icon displays the same with either theme, so it appears as a grey icon on an ugly white block.

I finally googled the issue and found these comments on the Ubuntu Forums. The wonderful Ubuntu community has created a replacement Banshee notification area plugin. The downside is that I’ve lost the notification popups that appear on song changes (which I kind of liked) and can no longer get a quick display/control area by hovering over the icon (which I never used anyway and actually found a little annoying).

All-in-all it’s a win for me!

Update 11/13/2010: Gah! Just after saving this post, I discovered that closing Banshee with this new notification icon in effect actually closes the program. With the default icon, “closing” the program leaves it running in the background while the notification icon stays in place, allowing you to control the “hidden” program from there. With the new community extension, this is no longer the case. A deal-breaker for me!!!

Update 11/14/2010: After upgrading to Ubuntu 10.10, all is well. The icon matches the rest of the supported notification area, and all functionality is intact. Phew!

I’ve been having trouble with a couple Java programs in Ubuntu, so I’m attempting to switch the Java Runtime Environment from the OpenJDK, which is default in Ubuntu, to the official Sun runtime. I found instructions, which I’ve followed with the following changes:

  • The partner repository was added through the GUI Software Sources utility (System menu -> Administration -> Software Sources, or from the Ubuntu Software Center, Edit -> Software Sources)

  • The sun-java6-jre and sun-java6-fonts packages were installed by searching in the “Canonical Partners” section of the Ubuntu Software Store. The sun-java6-plugin package was not found and not installed.

Here’s hoping things improve, and that there are no problems because of not installing the plugin package.

I’m giving Android development another shot, and had to install Eclipse and the Android Development Tools again. Note that this is all on a box running Ubuntu 10.4.

The Android Developers site is a plethora of information, including setup instructions, a developer guide and reference, videos, tutorials, etc. The following pages seem to be the most relevant when first getting started:

  • SDK Download and Quick Start, which includes a to-the-point SDK Quick Start guide
  • Installing the SDK is a more thorough version of the Quick Start guide, including next steps such as recommended reading and tutorials
  • A Hello, World tutorial, the recommended first step for new developers
  • A Notepad tutorial, the recommended second step for new developers
  • Developer Resources lists a few other tutorials that may be worth looking at

Here are the steps I took to prepare my development environment per the ‘Installing the SDK’ instructions:

  1. I followed (and updated) my old post on Setting up Eclipse and Android Development Tools in Ubuntu to install the required Eclipse packages, and install the Android Development Tools plug-in for Eclipse. This covers steps 1 & 3 of the Quick Start / Installing the SDK guides.

  2. For step 2 of the guides, installing the Android SDK, I downloaded the Linux platform SDK file from the SDK download page and unpacked it from the terminal with ‘tar xzvf [filename]’. I also added the SDK tools directory to my path, per instructions in the Installing the SDK guide.

  3. For step 4 of the guides, I ran the GUI ‘Android SDK and AVD Manager’ by typing ‘android’ at the terminal (the ‘android’ executable is in the SDK ‘tools’ folder). In the ‘Available Packages’ section, I installed everything. At this time, it included the SDK Platform and Google API packages for Android versions 1.5 - 2.2, the Samples for SDK API 7 and 8 (Android 2.1 and 2.2), and the latest Documentation package.

Note, I’ve let Eclipse use it’s default ‘~/workspace/’ path as my workspace, and I’ve unpacked the Android SDK into a folder under ‘~/dev/’. Also, the “Android SDK and AVD Manager” can also be launched from within Eclipse by selecting “Window -> Android SDK and AVD Manager”. You must first tell it where to find the SDK by going to “Window -> Preferences -> Android”.

From here I was able to successfully complete the “Hello, World” tutorial. Good luck, and happy coding!

Here is a Windows batch script to append a passed line of text to the specified file (prepending the text with a date/time stamp). The idea is to use it to capture your day’s activities in a daily log format. It’s especially useful when combined with a tool like Launchy.

@echo off

set MYDOCSPATH=[replace]
set LOGSUBPATH=[replace]
set FILENAME=DailyLog
set FILEEXT=txt

:: Generate date/time stamp
for /F "tokens=1 delims=/ " %%G in ('echo %DATE%') do set WEEKDAY=%%G
for /F "tokens=2 delims=/ " %%G in ('echo %DATE%') do set MONTH=%%G
for /F "tokens=3 delims=/ " %%G in ('echo %DATE%') do set DAY=%%G
for /F "tokens=4 delims=/ " %%G in ('echo %DATE%') do set YEAR=%%G
for /F "tokens=1 delims=:." %%G in ('echo %TIME%') do set HOUR=%%G
for /F "tokens=2 delims=:." %%G in ('echo %TIME%') do set MIN=%%G
for /F "tokens=3 delims=:." %%G in ('echo %TIME%') do set SEC=%%G
if %HOUR% LSS 10 set HOUR=0%HOUR%

if "%*"=="" (
echo No log message provided.  Displaying contents of log file.
) else (
echo Writing log message: %*

echo %MESSAGE% >> "%LOGFILE%"
echo ----------------------------------------------------------------------
type "%LOGFILE%"
echo ----------------------------------------------------------------------


Since switching to Ubuntu as my primary OS, I’ve been lax in setting up an automatic backup of important files. I finally got around to it this weekend, using a combination of cron (via Gnome Scheduler), 7zip, some simple shell scripting, and the Dropbox application for linux.

At this point, I’m not concerned about backing up every little thing. Just the file-based equivalent of “what would you grab if the house was on fire”. So no music, videos, or large amounts of photos for this. And, of course, some of these files will be sensitive or personal in nature, so I want to make sure they’re encrypted. Dropbox does a fine job of encrypting the files they store, but they’re still just a password hack away from public access, so providing a second encryption password for sensitive data is at least a step towards more protection.

So let’s get this set up…

First things first, I installed the Dropbox client for linux. Dropbox creates a folder in your home directory that is automatically backed up to their servers, and is synced among any other computers or devices connected to your account. They have clients for the three major platforms (Win/Mac/Lin) plus iPhone and Android apps. You can check out their website for instructions or more info.

Second, I installed 7zip (search “7zip” in the Ubuntu Software Center) to get the best compression rate. I don’t want to eat up more of my limited Dropbox storage than I need to. I got some help on the 7zip command-line options from (what else?) the man page.

Next, I created a shell script to create a compressed and encrypted archive of any specified folder:


if [ -z "$1" ]; then
echo usage: first parameter must be a target filename
if [ -z "$2" ]; then
echo usage: second parameter must be the folder to backup



Note the use of the “-mhe=on” switch to encrypt the archive header, which includes the list of files in the archive. And also the use of “-mx=9” to enforce the highest level of compression.

I also created another script which calls this one multiple times, once for each folder I want backed up. I’m quite the shell script novice, so there are probably better ways to do this. Perhaps with a function and by reading the filename and a list files to archive out of a text file. I’ll get around to it eventually (maybe).

Finally, I set up this script to run daily using Gnome Scheduler (a GUI frontend for cron). Search “Gnome Scheduler” in the Ubuntu Software Center. Here’s a nice overview of the tool. For those who wish to apply their command-line kung fu directly to cron and the crontab, this page from the Ubuntu Community Documentation may be of use.

There are some things to keep in mind with this backup option. There are certainly more secure backup options available. Although Dropbox uses high-end encryption when it stores your files on their servers, anyone with your Dropbox account password can access your files through the Dropbox website. So your files are only as secure as your account password. Adding a second level of encryption with 7zip is a step in the right direction, but of course you should be sure not to use the same password for 7zip encryption and for your Dropbox account. All in all, though, this seems like a decent trade-off between security and ease-of-use.