Hello, and welcome to my blog! I post sporadically on random subjects from Linux to Emacs. Check out my tags if you want to browse posts on a specific subject.

If you want to be notified about new posts, this blog has an Atom feed feed. However, unless you want to read my every rant, you may want to subscribe specific tags instead, each of which has its own Atom feed. Most feed readers will correctly deduplicate entries so you shouldn’t run into any issues if you subscribe to multiple tags.

Change the notification icon in Mumbles without creating a plugin.

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I have noticed that several people have asked how to change the notification icon on mumbles without creating a new plugin.This is actually very simple: use the generic DBus plugin with dbus-send. I believe that this tutorial requires the SVN version but I may be mistaken. First add a new section to your DBus plugin configuration file. If you do not have this configuration file, copy the sample one from the mumbles source tarball (found on the project’s homepage). The file is called dbus.conf.sample. Copy this file to ~/.mumbles/dbus.conf. The new section is as follows:

[program-or-script-name]
enabled = true
interface = org.program-or-script-name.DBus
path = /org/program-or-script-name/DBus
signal = your-signal
icon = your-icon.png

Put your-icon.png in the ~/.mumbles/plugins/icons/ folder.your-signal is your name for the alert. None of these variables are important but they must be consistent.

After doing the previous and restarting mumbles, run this command:

dbus-send /org/program-or-script-name/DBus org.`*program-or-script-name*`.DBus.your-signal string:"Title" string:"Message"

Make sure that you replace all necessary variables. This will display a mumbles popup with your custom icon, title, and message. You can also specify a click action using launch = action.

Mumbles with gmail

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I have been playing around with mumbles lately and have written a gmail plugin for anyone interested. Mumbles is a notification system that works very much like growl for the mac. The latest SVN version can even replace the gnome notification daemon (but not very well). While still in its infancy, this project shows a lot of promise. I based the plugin on the evolution tutorial on project’s homepage. I based the script on this script (with many modifications). When you click on the notification popup, evolution will launch (you can edit the source to change the program). The script requires python-feedparser.

Plugin, Source, and Script package: gmail-plugin_mumbles.tar.gz

Installing the precompiled plugin:

Do step 2 from the next section. Now copy the plugin to ~/.mumbles/plugins/.

Installing the plugin from source (adapted from dot_j’s tutorial (gone)):

1. Download the source

Download the package and extract. Then open a terminal window inside the plugin-source folder.

2. Create the directory structure and choose an icon

Run the following command:

mkdir -p ~/.mumbles/plugins/icons

Then either run this to use the default evolution icon…

cp /usr/share/icons/hicolor/22×22/apps/evolution.png ~/.mumbles/plugins/icons

Or just copy your desired icon into the plugins/icons folder and rename it to evolution.png. This is unnecessary if you already have the evolution plugin.

Build and install the plugin

cd ~/gmail_plugin
python setup.py bdist_egg

This will use our setup.py file to create our plugin. After it runs, you should see a file named GmailMumbles-0.1-py2.5.egg in the dist directory that was created by the build process. Here the -py2.5 part of the filename refers to what version of python you are using (it may vary, but if you are able to start mumbles, should not matter).

The .egg file is our plugin, so the only thing left to do is copy that to the mumbles plugin directory.

cp dist/GmailMumbles-0.1-py2.5.egg ~/.mumbles/plugins

Installing the script:

Find the script in the package and edit the username and password variables. Run this script with python /path/to/gmail.py (replace /path/to with the path to the script). By default, this script will check for new email every 2 minutes and alert the user of new mail.

BTW: This script does not safely store the username and password. I may, in the distant future, make this script work with gnome-keyring but this is not likely. I hope that mumbles will soon get better notification-daemon support so that I can go back to using mail-notification.

OpenID: More accepters, less providers.

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I am noticing a very annoying and self-defeating trend with OpenIDs. The main purpose of OpenID is to allow people to have one login for multiple sites. OpenID is pointless if few sites accept it. This problem will correct itself eventually as more sites adopt OpenID. The biggest problem is the number of sites providing and not accepting OpenID. This defeats the whole purpose of OpenID. It is pointless to have a myriad of choices for OpenIDs if you can’t use them anywhere. Multiple OpenIDs for multiple sites just means multiple logins which is the very thing that OpenID is supposed to fix. I hope that many sites *ahem blogger* will soon start accepting OpenIDs as login credentials instead of just providing them.

General bug reporting rant

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I am starting to see this very often and find it very annoying: people report a bug, later they find a preexisting report for the same bug, they then mark that preexisting bug as a duplicate of their bug. I end up getting lots of “this bug has been marked as a duplicate of bug x” emails and this is VERY annoying. To prevent this people need to rigorously check for a preexisting report. Second, when you find two duplicate bugs, search the bug tracker for any more duplicates and mark all of the newest duplicates as duplicates of the oldest bug. This prevents chains of duplicates which in turn maximizes the efficiency of the bug reporting and fixing process.

Example:

Chained:

 report 1     ->    report 2     ->     report 3     ->     report 4
    |                  |                   |                   |
Commenters         Commenters           Commenters         All commenters
from report 1      from reports 1-2     from report 1-3

Non-chained:

report 1 ----\
 commenters 1 \
report 2 ------> report 4
 commenters 2 /   all commenters
report 3 ----/
 commenters 3

In the chained version commenters move from report to report wasting comments on bugs that will probably never be seen again after being marked a duplicate. In the non-chained version commenters move directly from the duplicate to the final (and oldest) bug report wasting as few as comments possible on the duplicates.

Linux + Razer Lycosa = WTF

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I broke my previous keyboard and went shopping for a new one (FYI: water + G15 == not good). I wanted another back-lit keyboard (like my previous G15). When I went to Best Buy (not my favorite store) I saw the slick Raser Lycosa Keyboard I decided to try it. My advice: don’t. While the keyboard itself is great (I like the low, rubber covered keys) the neither the the USB port nor the headphone jack worked on either of the keyboards that I tried (I returned the first one and tried the second one in the store). The problem: Interference. My computer refused to mount my USB flash drive while plugged into the Lycosa and the headphones buzzed (like a radio). I ended up getting the latest (annoyingly orange) G15 keyboard which works but I HATE ORANGE.

Inline Comments

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I Finaly got around to enabling inline comments. For help on this, follow this tutorial.

vCard viewer perl script

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I needed a simple way to view vCards in mutt and found a few Perl scripts that could parse and display vCards but none of them worked very well. I searched the ubuntu repository, found libtext-vcard-perl, and wrote a simple Perl script using this library.

I know almost no Perl. This script will not corrupt nor will it delete any of your files but it may fail to correctly display vCards. It is very unlikely that I will ever update this script.

Past this in vcard-view.pl:

#!/usr/bin/perl
# Copyright (C) 2008, Steven Allen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see //www.gnu.org/licenses/>.

# This program parses vCards and displays their contents in a
# human readable form.

# Import libtext-vcard-perl library
use Text::vCard::Addressbook;
use Text::vCard::Node;
use Text::vCard;

# Get card name
my $card_file = $ARGV[0];

# Create Addressbook
my $address_book = Text::vCard::Addressbook->new({
 'source_file' => $card_file,
});

#Loop through Addressbook
foreach my $vcard ($address_book->vcards()) {
 print "=" . ( "=" x 59 ) . "\n";

 # Name/Email
 print "Name:\n " . $vcard->fullname();
 $count = 0;
 my $emails = $vcard->get({ 'node_type' => 'EMAIL' });
 foreach my $email (@{$emails}) {
  if ($count == 0) {
   $space = " ";
  } else {
   $space = "  " . ( " " x length ($vcard->fullname()) );
  }
  if($email->is_type('home')) {
   print $space . "" . $email->value() . "> (Home)\n";
  } elsif ($email->is_type('work')) {
   print $space . "" . $email->value() . "> (Work)\n";
  } else {
   print $space . "" . $email->value() . ">\n";
  }
  $count++;
 }

 # Address
 my $addresses = $vcard->get({ 'node_type' => 'addresses' });
 print "\nAddresses:\n";
 foreach my $address (@{$addresses}) {
  if($address->is_type('home')) {
   print " --------------------------------\n";
   print "\t" . $address->street() . "\n";
   print " Home:\t" . $address->city() . ", " . $address->region() . "\n";
   print "\t" . $address->post_code() . ", " . $address->country() . "\n";
   print " --------------------------------\n";
  } elsif ($address->is_type('work')) {
   print " --------------------------------\n";
   print "\t" . $address->street() . "\n";
   print " Work:\t" . $address->city() . ", " . $address->region() . "\n";
   print "\t" . $address->post_code() . ", " . $address->country() . "\n";
   print " --------------------------------\n";
  } else {
   print " --------------------------------\n";
   print "\t" . $address->street() . "\n";
   print " Other:\t" . $address->city() . ", " . $address->region() . "\n";
   print "\t" . $address->post_code() . ", " . $address->country() . "\n";
   print " --------------------------------\n";
  }
 }
 # Phones
 print "Phones:\n";
 my $tels = $vcard->get({ 'node_type' => 'tel' });
 foreach my $tel (@{$tels}) {
  if($tel->is_type('home')) {
   print " Home:\t" . $tel->value() . "\n";
  } elsif ($tel->is_type('cell')) {
   print " Cell:\t" . $tel->value() . "\n";
  } elsif ($tel->is_type('work')) {
   print " Work:\t" . $tel->value() . "\n";
  } else {
   print " Other:\t" . $tel->value() . "\n";
  }
 }
 # URL
 my $urls = $vcard->get({ 'node_type' => 'URL' });
 foreach my $url (@{$urls}) {
  print "Web:\t" . $url->value() . "\n";
 }
 print "=" . ( "=" x 59 ) . "\n";
}

Running the "Ubunu System Panel" on a 64 bit machine.

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

After installing the 64 bit version of Ubuntu on my Dell Inspiron 1420n I found that the USP (Ubuntu System Panel) keybindings do not work. This is because the /usr/lib/python2.4/site-packages/usp/plugins/_keybinder.so is compiled for a 32 bit system. After a little searching I found out that Glipper includes a _keybinder.so file. After replacing USP’s _keybinder.so with Glipper’s version, the keybindings worked fine.

  1. Download glipper aptitude download glipper.
  2. Extract the glipper deb with dpkg-deb -x glipper_1.0-1ubuntu1_amd64.deb glipper (change glipper_1.0-1ubuntu1_amd64.deb to the name of your file).
  3. Copy in the new _keybinder.so with sudo cp ./glipper/usr/lib/python-support/glipper/python2.5/glipper/keybinder/_keybinder.so /usr/lib/python2.4/site-packages/usp/plugins/_keybinder.so.
  4. Restart USP with killall gnome-panel and your USP shortcut keys should now work.

Edit: This is no longer necessary.

Latte rant

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

I usually don’t correct my old blog posts from when I was in high school but… this one offends my coffee sensibilities. There’s no such thing as an espresso roast; the issue I described below is under-extraction. This is usually caused by not grinding the coffee fine enough, old beans, and/or not putting enough coffee in the portafilter.

I religiously drink decaf lattes (by “religiously” I mean every Sunday) and am becoming very annoyed with the common misconception that lattes are just coffee and milk. True lattes are not made with standard coffee beans, they are made with espresso beans. Espresso beans are roasted longer and thus are much richer but less bitter. Many so called coffee shops claim to sell lattes but use regular coffee beans in their espresso machine. The resulting drink is not a café latte. It is called a café au lait.

Here’s my plea: Coffee shops, please correctly label your drinks.

PS: If you go to Canada, bring your own espresso. I can’t find a decent Latte in all of Nova Scotia.

New Compiz transparency

Caveat lector: I wrote this post in high school; it’s likely outdated and poorly written.

This may not be new but, after upgrading compiz from git today, I noticed that certain windows (gnome-system-monitor and the AWN manager) were semi-transparent. See the screenshot:

Semi-Transparent Compiz Windows

Edit: As far as I can tell, the Murrine engine, not compiz, is not causing the transparency.