Image of the glider from the Game of Life by John Conway
Skip to content

OpenID Comments Working

After much sweat, pain and tears, I have finally nailed down the source to my troubles with OpenID on my blog, specifically when commenting on posts. It turns out that Filosofo Comments Preview plugin is the culprit, causing a “You must submit a comment using the comment form” error. The plugin hasn’t been updated in about 18 months, so I wonder if the developer has abandoned the project? Anyway, disabling the plugin brings OpenID full swing to my blog. It works, and it works well. I know there have been other blog installations where OpenID commenting has probably ruined your experience to OpenID, my blog included, but hopefully, now that it’s fixed, I can help provide a positive experience.

Breakfast, Anyone?

I’m constantly amazed to read, over and over again, about people who don’t “tweet”, because they don’t care what you had for breakfast. When I first heard about Twitter in early 2007, I had the same feeling. What am I supposed to do? Tell people when and what I’m eating, how often I’m using the restroom, and what time I went to bed? It seemed so pointless to broadcast my life in such a way. Why in the world would anyone care what’s going on in my personal life?

Then, while working for Guru Labs, I was on the road with Christer, another guru, and he was using it rather intensively. After dinner one day, and heading back to the hotel, he called me over to his room to hack on some stuff for our classes. In the meanwhile, he was go, go, go on Twitter (back then, they rocked it hard with a Jabber bot. They’ve since ditched the bot, and as a result, my interest in using it).

Him: “Dude, you need to get on Twitter. It’s a lot like an IRC room. Just post something, and people following you will likely reply if it’s interesting enough.”
Me: “So, I just tell people I’m having a burger for dinner, or that I’m about to take a shower, and people are supposed to care?”
Him: “Would you post that in an IRC channel?”
Me: “I guess not.”
Him: “Here’s the thing: start following others that you would be interested in keeping up-to-date with, like those in an IRC channel. They’ll likely start following you in return, especially if they know you. Eventually, you’ll have enough people to start a conversation with. Then, post something, and see if replies come back in. You know, stuff like what you would read on Techdirt, why the latest random distro sucks, etc. You know, stuff you care about that others can relate with. The conversation will just follow.”

He was right. I started following people first that I already knew personally. Mostly, those in the Ubuntu community. Then I started finding others that I didn’t know too well, but knew that their nerd level was on par with mine. As I started following others, people started following me. Then, the test- posting something. I don’t recall what I posted, as I ended up deleting my account in favor of Identi.ca (which I re-opned later, but lost my nick, my posts, and those I followed), but I’m sure they were awkward.

Then it hit me. When I found cool posts online, I usually shared the URL with an IRC channel I was in. Instead, I started sharing that link on Twitter. Sure enough, it would usually garner a reply. Then, a conversation would ensue. Before long, I “got it”. Twitter was nothing more than a platform for casual, off-the-cuff conversation. It wasn’t about what I was eating for breakfast, as much as it was discussing current topics, trends, fads, and such that I and my followers were interested in. As Christer mentioned, it was just like IRC, except rather that starting a conversation with a very limited set of people, it was being broadcast to anyone who could see my public profile, and people could subscribe to that feed if they liked what they read. Further, it was nothing about what I was eating for breakfast. Instead, it was all about having conversations with people I wouldn’t normally converse with.

Of course, if you know your Twitter history, you know it finally found its fame when celebrities started using it. People wanted to get closer to celebs. Celebs want to get closer to their fans. Then TV stations, news, weather, and just about anything and everything hit the Twitter trend. And rarely, since I’ve been on it, do I see people broadcasting what they had for breakfast. I see hurricane updates, earthquake news, when and where my favorite music artists will be, discussions, arguments and flames over some certain technology and on and on. Twitter has been the biggest platform for discussing the World Cup. Follow your favorite sports team, player and stats. Check out http://hashtags.org, and you’ll see what I’m talking about. It’s really quite remarkable.

So, it never ceases to amaze me those who don’t understand the technology, or the Luddites fighting against it, keep saying “I don’t care what you had for breakfast”. Is it really hard to understand how to use a microblogging service? Let me guess. You probably don’t have a Facebook account either, right? Don’t get me wrong. I’m not saying everyone should jump on the social bandwagon, but if you aren’t using the service, because you think it’s nothing but vain, self-proclamations and promotions, then it’s clear you don’t “get it”, just as I didn’t back in 2007.

There are a number of reasons why Twitter, Identi.ca, Facebook, and other microblogging platforms will be successful over and over:

  • Keeping in touch with those you care about
  • Getting caught up on the latest news
  • Looking for a social outlet beyond your current lifestyle
  • Using it when other methods of conversation would fail (maybe you’re a mute)

Sure, as with any service, there are those that abuse it, and people who have used a microblogging platform knows that there is some noise to come along with it. But, when you learn how to use the tool effectively, it’s rather trivial to filter out the noise, and get a high degree of signal.

I use it entirely for conversation and news. I am an IRC junkie, and hang out in far more channels than I would care to admit. I do it for the social conversations, as well as support and providing support. Identi.ca and Twitter are that for me. A place to converse when I want to converse. It’s a place for news, when I’m in the mood to keep up-to-date (along with RSS and email. No, I don’t watch TV). I’ve even used it to get deals when travelling and scheduling appointments with friends. Heck, I recently became a ham radio operator for similar reasons.

So, to each their own, but if your problem with Twitter is not caring what people have for breakfast, then it’s clear that you don’t know what you’re talking about and you haven’t used the service. But then again, unless I ask, I’m likely not interested in your opinion anyway. I definitely won’t try to “convert” you. :)

Using Symantec NetBackp With A Fedora 12 Live CD

At work, we use Symantec NetBackup for all our full and incremental backups to tape. With currently about 100 servers in operation, and roughly 300+ virtual development environments on the horizon using RHEV, NetBackup and Bare Metal Restore, also from Symantec, will be crucial in our operations.

Recently, we had some virtual servers take a dive, because the disk array they were on took a dive, and with it, all the storage that these VMs were relying on for their OS and other needs. So, we’ve been building these machines back up from backup on a new NetApp SAN. Everything has been working well with Bare Metal Restore for Windows VMs, but we were struggling getting it to work with RHEL. So, I got the idea to boot up a Fedora 12 Live CD, install the NetBackup client in the live environment, and do a restore from there, then reboot into the newly built machine.

Works like a charm! So, I documented the steps necessary to make it work. Realize, that this was documented for my place of employment. Of course, I’ve completely changed the hostnames, IP addresses, and other details that would be specific to work. However, if you deploy this in your environment, then you’ll need to make the necessary architectural changes that fit your needs. Also, this should work with Fedora 13, the latest release at the time of this writing, but Fedora 12 works well for us, and because it’s used just for this purpose, we see no pressing need to use the latest. Also, Debian or Ubuntu, or some other GNU/Linux based operating system might work as well, but NetBackup doesn’t support these operating system necessarily, and it is expecting the filesystem layout that is common with Red Hat based operating systems. Regardless, Fedora 12 is being used as a tool here, not because of any loyalty or fanboyism.

So, here’s the tutorial:

Fedora can be used as a temporary live environment for NetBackup when doing restores to RHEL machines. Just boot from the Fedora ISO or CD, and make sure you have configured networking appropriately, and that you can get out to the Internet. After that, follow the instructions below. This does assume that you have a base, bare-bones, RHEL install that matches the partitioning or volume layout of the previous install that you’re restoring. This must be completed first, because at the end of the tutorial, you will be mounting these devices, and restoring only the files, to these mount points.

First, the liveuser can get root access without any password. However, for this tutorial, you will need to set a password for root, so go ahead and do that:

[liveuser@localhost ~]$ su -
[root@localhost ~]# passwd
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# 

At this point, we need to setup the hostname and networking correctly. We have set aside the ‘netbackup.example.com’ domain name for the Linux restore system in our DNS environment, and the IP address that has been set aside is ’10.19.84.254′. In the terminal as root, set the hostname:

[root@localhost ~]# hostname netbackup.example.com
[root@localhost ~]# export HOSTNAME="netbackup.example.com"

Now get networking configured with NetworkManager. In the status bar of the desktop, there is an icon that looks like two computers. Right click this, and click “Edit Connections…”. Click “Auto eth0”, click the “Edit…” button, click the “IPv4 Settings” tab, and set the parameters as necessary:

Method: Manual
Address: 10.19.84.254
Netmask: 255.255.255.0
Gateway: 10.19.1.254
DNS servers: 10.19.2.192, 10.19.3.192, 10.19.4.192
Search domains: example.com

Click “Apply…”, and enter the password for root, then close the “Network Connections” widget. The icon looking like two computers should have a red “X” next to it now. This means it’s not online. Left-click the icon, and click “Auto eth0” to get it back online. Back in your terminal, you should be able to verify that the networking has been set correctly:

[root@localhost ~]# ip a show eth0
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1a:4a:06:14:24 brd ff:ff:ff:ff:ff:ff
    inet 10.19.84.254/24 brd 10.5.31.255 scope global eth0
    inet6 fe80::21a:4aff:fe06:1424/64 scope link
        valid_lft forever preferred_lft forever
[root@localhost ~]# ping -c 4 mediaserver.example.com
PING mediaserver.example.com (10.19.84.60) 56(84) bytes of data
64 bytes from mediaserver.example.com: icmp_seq=1 ttl=64 time=0.942 ms
64 bytes from mediaserver.example.com: icmp_seq=2 ttl=64 time=0.230 ms
64 bytes from mediaserver.example.com: icmp_seq=3 ttl=64 time=0.193 ms
64 bytes from mediaserver.example.com: icmp_seq=4 ttl=64 time=0.212 ms

--- mediaserver.example.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rrt min/avg/max/mdev = 0.193/0.394/0.942/0.316 ms

In order for the NetBackup client to communicate with the media server (mediaserver.example.com – 10.19.84.60), we need to make a modification to our /etc/hosts file, and add it’s IP address and hostname:

[root@localhost ~]# echo "10.19.84.60      mediaserver.example.com mediaserver" >> /etc/hosts

With networking correctly set, we need to start up the SSH server:

[root@localhost ~]# service sshd start
Generating SSH1 RSA host key:                              [  OK  ]
Generating SSH2 RSA host key:                              [  OK  ]
Generating SSH2 DSA host key:                              [  OK  ]
Starting sshd:                                             [  OK  ]

Because this is a temporary live environment, we’re not interested in SELinux nor any firewall. So, let’s get those disabled first:

[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules                                [  OK  ]

At this point, you should verify that you can SSH to the Fedora live environment from another host. It should work. However, we still have more work to do. Before we can get the NetBackup client installed, we need to install a few packages. So, in your terminal, type the following:

[root@localhost ~]# yum install glibc-2.11-2.i686 libacl-2.2.47-5.fc12.i686 libstdc++-4.4.2-7.fc12.i686

This will download about 30MB of packages and metadata necessary for installation. Depending on your Internet connection, this might take a while. If you don’t want to wait, you could change the repo files in /etc/yum.repos.d/, and use a faster mirror. Or, you can wait. After the packages are installed, and everything configured, we should be able to install the NetBackup client. To do this, we need to SSH to mediaserver.example.com, and send the client over. You can do this from the terminal you’ve already been working in:

[root@localhost ~]# ssh mediaserver
The authenticity of host 'mediaserver (10.19.84.60)' can't be established.
RSA key fingerprint is 14:d3:50:f1:27:d5:14:ab:c2:ca:51:fa:7e:5a:98:4c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mediaserver,10.19.84.60' (RSA) to the list of known hosts.
root@mediaserver's password:
[root@mediaserver ~]# 

Now transfer over the client. First, mediaserver.example.com will likely have the wrong SSH key for this box on file, as you might have done this more than once, and every time you boot into the Fedora 12 Live CD, and start up the SSH server, a different key will be generated. You will need to delete it:

[root@mediaserver ~]# cd /usr/openv/netbackup/client/Linux/RedHat2.6/
[root@mediaserver RedHat2.6]# ./sftp_to_client netbackup.example.com root
Connecting to 10.19.84.18...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
89:db:1f:12:f9:8f:76:38:63:6e:54:75:7a:43:ed:9e.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:4
RSA host key for netbackup.example.com has changed and you have requested strict checking.
Host key verification failed.
Couldn't read packet: Connection reset by peer

sftp connection to netbackup.example.com failed.

Notice, that it says the offending key is on line 4 of /root/.ssh/known_hosts. So, I’ll delete line 4 from that file:

[root@mediaserver RedHat2.6]# sed -i 4d /root/.ssh/known_hosts

Now, try again:

[root@mediaserver RedHat2.6]# ./sftp_to_client netbackup.example.com root
Connecting to netbackup.example.com...
The authenticity of host 'netbackup.example.com (10.19.84.254)' can't be established.
RSA key fingerprint is 4d:74:e6:66:ed:d9:bc:dc:3a:71:41:51:18:58:da:e9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.19.84.254' (RSA) to the list of known hosts.
root@netbackup.example.com's password: 

sftp completed successfully.

The root user on netbackup.example.com must now execute the command
"sh /tmp/bp.22802/client_config [-L]".  The optional argument, "-L",
is used to avoid modification of the client's current bp.conf file.
[root@mediaserver RedHat2.6]# exit
[root@localhost ~]#

Now that we are back in the live environment, we can execute the command as given us from mediaserver.example.com. Of course, the name of the file transferred over might be different. First, let’s get xinetd running:

[root@localhost ~]# service xinetd start
Starting xinetd:                                           [  OK  ]
[root@localhost ~]# sh /tmp/bp.22802/client_config

It will spit out a bunch of files and directories that it’s installing for the client, and will reload the xinetd server. All that is left, is to start the NetBackup client, and we’re finished!

[root@localhost ~]# service nbclient start
NetBackup SAN Client Fibre Transport daemon started.

Verify that the default NetBackup ports 13722, 13724, 13782 and 13783 are bound to the system:

[root@localhost ~]# lsof -Pan -i tcp | grep 137
xinetd   3261 root    5u  IPv6  22914      0t0  TCP *:13782 (LISTEN)
xinetd   3261 root    6u  IPv6  22915      0t0  TCP *:13722 (LISTEN)
xinetd   3261 root    8u  IPv6  22916      0t0  TCP *:13724 (LISTEN)
xinetd   3261 root    9u  IPv6  22917      0t0  TCP *:13783 (LISTEN)

At this point, you should be able to login to the NetBackup Administrator Console, find the netbackup.example.com client, and verify that they can talk. The only thing that you should be aware of, is that you need to mount all logical volumes and partitions to their respective mount points BEFORE the restore! This is important! When in the NetBackup Administrator Console, and doing the restore, you restore the files to a specific mount point. In our case, it’s going to be ‘/’. This means, that if the host has separate /var, /u01, /, /home and other mount points, they all need to be mounted to their respective mount points BEFORE doing the restore!

[root@localhost ~]# mount /dev/work/root /mnt
[root@localhost ~]# mount /dev/work/var /mnt/var
[root@localhost ~]# mount /dev/work/u01 /mnt/u01
etc

CONGRATULATIONS! At this point, you’re ready to start restoring the data using NetBackup in the Fedora 12 live environment. Just remember, that when you’re in the NetBackup Admin Console, you need to restore the data to netbackup.example.com, and the directory path you need to use should be /mnt, not /, obviously.

I hope someone on the remote corners of the Internet finds this tutorial helpful. If so, let me know if the comments. If there are any spelling errors or I’ve missed something giving away detail of my works, also let me know so I can make the corrections. Thanks!

MzMgWWVhcnMgT2xkIGFuZCBDb3VudGluZwo=

Believe it or not, you can figure this out on any Unix-like operating system. Should keep you guessing for at least a few minutes. :)

by9+IFlvdSd2ZSBoYWQgYSBiaXJ0aGRheSwgc2hvdXQgaHVycmF5ISBXZSB3YW50IHRvIHNpbmcg
dG8geW91IHRvZGF5LiBPbmUgeWVhciBvbGRlciBhbmQgd2lzZXIgdG9vLiBIYXBweSBCaXJ0aGFk
eSwgdG8geW91ISBvL34K

My New Hobby – CW

The day before Mother’s Day, my family went up to the Golden Spike National Monument. We went through the museum, checked out the exhibits, and they even had a reenactment of the ceremony there on Promentory Summit. It was a fun day. On the way back to the car, I head some radio operators:

CQ CQ CQ. This is KB7MRL. Over. CQ CQ CQ. This is KB7MRL. Over.

Contact was made, a short conversation ensued, and they went on to the next band. I knew immediately they were hams, and I wanted to check out their rig, where they were from, and how long they had been doing amateur radio. They were handing out Golden Spike QSL cards to anyone they could make contact with. So, I headed over to their pavilion, chatted with them for a bit, then went back to my family for lunch.

During my meeting, they gave me a couple ARRL magazines, their personal QSL cards, and a Morse Code CD (bundled with Windows software). I’ve always been interested in learning Morse (commonly called “CW” for “continuous wave”), ever since I was a scout. So, recently, I decided to set to the task of learning it. Why, you ask? What’s the point, when we have the Internet, cell phones, satellites, and other forms of communication? My answer: I like a good challenge, and I just want to see if I can learn it. I can still get involved with satellite radio, and packet radio.

So, I fired up the software, and set to task. I’m learning CW using the Koch method, which means learning the number of characters I want, at the target speed I feel comfortable with. So, I set with 10 WPM, and I’m up to 7 characters: ABHJMTW, with about 90% accuracy. I’m hoping by the end of the month, I’ll have the entire alphabet down at 10WPM, where June I can focus on doubling the speed, as well as reaching the assigned 40 characters of CW. Maybe that’s a bit optimistic. We’ll see.

Eventually, I’ll set the goal for getting my Amateur Extra license here in the States. I understand that CW is no longer a requirement for obtaining that license, and as already mentioned, that isn’t the reason for me learning CW. However, when I do get my license, and eventually a rig setup, I would like to chat on the CW-only bands from the outset. So, becoming proficient with CW before then is important to me.

I’m not sure how my wife will enjoy me picking up a new hobby, especially seeing as though I have so very little time in my life for anything, let alone a hobby. She probably won’t be excited about me setting up my ham shack when we move. But, on the flip side, she’s always complaining that I spend too much time on IRC/IM, so maybe this can take that place. After all, hams step up for public service when they can, win awards, and just enjoy good company. It’s a bit more involved than IRC, with actual purposes, so we’ll see. Maybe she’ll get her license as well. I know I would like to see my daughter licensed. That would be cool.

So, anyway, there you go. Learning CW for fun. I’ll keep progress on this blog as I go along. No promises, or threats, on the frequency of the posts.

Happy Open Discussion Day, 2010

I almost let today go by without blogging about Open Discussion Day. Of course, lately, I haven’t been doing much blogging at all, which is entirely out of my person, but anyway, let’s get onto the festivities.

First, so you understand, Open Discussion Day started back 4 years ago when Ploum first blogged about showing support for open protocols, such as Jabber/XMPP (using Google Talk, jabber.org, and others). I’ve blogged about it in the past, even though I missed blogging about it last year.

You can start with by checking out the page http://www.opendiscussionday.org. There, you’ll find a wiki that has some information on how to get started with open communication platforms, protocols and software. Given the ways we communicate with each other on the Internet and elsewhere, it makes sense to advocate supporting these open platforms. Here’s a brief, non-exhaustive list of various open protocols worth checking out:

  • Jabber/XMPP- Jabber/XMPP is probably the most successful open communication platform to date. According to Wikipedia, it has more than 50 million active users, mostly on the Google Talk/Gmail service. It’s supported on Windows, Mac and Linux. It’s a federated protocol, which means Jabber/XMPP can communicate across different domains. It uses SSL encryption by default, which means your communication is secure, and most of the clients are free, and solid applications.
  • OMB- The Open MicroBlogging protocol was started in response to Twitter. Rather than being tied to a particular vendor for your status updates, Laconi.ca, now Status.net, launched and announced they would provide an open, federated, protocol for broadcasting your “tweets”, following others, and others following you. Identi.ca was their product, and it has proven to be very successful, and the open platform has sparked a number of other microblogging servers, all in tight communication. http://army.twit.tv, http://brainbird.net, and others are based on this code, and can all communicate together. Lastly, there are a number of microblogging applications that support Identi.ca, and the others. You can follow me at http://identi.ca/eightyeight.
  • IRC- Internet Relay Chat is one of the older forms of open communication in this list, except for email. It uses TCP for the transport protocol, and optionally SSL/TLS for encrypting your communication. As with everything else is this list, IRC is federated, meaning connecting multiple IRC servers together, and communicating transparently. Freenode is probably one of the more common IRC servers for open source projects. OFTC, EFNet and UnderNet are popular as well. There are many IRC clients out there that can get you chatting on any number of different IRC networks at the same time. My personal favorite is Irssi, a text-based client.
  • Email- The last, but definitely not least, however the oldest, and probably most ubiquitous. Everyone is familiar with email, and it’s rare to find people these days that don’t have an email address. It too is federated, meaning you can send an email from gmail.com to hotmail.com, without thinking about it. Many open protocols have been built around email, including SMTP, IMAP and POP, as well as their secure, encrypted versions. As much as the Internet would like to see email die, I personally think it will be around for quite some time. The only thing I would ask, is that people stop sending proprietary attachments to their message, bottom post, trim unnecessary cruft from the mail, and write in plain text (I think I might be reversing my stance on HTML email- we’ll see).

Of course, there are many closed discussion platforms and protocols, such as Twitter, Facebook, Skype and MSN/AIM/ICQ/Yahoo. It’s important to note that you don’t own your data on these services, unlike the ones I’ve mentioned above. You are subject to vendor lockin, and everyone else must use those services too, as they don’t communicate with each other. But, we’re about the open discussion protocols, not the closed ones, so let’s continue.

I’m sure there are many other open communication platforms that would be worthy discussing in this post. I chose what I feel to be the biggest and most successful of the open protocols. The future will tell what else we see in this arena, but right now all I can say, is we have a great deal of options for supporting an open protocol, many of which are doing very, very well. If you have other open communication protocols that you use, make sure you specify them in the comments, or add them to the Open Discussion Day wiki. For the record, I fully support all the open protocols/communication platforms, and you can find me on any of the protocols listed above.

Happy Open Discussion Day, 2010!

My ZSH, Irssi and Screen Themes On White And Black Backgrounds

Now that school is out for the summer, I have a bit of time to work on some of the themes I’ve created for my ZSH prompt, Irssi and GNU Screen. The first focus of mine was to get all themes working well with both white text on black backgrounds, and black text on white backgrounds. I’ve been leaning more and more to black text on white background colors for my default terminals, so I wanted to make sure that everything I was using day-to-day looked good with that setup.

First, my ZSH prompt was already developed from the outset with that in mind. So, no additional hacking has been needed on that. There are some elements that I’m not too terribly excited about. I don’t care for the dark blue directories on a black background, and I don’t care for the yellow character devices on a white background. Using the Tango scheme for gnome-terminal makes both of those scenarios much more tolerable. However, I do have additional items that I want to put in my prompt, but that will be for a later post. Also, my GNU Screen hardstatus line also needed to be compatible. This wasn’t that big of a deal, as I only needed to apply some colors to a few elements. Hhere’s a couple screenshots showing both black and white backgrounds, and how the ZSH prompt inside looks in each. Note the GNU Screen hardstatus line is at the bottom of the terminal.

From Desktop Screenshots
From Desktop Screenshots

Second, my Irssi theme also needed to work well with both. As I’ve already blogged before, I was really, really impressed with the madcows theme. However, I didn’t care for a few elements, so I started hacking it, making my own changes. I’ve tried keeping the true nature of the theme, while still adding my own style. The theme was already largely compatible with my ZSH prompt colors, it just needed some adjustments here and there, before I was totally satisfied. Further, it looked like crap using a white background, so this needed some hacking as well. I think I’m overall happy with the result, although I’m sure I’ve missed many things (like DCC, or CTCP), so there’s likely much more hacking to go before it’s perfect. However, for the general day-to-day chat, it’s 95% there. Screenshots for both backgrounds below:

From Desktop Screenshots
From Desktop Screenshots

In a nutshell, the themes are compatible with xterm-color support on most terminals. Mainly, I’m using bold and normal weights on red, green, yellow, black, white and blue. Anything else takes the default color of the terminal itself, whether it be the foreground text or the background. So, as long as your TERM variable is set to “xterm-color” or something better, you should be okay.

This post wouldn’t be complete without the source for you to try it out. Here’s a compressed tarball for giving it a shot, and reporting anything you find in the comments, if you like.

Cheers!

Chromium Removing http://

A recent build of Chromium removes “http://” from the Omnibar in the browser, and replaces it with a globe icon. As a result, typing “http://www.google.com” will result in “www.google.com/” being displayed, rather than the full URI. There’s been a lot of heat and discussion about this, and near and far as I can tell, people just plain don’t like it. At least the vocal minority doesn’t. From what I’ve pieced together, here are the reasons the developers have removed “http://” from the display:

  1. The browser uses HTTP as its default protocol. Any other protocol, such as HTTPS, FTP, etc is not default.
  2. It’s already understood that HTTP is the default protocol of the browser by users.
  3. Displaying “http://’ is redundant information, as the user is already aware of #2.
  4. If the user is not familiar with #2, then why does it need to be presented at all? Why clutter the interface or display “geek code” to the average user?
  5. Removing “http://” from the OmniBar removes the redundancy, while keeping the browser behavior and user interface entirely in tact.
  6. The browser will display other protocols that isn’t default to the browser, such as “https://” and “ftp://”.

Fact of the matter is, the Chromium developers aren’t going to revert the change. I’ve read all the comments I can find on this matter, and here’s an overall summary:

It’s UGLY!
After seeing “http://” in every browser on the market since browsers have been used, as soon as it’s removed, it seems there’s a big gaping hole in the address bar. For some reason, it keeps their eyes floating back to the address bar, wondering what had happened and why it was changed, when it wasn’t hurting anything to begin with. In other words, displaying “http://” is sexy, and removing it is not. Either that, or they feel that there’s a big void in their life with it missing.

It breaks other applications with copy and paste
By removing “http://” from the Omnibar, when copying a URL to the clipboard, and pasting it into other applications, these applications may or may not be able to recognize the URI, and as a result, not make it “clickable”. However, there have been no use cases submitted of such breakage. No one has come forth saying “Application X won’t linkify a URL pasted without http:// in front”. Plenty of speculation about it, however. Plenty. But, what appears to be the problem, isn’t Chromium, but either your operating system, or the application you’re pasting your URL to. You see, Chromium will present a web object to the operating systems clipboard. If the operating system is worth its weight in gold, it will preserve the web object, and present the object to the pasting application.

So, at this point, it’s up to the application how it wants to handle it. Every email and IM client that I can test, including office document creators, treat the web object as it should, and linkifies the paste, even though “http://” isn’t part of the paste. If an application exists that doesn’t linkify the paste, it should be brought to that developer’s attention. After all, it’s the problem of their application, not Chromium. Think about it. Do you type “http://www.google.com” when chatting with your buddy, or just “google.com”. So, not only should the client recognize clipboard web objects, but it should also recognize partial URI schemes.

It doesn’t adhere to specification
This is semi-valid. At least people are concerned about Chromium adhering to spec. The specification is the URI scheme includes a scheme name, such as “http”, “ftp”, “smb”, etc, as well as an authority, path, query and fragment. So, by not displaying the scheme name in the Omnibar, Chromium is not adhering to specification. The problem with this argument, however, is that the specification is really only dealing with applications referencing a URI, through another program, source code, etc. What is displayed visually to the user shouldn’t matter if it’s “breaking spec” or not. I tell you right now, your mom isn’t going to care if her URI is valid specification.

Observations
Frankly put, I’ve been all over the mailing list and on the bug report trying to explain to people soundly and logically why the move was made, and why the Chromium developers aren’t going to revert the change. As I outlined above, no one, other that developers and Internet geeks, are going to notice, if they haven’t caught wind already. If the change is indeed breaking applications, then the developers need to know what is breaking and how. What they don’t want is a bunch of whining, moaning and threats that you’re going back to Firefox. That doesn’t help. If copying and pasting is broken in other applications, let them know what application is broken, and how it broke. You know, bug reports. Actual, solid, bug reports.

Currently, there is a regression. When removing “http://” from the Omnibox, copying the URL didn’t include “http://” in the clipboard web object. So, a paste wouldn’t show it either. So, they added “http://” to the clipboard on copy. However, something else broke this behavior, and as it sits, a copy and paste will not give “http://” in the pasted result. However, this has been marked as release critical, so the next stable push likely won’t go out until this is fixed.

Conclusion
Personally, I welcome the change. Knowing the default protocol of your software may or may not be important, but I don’t think the software really needs to communicate that to you. Think of your email client. It communicates over SMTP, IMAP and POP3, sometimes simultaneously. Yet, you don’t think twice about it, and it certainly doesn’t tell you “Okay, now I’m using the SMTP protocol to send your message.”. IRC clients don’t tell you they’re using “irc://”. Chat clients don’t tell you their protocol, whatever it may be. FTP clients, SSH clients, Samba clients. On, and on, and on. The browser is the only exception to this rule. Why? Why does the browser need to tell you that it’s using HTTP when it’s already generally understood? Isn’t the important thing interacting with the sites you want to visit? Not the protocol? Frankly, I say good riddance!

Now, if only we can get system administrators to register “domain.tld” as well as “www.domail.tld”. I would like to go to vim.org without forcing me to type the www.

Hair Poem

Yesterday, while at school, studying for a quiz, I saw that there was an open mic poetry reading. While passing the sign, I recalled a poem that I wrote about my wife’s hair while bored in church. So, I told my wife about it, asked if she and my daughter wanted to come, and we were on our way with my whimsical poem.

At first, I thought it was just a local university thing, with a few of the local college kids. However, I learned that this is only one night of a few that involved some major published poets, and had been held elsewhere across the city. This poetry event has been running for something like 20 years, and I was told that this is one of the biggest poetry reading events in the United States! Last night, was just a small part of the much larger event.

Anyway, I got up to the mic, and read my poem. I’ve never done this before, so I was actually quite nervous. To me, everyone in front of me was poetry and prose professionals, English majors, writers and the like. I’m sure my poem was child’s play to the profound poetry they had. But, I wanted to share my little poem, even if I was an amateur.

Just a little background on the poem: My wife and I were preparing for church one Sunday morning. When I got out of the shower, while drying myself off, one of my wife’s hair got caught around my leg, and a bit later, my arm. Further, she was worried about losing her hair, and at every brush stroke, felt she was becoming bald by the day. Well, while sitting in church, listening to the sermon, I was quite bored, so I pulled out my notebook, and started penning a poem about her hair.

I had been reading Dr. Seuss a bit before that day, so his quirky meter and rhyming style was on my mind. As a result, the poem doesn’t really have a specific meter or rhythm. It’s pretty carefree. It was meant entirely to be light and playful, and a bit overboard. My wife enjoys it, and it gathered quite the roar of laughter during and after I had read it last night. I initially wrote it in 2005.

Anyway, here it is, in full.

My Wife’s Hair
by Aaron Toponce
Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License.
Some rights reserved.

I just got married and inherited a wife.
Oh my, what a life!
It’s just not right
that I have to fight.
No not with her, but what’s on her head
and that she happens to shed.
It isn’t fair that she loses her hair.
The problem? It’s everywhere!

It’s on the pillow and on the sheets.
The stuffed armadillo, even my pant pleats.
I get out of the shower and grab a towel.
I dry myself off- wait. What’s that? (scowl)
It’s more hair! Where’s the Nair?
My arms, legs, hands and feet
are all caught ensnare.
And there I sit in despair on the chair bare.
I swear all I wear is her long hair.
I need to get dressed, but it’s such a mess
to grab my pants, my shirt and underdress
and find her long folicle.
It’s just diabolical.

Now I’m ready to go out for the day
and play.
I go to the kitchen for a glass of milk.
What am I met with? But the silk
of that thin dark hair on a freshly sliced pear.
Maybe I’ll have some cereal,
but there it is just as real
in my Froot Loops! Oops!

I better be careful wherever I go.
For every minute passed allows her hair to grow.
On the couch? Of course.
Guess the source.
The car? It’s on the seat.
Even the shoes for my feet.
The TV? Look at the screen. Is it clean?
What about the sink?
Or the local skating rink?
The computer desk or the curtains pink?
Yes, Yes, Yes! I must confess.
The tub, the floor
the poor dog and the door knob.
It’s a mob of hair.

At work, I shirk at the very thought
that my whole day was wrought
with fighting my wife’s hair.
“There. Right there,”
my coworker announced.
“It’s on your shirt.” And there he pounced
towards me to get the present that my wife renounced.
“That’s awfully long for a fellow like you.
Have you some confessing to do?”
He asked with a sarcastic grin.
“The joys of marriage,” I responded.
“With your wife’s hair, you’ll never win.”

Back at home, the count had increased
to millions. Maybe even billions! Please, oh please!
It’s an army out to get you, so fight!
Yeah, right.
It won’t to any good.
Just get a jacket and pull up the hood.
“Protect yourself!” my dad used to say.
“Protect yourself in every way!”
Never had hair crossed my mind
that would come across as the aggressive kind.

So here I stay in a marriage exposed
to a contract that was never proposed.
Every night, when I kneel at my bed,
I pray about my wife’s evil head:

“Please Lord have mercy on my soul.
Hair isn’t meant for my soup bowl.
It doesn’t belong in closet
or the bathroom faucet.
And I think that I should sleep
without a peep deep.
Is this your idea of Armageddon
to begin war with her hair?
After my weddin’?
Look at my house Lord.
Look at the place.
I can hardly kneel at my bed
without getting hair in my face.
Give me this day a long needed break
from the hair that her evil head will make.
Please, for goodness sake.
But, thy will be done, Lord. I must confess
Even if I must endure this hairy mess.
If I must endure, then one blessing that is high
on my ‘To-Do List’, (sigh)
is to give me the strength that I must bear
to shave my wife’s head of all of her hair.”

The Correct Recycling Symbol

I was just going through my Google Reader feeds, and stumbled upon a new concept for the Coca-Cola company in redesigning their soda bottles. The idea is rather ingenious. The bottles are reshaped to save on packing space, thus reducing the carbon footprint needed to ship the same amount of containers. They also feature a collapsible design, encouraging recycling, or at least minimizing land fill should they be thrown away. Overall, it’s a total win, and if I was a soda drinker, I would become a Coca-Cola fan. If they implemented the concept, that is.

However, the designer of the concept missed the boat on a crucial icon that represents recycling on an international scale. Take a look at this picture:

See the recycling symbol in the lower right-hand corner? Yeah. It’s wrong. I’ll explain.

Gary Anderson, in 1970, designed a symbol for a contest held by Container Corporation of America, to raise awareness for recycling consumable products for Earth Day. His design won, and has since been an international symbol representing recycling. However, here’s something that many people don’t know: the symbol was deliberately designed to be a Möbius band.

I’ll chop out the symbol that the designer created and we can compare it to the one Gary Anderson created, so you can see what I’m talking about. The Coca-Cola symbol is on the left, with Gary Anderson’s creation on the right:

Notice, this recycling symbol is not a Mobius strip, which is not what the designer had in mind. Notice that this symbol properly shows that the surface is a Mobius band.

Notice, that with the symbol the designer created, it’s just the same arrow three times, only rotated. However, this means that the strip is not a Möbius band that Gary Anderson initially intended. As you can see, comparing the two symbols side by side, the upper arrows and lower right arrows are the same. The difference lies in the lower left arrow. The “half-twist”, as it would be called, in Gary Anderson’s creation creates the Möbius band.

If a Möbius band is new to you, take a strip of paper where its length is substantially longer than it’s width, maybe 10-times as long. If you were to bring the two ends together, without putting any twists in the paper, you would create a loop with two sides. Now, instead, put a half-twist in one end, and bring the ends together again. You have now just created a one-sided surface, called a Möbius strip. If you were to color with a red crayon on one “side” of the strip, and color with a blue crayon on the other, and follow the strip, you’ll find that the red crayon will meet the blue line, and the blue crayon will meet the red line. This surface only has one side and one edge.

If you’re having trouble visualizing this, consider the following video to help you see the one-sided nature of the strip (flash ahead):

Gary Anderson chose the Möbius band for his symbol, due to the nature of recycling. Take a “side” of the strip. Call that side “creation” of the consumable product. Take the other side to be the “recycling” of the product. Due to the nature of the Möbius strip, as you move along the strip (call that “time”) starting with the creation, you will eventually reach the opposite side, when you labeled recycling. In other words, a Möbius strip was chosen, as with recycling, everything goes back into itself.

Now, consider the logo the designer made. That band is ambiguous on whether or not has two distinct sides. If it indeed has one side, then it has 1.5 twists in the loop, which does not have the same topological properties as the Möbius band. If it has two sides, by adding an odd third dimension, then the “creation” of their product never gets recycled, according to their symbol. It just stays as it is. It will never reach the “recycling” side of the strip. As a result, the product won’t get recycled and reused.

The designer isn’t the only person to produce this failure. After all, it’s subtle enough that I doubt many people are aware of it. However, it drives me nuts. Being a topologist (a mathematician studying topology (topology is NOT topography)), I notice these things. Take a look at this Google Image Search results, to see how many other people the world-round make the same mistake.

There’s a rule in design that every designer should be familiar with. The rule is that the designer should deeply study what they are about to create before they create. For example, if you were creating a logo for a company, and wanted that logo to represent a rubber stamp, you should better spend a great deal of time studying stamps in person, learning everything about them, before creating your logo. If your logo involves a tire, take a lot of time to study tires. Et cetera. The reason being, when your logo goes public, if you haven’t deeply scrutinized it, to make the logo accurately convey what it’s trying to convey, the public will scrutinize it, and guess who will be wishing they spent a little more time in the research area?

Now, this designer may, or may not have taken design classes, or not have any professional experience in design. I know not. However, the images produced are quite professional looking, so I’m guessing there is some experience to be expected. Regardless, if the concept is run with Coca-Cola, I would hope that the marketing or advertising department picks up on the symbol error, and corrects it before release.

</rant>

Connecting To Serial Null Modems With GNU Screen

The motivation for this post, actually, is that I had heard of the BSD-licensed tmux. I’ve heard it’s far more configurable than GNU screen and lighter on resources. So, I thought I’d install it on my Debian machine, and give it a quick test drive. The first thing I wanted to test, was not attaching and detaching sessions, but using tmux to connect to serial ports as a null modem. I use this feature with GNU screen all the time, as I’m constantly in the back of Cisco switches, HPUX ports, and other serial connections in our datacenter at work. However, I found out very quickly that tmux doesn’t support this feature. In fact, the developers call it “bloat” (emphasis mine):

There are still a few features screen includes that tmux omits:

- builtin serial and telnet support; this is bloat and is unlikely to be added to tmux;
- wider platform support, for example IRIX and HP-UX, and for odd terminals.

That’s unfortunate. I’ve found that when developers call a requested feature “bloat”, it’s usually because they don’t use it themselves. That may be the case here. I don’t know. However, I do know that GNU screen supports both serial and telnet connections, and it’s a valued feature for our team.

So, here’s how you can use GNU screen to act as a terminal emulator to a serial null modem connection. Just start a screen session on the correct serial device:

$ screen /dev/ttyS0

If the connection is too slow, and your serial port can handle faster baud rates, then you can set that instead:

$ screen /dev/ttyS0 115200

As is common with null modem connections, if you need to send a break, just send C-a B.

That’s it. Rather straight forward. I know that using minicom or HyperTerminal can sometimes be a pain, so using a more modern terminal, complete with telnet, multiuser, locking and splitting support can make all the difference in the world. So, why tmux won’t support this is beyond me, but it sure makes life behind the serial connection just a bit more enjoyable, and a valuable system administration tool.

Irssi Handling JOINS/PARTS/QUITS

Irssi, as blogged extensively throughout this site, is one solid client. The flexibility never ceases to amaze me, and tonight was one of those times.

Hanging out in the amount of channels I do, I see a lot of activity in my statusbar for all of my joined channels. This can be overwhelming for some, but I don’t mind it. What I do mind, however, is when I check in on a specific channel, and see pages and pages of scrollback that is nothing more than people joining and leaving the channel. I’ve tried blatantly ignoring JOINS, PARTS and QUITS, as they’re called, but I always disable it, because I usually want to be kept abreast of when someone leaves a channel that I’m having a conversation with. I don’t want to look silly continuing to chat to someone, long after they’ve left. So, I need a way to keep on top of when people are joining and leaving the channel, but not have that information in the channel itself. Thankfully, Irssi meets this need.

The concept is simple. A JOIN, PART or QUIT is what is referred to as a “level”. There are a number of different levels that Irssi supports, all of which can be found with “/help levels” in Irssi. With Irssi, it is possible to ignore, or even redirect, levels. In my case, I want to redirect these three levels to another window, if possible. So, digging through the settings in Irssi, I found “window_check_level_first”. By default, this setting is “OFF”, which means that Irssi has a global setting for levels, and how they’re handled. Enabling this setting, means to follow the levels that have been assigned to their respective channels. However, if you turn this on first, without doing some initial setup before hand, you’ll notice everything going to your status window by default, including chat. This isn’t what we want, so let’s get setup.

The first thing we need to do is set our levels for all of our currently open windows, as well as any future windows that we open. We can accomplish this with two commands in Irssi:

/foreach window /window level ALL -JOINS -PARTS -QUITS
/set window_default ALL -JOINS -PARTS -QUITS

Now, the next thing to do is to create a new hidden window that will be the new home for all your JOINS, PARTS and QUITS. So, from Irssi:

/window new HIDDEN

Navigate to that window, wherever it is placed, and give it a name. For me, I called it “junk”. Of course, this isn’t necessary, just optional, but I prefer that each of my windows have a name:

/window name junk

It will have picked up the -JOINS -PARTS -QUITS from our default setting we just applied, so we’ll need to reverse that. Easiest way is to just apply the converse of what you did earlier:

/window level -ALL JOINS PARTS QUITS

Sweet. Our window is finished. Now, we can turn on the setting that will tell Irssi to look for each individual window level setting:

/set window_check_level_first ON

Wait a bit, and you should see all the JOINS, PARTS and QUITS going to your new hidden window, rather than each respective channel. You’ll also notice that it doesn’t print the channel where these are originating. I don’t know of an easy way to set that without a script, so if you know of such a script that exists, or want to write one yourself, sharing that would be appreciated. In the meantime, this is better than nothing.

Don’t forget to save:

/save

Also, you may not want to make your “junk” window hidden, but rather make it sticky, and split Irssi, putting the junk window on the top. I’ve done this with my highlight window, so it would make sense here. In that case, just:

/window stick on
/window show (number|name)

You can then size the window as needed if you decide you split your Irssi.

And, there you have it. Now, when people are joining and quitting, rather than filling your scrollback where precious chat exists, it’s all being forwarded to a window of your choice. If eventually, you like this setup, and you find that you’re not checking your junk window for joins and quits, then you may be able to get away with just ignoring JOINS, PARTS and QUITS altogether Irssi-wide. Which means, if for any reason you want to reverse this setup, it’s rather trivial:

/set window_check_level_first OFF
/foreach window /window level ALL
/set window_default_level ALL
/window close
/save

And that would back you out of this configuration, and get you back to default.

I should mention that I’ve heard that WeeChat has a feature that only people you’ve recently chatted with will show when they quit, or there is a setting for setting this. I personally think WeeChat is a solid client. However, in this case, I don’t want to see any quits, even with those I’m chatting with, in that buffer. However, I would like to see it in another buffer, and Irssi makes this painless. So, while I’m sure WeeChat can also meet similar needs, Irssi meets my needs best.

As with my other Irssi tutorials, I hope this one was helpful. I find that I personally benefit from my own writing, and that’s the major reason why I blog. I have searched for doing solving problems in the past, only to stumble upon my own blog post, outlining the very issue I’m faced with again. So, if it won’t benefit you, at least it will benefit myself.

Installing Debian via USB

Last night, I wanted to see if I could get Debian Squeeze loaded on my HP Mini 110, so I set out to accomplish the task, and accomplish it I did. As with most netboks, this HP doesn’t ship with a CDROM. So, the only way to get an operating system on this guy is either with PXE, or USB (actually, I don’t even know if PXE-booting works). So, I grabbed an unused USB thumb drive, and set to work.

Before beginning any installation, you should be very familiar with your hardware, so you know what sort of drivers you’ll need for the installation, and if there will be any compatibility issues. Attempting to put Debian on this machine in the past has failed, due to the network driver not shipping with the Lenny kernel. If you have this netbook, the NIC is an Attansic Technology Atheros AR8132/L1c gigabit ethernet adapter. The driver is open source, however, the hardware is so new, that at the time I had purchased the Mini, the driver hadn’t been included in the mainline kernel. The wireless is a Broadcom BCM4132, which means the firmware is not open source, and as a result, not included with the Debian installer. So, at the time, there was no way to get this netbook online with Debian. However, with the release of the 2.6.29 kernel, the Aetheros driver needed was included, and the development snapshot of the installer now ships that kernel, so we’re good to go with a network installation, and getting the computer online.

All the other hardware that I’ve tested, I have tested before with different hardware other than the Mini, and worked out of the box. So, the installation should be rather straightforward, and booting in the new system should be on par with a working system.

So, in order to perform a Debian GNU/Linux installation via USB, you need only a few things. First, you must grab a boot.img.gz file from the development snapshot of the installer for your hardware. Because the HP Mini is x86 32-bit, I grabbed mine here. Now, you also need a CD image file (ISO format) which will contain the necessary software and installation procedures for the install. I prefer to do network installs, so I grabbed a netinst ISO here.

The boot.img.gz file will contain a bootable syslinux kernel and initial ramdisk, which means it will have the drivers necessary for your hardware. Of course, I got mine from a development snapshot, so I could get the Atheros NIC driver from the latest kernel, but if you have older hardware, maybe the stable version of the boot.img.gz would work better for you. You just need to get it from any hd-media directory appropriate for your architecture. The ISO on the other hand contains the base software for installing to disk, the partitioner and other parts of the installer necessary for performing the installation. The boot.img.gz just gets you started.

Now that you have both files, you’ll need a USB thumb drive that is at least 256MB in size, which shouldn’t be a problem these days. Insert the USB drive into a computer with a working Linux operating system, and determine the appropriate device assigned to your newly inserted drive. You can get this information a number of ways. Probably the best way, is to run the following command before you insert the USB drive:

# tail -f -n 0 /var/log/messages

Then, insert the drive. You’ll see output from the kernel as it discovers the hardware and assigns a device to the drive. For me, my output was this:

Feb 21 08:22:28 hermes kernel: [46103.644130] usb 1-7: new high speed USB device using ehci_hcd and address 7
Feb 21 08:22:28 hermes kernel: [46103.789569] usb 1-7: New USB device found, idVendor=13fe, idProduct=1e00
Feb 21 08:22:28 hermes kernel: [46103.789586] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 21 08:22:28 hermes kernel: [46103.789599] usb 1-7: Product: USB DISK 2.0
Feb 21 08:22:28 hermes kernel: [46103.789609] usb 1-7: Manufacturer:
Feb 21 08:22:28 hermes kernel: [46103.789618] usb 1-7: SerialNumber: 077904015F40
Feb 21 08:22:28 hermes kernel: [46103.789974] usb 1-7: configuration #1 chosen from 1 choice
Feb 21 08:22:28 hermes kernel: [46103.790939] scsi5 : SCSI emulation for USB Mass Storage devices
Feb 21 08:22:33 hermes kernel: [46108.838495] scsi 5:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 0 CCS
Feb 21 08:22:33 hermes kernel: [46109.101380] sd 5:0:0:0: [sdb] 4030464 512-byte logical blocks: (2.06 GB/1.92 GiB)
Feb 21 08:22:33 hermes kernel: [46109.101984] sd 5:0:0:0: [sdb] Write Protect is off
Feb 21 08:22:33 hermes kernel: [46109.107382]  sdb:
Feb 21 08:22:33 hermes kernel: [46109.174851] sd 5:0:0:0: [sdb] Attached SCSI removable disk

So, in my case, the newly inserted drive is /dev/sdb. So, armed with this information, I can now prepare the USB drive. This next step should be handled with caution. If you type in, whether intentionally or accidentally the wrong device, disasterous consequences may abound. As a friend once told me: “read twice, type once”. Think what you’re doing before you do it. So, at this point, I just need to send the contents of the boot.img.gz file to the new disk. I would not recommend doing it to a partition, but instead doing it to the whole drive. If you inserted your thumb drive, and you noticed in the output that you have a /dev/sdb and /dev/sdb1, then this means you have a partition table outlining a single partition on the drive /dev/sdb. Ignore the partition, work with the drive itself.

Make sure your USB drive is NOT mounted, then type in the following (this next step will remove any existing partitions and data on the drive):

# umount /dev/sdb*
# zcat boot.img.gz > /dev/sdb

This should only take a couple of seconds to finish. At this point, you’ll have a FAT16 formatted USB drive with a syslinux install on the drive. You will now need to mount the drive and copy the ISO image to the mount point.

# mount /dev/sdb /mnt
# cp debian-504-i386-netinst.iso /mnt
# sync
# umount /dev/sdb

At this point, you have a fully prepared USB thumb drive with all the necessary bits in place to perform a USB installation on your netbook, or other hardware. When you boot from the USB stick, you’ll have the familiar Debian installer interface- automated installation, beginner and expert modes and a rescue environment. Because of this, I would recommend keeping the USB stick close at hand, should you need to troubleshoot your installation any time soon.

When you initialize the installation, the installer will look for an ISO file that contains the Debian software. It will start with /dev/sda, and work it’s way device-by-device and partition-by-partition in order, until it finds the ISO file. Because my drive is also recognized as /dev/sdb on my netbook, it only take a couple seconds. After it has found the ISO image, you’re ready to install, just like you would if you had booted off a CD.

That’s it! Rather straightforward, I think. You only need four times really to complete the job:

  • You computer
  • A USB disk
  • A boot.img.gz file
  • An ISO containing the Debian software

Good luck on your USB installs!

Facebook Chat In Bitlbee

It’s no surprise that Bitlbee is my chat client of choice. After all, I’ve blogged about it before. So, when I heard rumors that Facebook would be releasing their chat to outside clients over XMPP, I was excited to see the day when I could add it to my running Bitlbee instance. Lo and behold, that day has come.

Adding your Facebook account to Bitlbee is rather painless, as it is with any other account. The only catch, is you have to have a Facebook username set before you can continue. Once that is set, in Bitlbee, from your “&btilbee” status window, you can add the account:

account add jabber <username>@chat.facebook.com <password>
save
account on

That’s it! You should be up and running with a new XMPP connection to the Facebook chat. However, rather quickly, you’ll notice that the usernames in your “blist” roster are their user identification number on Facebook, rather than their name. Something like “u123456789″. Who is that you wonder? Well, in your “&bitlbee” window, you could run:

info u123456789

Then, using that information, you could rename them one-by-one as they login. However, this is a pain. Fortunately, if you’re running Bitlbee with Irssi, then there is an Irssi Perl script for renaming these automatically for you, as they login. You can find that script here. Save it as “bitlbee_rename.pl” in your “~/.irssi/scripts directory, create a symlink in the autorun directory, load it, and you’re set. Here’s what you would do behind the command line:

wget -O ~/.irssi/scripts/bitlbee_rename.pl http://browsingtheinternet.com/temp/bitlbee_rename.txt
ln -s ~/.irssi/scripts/bitlbee_rename.pl ~/.irssi/scripts/autorun/bitlbee_rename.pl

Now in Irssi, load it:

/RUN bitlbee_rename.pl

Now, each of your Facebook buddies will have their user ID number renamed to “FirstnameLastname” format. The script only works for Facebook chat, so no worries about it mucking up other XMPP connections, and it only renames buddies that haven’t already been renamed. It also saves it to your Bitlbee config (which is /var/lib/bitlbee/username.xml) every time it renames a buddy.

So, there you go. Bitlbee, XMPP and now Facebook, married together. What a beautiful relationship.

Irssi’s /channel, /network, /server and /connect – What It Means

I have found, that since using Irssi, many people like to edit the config directly. This is a natural instinct that we have as hackers in general. Because configs are stored in plain text, such as our shell RC files, Apache configs and many more, we just intuitively reach for our editor, and start hacking away. Unfortunately, the Irssi config is anything but clean. It uses a noisy syntax that makes it easy to make mistakes, and as a result, lose settings in Irssi, or have a broken Irssi entirely.

When I used to teach system administrators for a living, I gave them the mantra that if you have a tool that can modify a config file, use the tool. The tool has most likely been tested for bugs, and will generate syntactically correct configs. Humans are error-prone, so editing a config by hand means setting yourself up for error and pain. For Irssi, the developers have put in rather extensive commands that can modify everything in the config directly, and there’s even an exhaustive documentation support structure behind those commands. So, there should be no reason to edit the Irssi config by hand.

To show this, in irssi, go to the status window, and type “/help”:

/help
05:29 Irssi commands:
05:29 accept     disconnect  lastlog  op        script     unquery
05:29 action     echo        layout   oper      scrollback unsilence
05:29 admin      eval        links    otr       server     upgrade
05:29 alias      exec        list     part      servlist   uping
05:29 away       flushbuffer load     ping      set        uptime
05:29 ban        foreach     log      query     sethost    userhost
05:29 beep       format      lusers   quit      silence    ver
05:29 bind       hash        map      quote     squery     version
05:29 cat        help        me       rawlog    squit      voice
05:29 cd         hilight     mircdcc  recode    stats      wait
05:29 channel    ignore      mode     reconnect statusbar  wall
05:29 clear      info        motd     redraw    time       wallops
05:29 completion invite      msg      rehash    toggle     who
05:29 connect    ircnet      names    reload    topic      whois
05:29 ctcp       ison        nctcp    resize    trace      whowas
05:29 cycle      join        netsplit restart   ts         window
05:29 dcc        kick        network  rmreconns unalias
05:29 dehilight  kickban     nick     rmrejoins unban
05:29 deop       kill        note     rping     unignore
05:29 devoice    knock       notice   save      unload
05:29 die        knockout    notify   sconnect  unnotify   

So, long story short, don’t edit the config. Use the commands, and learn the help system. With that out of the way, let’s begin.

I’ve encountered many who are using Irssi that don’t understand how a few key commands relate with each other and how to tie them in. So, I would like to cover those commands here, namely: /channel, /network, /server and /connect. Hopefully, by the end of this post, not only will you be comfortable enough with the commands I’ve taught you about, but you’ll be comfortable enough to use the built-in documentation should you be stuck.

/network
The first command to learn is /network, because all the rest of the commands take advantage of it. So, we’ll start there. /network is used for defining some client-specific settings you want to apply when connecting to a server. These settings can include username, real name, nickname, usermodes and other goodies. Running “/help network” can show you everything it supports:

05:32 NETWORK ADD [-nick <nick>] [-user <user>] [-realname <name>] [-host <host>] [-autosendcmd <cmd>] [-querychans <count>] [-whois <count>] [-msgs <count>] [-kicks <count>] [-modes <count>] [-cmdspeed <ms>] [-cmdmax <count>] <name>
05:32 NETWORK REMOVE <network>
05:32
05:32      -kicks: Maximum number of nicks in one /KICK command
05:32      -msgs: Maximum number of nicks in one /MSG command
05:32      -modes: Maximum number of mode changes in one /MODE command
05:32      -whois: Maximum number of nicks in one /WHOIS command
05:32      -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
05:32      -cmdmax: Same as /SET cmds_max_at_once, see section 3.1
05:32      -nick, -user, -realname: Specify what nick/user/name to use
05:32      -host: Specify what host name to use, if you have multiple
05:32      -usermode: Specify what usermode to use on this network
05:32      -autosendcmd: Command to send after connecting to a server
05:32
05:32 With -autosendcmd argument you can automatically run any commands after connecting to network. This is useful for automatically identifying yourself to NickServ, for example
05:32
05:32 Shows and changes the settings of defined IRC networks.
05:32
05:32 See also: CONNECT
05:32
05:32 Irssi commands:
05:32 network add network list network remove 

So, let’s go ahead an define some networks. I personally connect to several networks simultaneously, all of which have different usermodes, and some which I need to provide authentication to when connecting. So, let’s say I wish to define client-specific connections to Freenode, OFTC and bitlbee. Let’s look at what to add. Oh, by the way, every command and option provided by Irssi can be tab-completed. Worth knowing to save some typing.

/network add -user 88 -realname eightyeight -nick eightyeight -usermode +iw freenode
/network add -user 88 -realname eightyeight -nick eightyeight -usermode +w oftc
/network add -user aaron -realname "Aaron Toponce" -nick aaron -autosendcmd "say identify password" bitlbee

As you can see, each network line is different. I’m using the same username, real name and nick for “freenode” and “oftc”, but different ones for “bitlbee”. I’ve specified different user modes with “freenode” and “oftc” where I haven’t provided any with “bitlbee”. Further, with “bitlbee”, I’m sending an identify command to the server when I connect. As you can probably imagine, this gives me great flexibility on how I want my client to interact with different servers.

Running “/network list” should show you the three servers you just added:

/network list
05:48 Networks:
05:48 freenode: nick: eightyeight, username: 88, realname: eightyeight, usermode: +iw
05:48 bitlbee: nick: aaron, username: 88, realname: Aaron Toponce, autosendcmd: say identify password
05:48 oftc: nick: eightyeight, username: 88, realname: eightyeight, usermode: +w

If you’ve just installed Irssi, you will likely find many networks already defined, including OFTC. If this is the case, and you want to make some adjustments to the OFTC definition, go ahead and provide those in the “/network add” command, and those options will be appended, provided the network name is the same. If you wish to remove any of the networks, then as you learned in the help doc, “/network remove name” is the syntax for that.

It’s important to note that at this stage of the game, any of the commands you enter in Irssi are only used for the current running session. If you wish to keep the settings persistent, then you will need to save it to disk (your config). You can do this with the “/save” command. I would recommend saving often when manipulating Irssi. Further, if for some reason you make a mistake in the command you’re typing, and you wish to revert back to the previous “/save” command, then you can use “/reload” for this purpsoe. “/reload” will read the config, and load the settings it finds there, ignoring any previous settings you’ve defined without saving.

/channel
Now with our networks defined for our client settings, let’s define some channels to visit when we connect to these networks. So, in the status window, what does “/help channel” show?

05:56 CHANNEL LIST
05:56 CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>] <channel> <network> [<password>]
05:56 CHANNEL REMOVE <channel> <network>
05:56
05:56 Irssi can automatically join to specified channels in specified IRC networks. It can also automatically send the password when manually joining to channel without specifying the password.
05:56
05:56 /CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>]
05:56              <channel> <network> [<password>]
05:56
05:56 With -bots and -botcmd arguments you can automatically send commands to someone in channel. This is useful for automatically getting ops for channels, for example
05:56
05:56 /CHANNEL ADD -auto -bots "*!bot@bothost.org bot*!*@host2.org"
05:56              -botcmd "msg $0 op mypass" #channel ircnet
05:56
05:56 You can also use the -botcmd without -bots argument. The command is then sent whenever you join the channel.
05:56
05:56 If you want to remove some settings from existing channel record, for example bots, just give the -bots "" parameters to it. Password can be removed by setting it to - (or actually, "" works too).
05:56
05:56 You can remove the channels with /CHANNEL REMOVE <channel> <network>
05:56
05:56 /CHANNEL LIST displays list of channels with settings.
05:56
05:56 /CHANNEL without any arguments displays list of channels you have joined. You can also use /CHANNEL to join to channels just as with /JOIN, like /CHANNEL #a.
05:56
05:56 See also: TS, JOIN
05:56
05:56 Irssi commands:
05:56 channel add channel list channel remove 

As you can clearly see with “/channel”, we can define what channels to join, and if any, what bot commands to send to the channel when we join. Each channel we join will be based on the network that we’ve previously defined. So, I could join #ubuntu whenever I connect to the Freenode network and #debian whenever I connect to the OFTC network. As with “/network”, on a fresh install of Irssi, there may already be a couple channels defined. Feel free to keep them in play when using Irssi, or remove them with “/channel remove” as per the syntax in the help doc.

So, let’s define some channels:

/channel add -auto #ubuntu freenode
/channel add -auto #freenode freenode
/channel add -auto #debian oftc
/channel add -auto #bitlbee oftc

Pretty straight forward, right? I’ve added four channels, two on the “freenode” network and two on the “oftc” network. Because Bitlbee doesn’t handle “channels” necessarily the same way IRC servers do, I haven’t defined any channels to join when I connect to Bitlbee. Notice I’m passing the “-auto” switch, so when I join that network, I’ll automatically join those channels. This is entirely optional, and “-noauto” is default if “-auto” isn’t passed.

As with “/network”, you can append settings to each channel listing as needed, as long as the channel name and network name are the same. If you wish to remove some settings, then you’ll need to “/channel remove” and “/channel add” as appropriate. Running “/channel list” should show our progress thus far:

/channel list
06:05 Channel         Network    Password   Settings
06:05 #ubuntu         freenode              autojoin
06:05 #freenode       freenode              autojoin
06:05 #debian         oftc                  autojoin
06:05 #bitlbee        oftc                  autojoin

Again, you should run “/save” when you’ve defined your channels, so next time you start Irssi, your settings won’t be lost.

One last related note about your channels. For me, I get very used to the location, or layout, of my channels. When I lose my running Irssi connection, for whatever reason, nothing is more frustrating than the channels being in a different order than previous. Fortunately, I’m not the only one that this annoys, so the developers have provided “/layout save” as a way to keep my sanity. “/layout save” will save the location order of your channel windows, so should you join a channel again, it will go to the same location as it was in previously. However, as with every other command in Irssi, this will only save it to your currently running session in RAM. If you wish to keep it persistent, you must issue “/save” for the next time you start Irssi.

/server
At this point, we’re ready to connect. We have all the details out of the way, and we could easily just connect to Freenode or OFTC. However, we may want to pass some server-side options to the networks, such as connecting via SSL. So, before covering “/connect”, let’s get “/server” out of the way, as it’s the last command in this post that does any saving to disk, then we’ll play with “/connect”. As is verbatim in this post, let us pull up the help doc:

06:24 SERVER [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] [-noproxy] [-network <network>] [-host <hostname>] [-rawlog <file>] [+]<address>|<chatnet> [<port> [<password>
             [<nick>]]]
06:24 SERVER PURGE [<target>]
06:24 SERVER REMOVE <address> [<port>]
06:24 SERVER ADD [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] [-auto | -noauto] [-network <network>] [-host <hostname>] [-cmdspeed <ms>] [-cmdmax <count>] [-port
                 <port>] <address> [<port> [<password>]]
06:24 SERVER LIST
06:24
06:24      -4, -6: specify explicitly whether to use IPv4 or IPv6 address
06:24      -ssl: use SSL when connecting
06:24      -ssl_cert: The SSL client certificate file (implies -ssl)
06:24      -ssl_pkey: The SSL client private key (if not included in the certificate file)
06:24      -ssl_verify: Verify servers SSL certificate
06:24      -ssl_cafile: File with list of CA certificates (implies -ssl_verify)
06:24      -ssl_capath: Directory with CA certificates (implies -ssl_verify)
06:24      -noproxy: Ignore the global proxy configuration for this server
06:24      -auto: Automatically connect to server at startup
06:24      -noauto: Don't connect to server at startup (default)
06:24      -network: Specify what IRC network this server belongs to
06:24      -ircnet: Same as -network. Deprecated. Do not use
06:24      -host: Specify what host name to use, if you have multiple
06:24      -!: don't autojoin channels
06:24      -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
06:24      -cmdmax: Same as /SET cmds_max_at_once, see section 3.1
06:24      -port: Use this only to edit the port number of an existing server,
06:24             for new servers use the <port> argument
06:24
06:24 /SERVER disconnects the server in active window and connects to the new one. It will take the same arguments as /CONNECT. If you prefix the address with the + character, Irssi won't disconnect the active server, and it will create a
      new window where the server is connected (ie. /window new hide; /connect address)
06:24
06:24 /SERVER without any arguments displays the list of connected
06:24         servers.
06:24
06:24 /SERVER REMOVE <address> [<port>]
06:24
06:24 /SERVER LIST
06:24
06:24 /SERVER PURGE [<target>]
06:24
06:24 Clears the server send queue. Useful if, for example, you accidentally paste lots of text to a channel.
06:24
06:24 See also: CONNECT, DISCONNECT, RECONNECT, RMRECONNS
06:24
06:24 Irssi commands:
06:24 server add server connect server list server purge server remove 

As should be obvious, this help doc is rather verbose. There are a lot of options that you can send server-side, such as using IPV4 or IPV6, connecting via SSL, changing the connecting port, and a myriad of other options. Let’s pick on just a few, and I’ll let you examine the rest.

Just the other day, I posted on how to connect to Freenode using SSL, and yesterday I covered connecting to OFTC in a similar manner. Let’s take those “/server” strings, along with one for Bitlbee to define how I wish to connect to these servers. As with the previous commands, the syntax is “/server add”, as the help doc mentions:

/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 7000
/server add -auto -ssl -ssl_cert ~/.irssi/certs/nick.pem -ssl_verify -ssl_cafile /etc/ssl/certs/spi-cacert-2008.pem -network oftc irc.oftc.net 6697
/server add -auto -network bitlbee localhost

As you can see, I’m using SSL for the Freenode and OFTC connections, but not for bitlbee. Further, I’m specifying “-ssl_cert” with OFTC to present my self-signed certificate to NickServ, which I’m not doing to the others and I’m using a specific CA certificate to verify the OFTC SSL cert, whereas with Freenode, I’m specifying a whole CA path, and letting it choose the appropriate CA certificate for verification. Lastly, with all three connections, I’m automatically connecting to the networks, so when I launch up Irssi, it begins connecting right away. Because there are channels with “-auto” added to them, when the server connection is successful, I’ll join those channels right away, and my session will be ready to go without any interaction from me.

If I wish to see the listing of servers I just added “/server list”, as per the documentation, will show me that list. Again, on a fresh install, there may be more servers than what we have added here, and you can keep them in play, or remove them as needed. If OFTC is already defined in the server list, then you can make changes to the listing as long as the port number, network name, and server url are the same. If there are settings you wish to remove, then you’ll need to “/server remove” and re-add as appropriate.

So, what does our listing show us:

/server list
06:50 Server               Port  Network    Settings
06:50 irc.freenode.net     7000  freenode   autoconnect, ssl, ssl_verify, ssl_capath: /etc/ssl/certs
06:50 irc.oftc.net         6697  oftc       autoconnect, ssl, ssl_cert: ~/.irssi/certs/nick.pem, ssl_verify, ssl_cafile: /etc/ssl/certs/spi-cacert-2008.pem
06:50 localhost            6667  bitlbee    autoconnect

As you can quickly see, where we specified ports for Freenode and OFTC, we didn’t for Bitlbee, so the default IRC port 6667 was added. Of course, don’t forget to “/save”, so you don’t lose your work up to this point.

A cautious word about “/server”. “/server” is used for defining server connections, not for connecting to servers themselves. However, it can connect you to a server should you say something of the effect to “/server irc.mozilla.org”. If you did this, it will disconnect you from your current connections, and ONLY connect to you irc.mozilla.org. This is an unfortunate side-effect that many first time Irssi users discover. The proper method for connecting to irc.mozilla.org is to use “/connect irc.mozilla.org”, as we’ll discuss below.

/connect
Our last command that I plan on covering in this post. With our networks defined and our servers and channels configured, we could easily at this point connect to Freenode, and all of our settings that we’ve set at this point would be applied, which means it will save us SERIOUS amounts of typing in the future, provided you don’t keep setting up Irssi over and over. Let’s first look at the help doc, as we did with the other commands, then we’ll see how simple our life is from here on out.

/help connect
06:58 CONNECT [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] [-noproxy] [-network <network>] [-host <hostname>] [-rawlog <file>] <address>|<chatnet> [<port> [<password>
              [<nick>]]]
06:58
06:58      -4, -6: specify explicitly whether to use IPv4 or IPv6 address
06:58      -ssl: use SSL when connecting
06:58      -ssl_cert: The SSL client certificate file (implies -ssl)
06:58      -ssl_pkey: The SSL client private key (if not included in the certificate file)
06:58      -ssl_verify: Verify servers SSL certificate
06:58      -ssl_cafile: File with list of CA certificates (implies -ssl_verify)
06:58      -ssl_capath: Directory with CA certificates (implies -ssl_verify)
06:58      -network: the network this connection belongs to
06:58      -ircnet: Same as -network. Deprecated. Do not use.
06:58      -host: the host
06:58      -!: don't autojoin channels
06:58      -rawlog: immediately open rawlog after connected
06:58
06:58 This command makes irssi to connect to specified server. Current connections are kept and a new one is created.
06:58
06:58 See also: SERVER, DISCONNECT, RMRECONNS, SCONNECT

Obviously, “/connect” is verbose, but not as verbose as “/server”. Further, the first thing to note about “/connect” is there is nothing to save. This command just takes the settings you’ve already defined for your networks, and applies them in to the connection string. However, should you not have a defined network or server to connect to, such as maybe connecting to irc.mozilla.org, you can use many of the settings in “/server” here, such as IPV4, IPV6, SSL and so on. So, say I’m wishing to test an IPV6 connection to irc.mozilla.org, I could issue something like the following:

/connect -6 irc.mozilla.org

That’s it! If it succeeds, then maybe I can add it to my server list with “/server add”, as discussed above and “/save” to the config. Maybe I want to test SSL over IPV6 on that network on a specific port. I could do this. Further, because I’ve already defined my networks, I can say something like:

/connect freenode

In this case, I’ll apply all the network settings AND server settings for the “freenode” connection. This keeps me from typing it over and over every time I wish to connect. Further, the network names themselves can be tab completed! Oh, how this makes life much more enjoyable!

At the end of the help document, you’ll notice a couple of additional commands. Namely “/disconnect” and “/rmreconns”. If you’re finished with a network, and wish to disconnect, then “/disconnect” would be what you want. For example, maybe you’re satisfied with your testing of IPV6 over SSL on irc.mozilla.org. Then, from your status window, you will need to tell Irssi that this is the connection you wish to disconnect. To do this, “^x” (control-x) will switch you servers until you reach the right one. Then, when you’ve switched to the right server you could issue:

/disconnect

Further, maybe a “/connect” isn’t working. Maybe you’re trying to reach a host that is currently down, it’s timing out, or the server on a different port than what you specified. As a result, Irssi won’t be able to connect to your preferred server, but it will keep trying. Eventually, maybe the host will become responsive, and a connection can be made. Maybe not. Regardless, Irssi will keep trying your “/connect” one way or the other. This might be undesirable, so running “/rmreconns” will remove any reconnections that Irssi is attempting to make. As with every other Irssi command, “/disconnect” and “/rmreconns” have a help doc.

Conclusion
So, that’s it. I hope this was helpful. If it was just noise, or much of it was confusing, I hope you walk away from this tutorial with at least two things:

  1. /help
  2. /save

If you can get those two commands deeply cemented in your brain, then you’ll be okay navigating Irssi and learning its ins and outs. Further, while there might be nothing technically wrong with editing the config by hand, Irssi provides powerful, powerful tools that can do it for you keeping the errors out, and the documentation for those tools, while not perfect, is vast and very complete. But, hopefully, you see now the relationship between “/network”, “/server”, “/connect” and “/channel”, and how you can tap into that power to make your Irssi experience more pleasurable.