Archive for April, 2011

Installing dwm and Killing gdm on Ubuntu

Friday, April 29th, 2011

Lately I’ve been playing around with a few non-traditional window managers; particularly wmii and dwm, both of which are minimalist dynamic window managers from suckless.org. With both of them, you primarily use the keyboard to open programs and manage your running windows. The two have slightly different ways of doing things, but are quite similar (as you would expect coming from the same project). Being ‘dynamic’, they both automatically handle window placement when you open a new window, although they allow you to change this placement if you want.

So, why did I decide to use them? Well, a lot of it has been motivated by my recent foray into Arch Linux combined with a desire to use my mouse less (and maybe delay arthritis in my wrist for a few years at least). They’re also much more lightweight than Gnome or KDE – I don’t use most of the niceties in either one of those two very much, so there’s no sense in paying the performance cost if there are no other benefits. Also, and this may be a bigger reason than any of the others, I love tinkering.

At any rate, I installed them both on Arch Linux (which was fairly straightforward due to Arch’s simplicity), and then decided I wanted to see if I could get dwm working in Ubuntu on my desktop machine. This turned out to be a little more difficult, mostly because the “user-friendliness” of Ubuntu means that it has many non-standard customizations and more complex configurations to make everything as smooth and brainless as possible. Unfortunately, this means that for those of us with a technological-minded brain, it’s harder to get it to actually do what you want. Ironic, no?

First, I installed dwm itself. This is done by checking out the dwm source from their website, and building it with the ‘make’ command. Its fairly straightforward and well-documented on their website.

However, then came the problems: I didn’t want to boot into gdm, which Ubuntu does by default. I tried things like removing it from /etc/inittab (doesn’t exist on Ubuntu), editing /etc/init/gdm.conf to stop gdm on runlevel 2, which is the default in Ubuntu (this didn’t seem to do the trick), and looked everywhere in /etc for something promising. I didn’t find anything until I stumbled across this blog post. It describes how to change the command-line options for booting your kernel into a login terminal, and how to fix the audio problem which then arises (I had the same issue it describes).

Unfortunately, I had one more issue with Ubuntu. dwm makes use of a mod-key quite heavily. Most all of the commands you need to use to interact with the window manager via keyboard are prefixed with this key. I decided I wanted to bind it to the capslock key (who uses that key anyway?). Mostly because I had done this on my laptop, which runs Arch. I tried to do it using xmodmap, which is how I did it under Arch. I got some really quirky behavior if I ran xmodmap as part of my .xinitrc, as I do under Arch. The changes wouldn’t stick… unless I made the process running xmodmap sleep for 6 or 7 seconds first. I eventually figured out that this was because when X.org starts on Ubuntu, it runs the xkbcomp program, which overwrites what was set with xmodmap.

“If you can’t beat ’em, join ’em”.

I decided that in order to play nice with Ubuntu, I had to play by its rules, and use xkbcomp. After a bit of searching, I found an article which dove deeper into how it worked than I really wanted to go. It is not nearly as simple and easy to use as xmodmap. Happily, they’d already figured everything out for me. So, I used their methods to set the caps lock key to be Mod3, recompiled dwm to use that as the mod-key for all the window actions, and I was on my way!

April 16th, 2007

Friday, April 15th, 2011

It’s hard to believe it’s been 4 years. The vast majority of people who now go to Virginia Tech weren’t here 4 years ago. That day has very nearly left the collective memory of the student body.

I remember getting to class in TORG 2150 that morning a few minutes early, and wondering why my professor didn’t ever show up. Someone in the class looked on the Internet at the news. We all sat there, repeatedly refreshing all the major news sites in an attempt to figure out what was going on a few hundred yards away. By this point, we had been told we couldn’t go anywhere.

I remember not being able to call home to tell my family I was okay because too many others were calling at the same time.

I remember finally being able to leave the classroom after a few hours. We hurried back to our dorms and began checking in with friends and family to make sure those we knew were okay. All too many of them weren’t.

I remember going to the candlelight vigil — one of the, if not the, most moving experiences I have ever taken part in. Thousands of people, all standing together, doing nothing but holding their candles with Coke cups from the dining halls as makeshift wax-catchers. None of us could imagine what had just happened, but none of us could imagine being in a better community either.

I remember the spontaneous “Let’s Go….” “Ho-kies!” chants at the vigil, which meant more than they ever have, either before or after that night.

I remember the convocation, at which University President Steger and Poet Nikki Giovanni got longer and louder standing ovations than the President of the United States, who was in attendance. Even through all the raw emotions, we were able to chant “Let’s go Hokies!”.

I will never forget that day. But more importantly, I will always remember those 32, and the amazing community of Blacksburg to which they will always belong.

We ARE Virginia Tech.

Paying Homage to Ubuntu ShipIt

Tuesday, April 5th, 2011

Back in high school, when I had a 56k internet connection at home, my computer engineering teacher mentioned this thing called Linux in class. I was a curious goodie-two-shoes, and so I asked him after class what it was and how I could get it.

He told me about Red Hat and gave me a stack of CDs to take home and copy. Being my first time attempting to copy CDs, I failed, and ended up with a bunch of CDs whose file system contained an .iso image, rather than that .iso image becoming the file system. But, by the time I realized this, I had already returned the stack of CDs to my teacher and was too ashamed to ask for them again.

Next, I researched Linux a little more and found out that there were several other distributions, of which Mandrake was prominent at the time. So, I convinced my dad to download a Mandrake CD from his work one day, because his Internet connection was several times faster than 56k. Mandrake seemed to work quite well, and I played around with it in my spare time for a while.

Then one day, I found out that some guy (Mark Shuttleworth) was paying to ship people free CDs of a Linux distribution called Ubuntu (and they were shipping world-wide, no less). So, being free, I ordered 10. I told my teacher what I had found the next day, and he decried it a scam, and told me that the CDs would probably have spyware and/or viruses on them. I proved him wrong over the course of the next few weeks and months by installing Ubuntu on every computer I could get my hands on. Ubuntu was easier to deal with and more straight-forward than Mandrake (now Mandriva), and led me to really begin my relationship with Linux in earnest.

Since then, I have explored countless other Linux distributions and Unices, but I still credit Ubuntu and its ShipIt program with helping introduce me to the joy that is Linux.

Today, the Ubuntu ShipIt program has been discontinued. Their website displays this message:

ShipIt has closed

After delivering millions of Ubuntu CDs to millions of new users, our ShipIt programme has finally run its course. While we can no longer deliver free CDs through the programme, it’s still easy to get Ubuntu. You can download Ubuntu for free from Ubuntu.com or you can buy a CD straight from the Canonical shop.

Ubuntu ShipIt, I salute you.