The Advisory Boar

By Abhijit Menon-Sen <>

Using fvwm2 as GNOME window manager (on Ubuntu 12.04)

I'm a dinosaur. I've been using the same fvwm2 configuration since 1996. I've tried other window managers, with varying levels of sincerity, but I drift back to comfortable old fvwm2 with no window decorations sooner or later. (I got along really well with Blackbox, but it was easier to switch back than to hack the code to cycle forward and back through a stack of windows with RaiseLower, a feature I like.)

I've also tried hard to get along with the default desktop on successive versions of Ubuntu (both GNOME and Unity), but a day or two is all I can stand. But there are some things about the Ubuntu interface that I don't want to give up or reinvent, especially on my laptop (the keyring, some indicator applets, nm-applet, the screensaver, etc.). Being an adaptible dinosaur, I now run fvwm2 as my GNOME window manager.

Thanks to this detailed explanation by dedicated xmonad users, changing "xmonad" to "fvwm2" in a few places was all the hard work I needed to do. I had an ~/.xsession file that ran a few startup commands already, so I put the following into /usr/share/xsessions/xsession.desktop to add an "xsession" option in the session drop-down at the login screen:

[Desktop Entry]

Then I created /usr/share/gnome-session/sessions/fvwm.session with the following contents:

[GNOME Session]

That was enough to make "gnome-session --session=fvwm" work, and that's what the last line of my .xsession runs. The other bit worth mentioning is stalonetray, which provides a home to nm-applet and friends.

Disabling touchpad buttons on the Thinkpad X120E

One of the two most annoying things about my Thinkpad X120E is that the touchpad buttons are flush with the outer edge of the chassis, and very easy to press inadvertently. I like the touchpad, so the option of disabling it in the BIOS or with "synclient TouchpadOff=1" did not appeal to me.

After reading the synclient man page, I was forced to accept that there was no easy way to disable just the hardware buttons. That left digging into the source code of the X.Org Synaptics driver ("apt-get source xserver-xorg-input-synaptics", and I had to install xorg-dev, xserver-xorg-dev, and xutils-dev as well).

Read more…

Brother HL-2250DN and Linux

My mother has been using my old Lexmark printer for many years, but it is no longer possible to find toner cartridges for it (which is such a shame, because it's a good printer). When the last cartridge became so flaky that she could no longer print her tickets, she asked me to find a new printer for her.

I thought about a cheap Samsung ML-16xx laser printer, but my recent experience with SPL led me to settle on the Brother HL-2250DN instead. This printer ticks many of my boxes: it has Ethernet support, automatic duplex printing (surprising, for a relatively inexpensive printer), and a proper output tray. The downside is that it supports only PCL6, not PostScript.

It was easy to set up the printer under Ubuntu 11.10. I chose the generic PCL6 printer driver, and everything just worked. Delightful. (Brother's web site does have some CUPS drivers for Linux, but I did not bother to try them out.)

Not surprisingly, the printed output looks fine too.

Samsung SCX-3201G MFP and Linux

I have lived without a printer or scanner for many years, but the number of things I need to print and scan has grown to the point where going to the market each time is painful. I am a firm believer in buying printers with PostScript and network support, but our needs are modest and do not justify spending enough to get a "real" printer. So I resigned myself to paying extra in terms of dealing with CUPS.

I found two or three MFPs that suited my budget on Flipkart, but was unable to find anything about Linux support for those models. Eventually, I chose the smallest one, the Samsung SCX-3201G, based on some positive reports about the SCX-3200 series.

Fortunately, it was easy to make it work. Thanks to tweedledee's Samsung Unified Linux Driver Repository and the odd forum post, I installed the PPD file and the SPL filter under Ubuntu 11.04. Printing with CUPS and scanning with SANE both work fine now.

The printer itself works all right. You can tell it's meant for low volumes. There's no output tray—it just spits paper out from the front, and there's a non-zero risk that it'll get sucked back into the input tray below. I would have been happier with a "real" printer, but this one works well enough that I'm glad to have it anyway.

Update: I'm glad I don't need to print photographs. Libreoffice and the GIMP print fine, but output is very dark and the quality is a bit disappointing even at 1200dpi. The fault may lie with the printer, the driver, or GIMP—or a combination thereof. The GNOME image viewer causes the printer to spit out several mostly-empty pages with a few control characters. I assume some CUPS incantation is needed, but I'm happy to ignore the problem entirely. Text and line-art print fine.

Update: Sometimes, printing a PDF will also print many pages of garbage. Most of the time, printing it a second time will work fine, but some files always result in garbage. Unfortunately, I have not found any way to predict when it might happen. I blame the interaction between CUPS and Samsung's SPL filter. I have set "LogLevel debug" in cupsd.conf, and will keep an eye on the logs.

<subliminal>Life is short. Get a printer with PostScript and Ethernet.</subliminal>

Buying an SSL certificate

The downside of always using SSL for web sites that require authentication is the need to buy SSL certificates. I usually don't need anything stronger than "domain validation" (which assures you that you're talking to the server you think you're talking to, but says nothing about how trustworthy that server may be). I'm not a fan of the current PKI, but there are now many more choices for cheap SSL certificates than there were a few years ago.

The last time I bought a "proper" certificate was early last year, when I upgraded the FreeSSL 30-day trial certificate I was using in development to a RapidSSL certificate for production. That was fast and painless, and cost about $40. (I've also used RapidSSL a few years before that.)

Recently, I learned that Namecheap (to whom I have now transferred all my domains from GoDaddy) is a reseller for various SSL certificate providers, including GeoTrust (the CA behind RapidSSL). Their pricing is very attractive, and I ordered a three-year RapidSSL certificate for $9.95/year today. That was fast and painless too (and it didn't include the phone verification step that my earlier RapidSSL purchases did).

I'm happy with RapidSSL so far, but I still look forward to the day when I can distribute encryption-only certificates through the DNS.

Air2Web is avoidable

An application I've been working on sends random challenge tokens by SMS to confirm certain user actions. My client had an account with Way2SMS already, so I used their simple HTTP API to send out the tokens. Later, we discovered that messages to some networks were delayed by fifteen minutes or more, and we decided to find a backup provider. I relayed a friend's recommendation of Air2Web to my client, and they signed up for the starter package.

They got our account set up quickly, and I sent myself a message through their HTTP API (which, like Way2SMS, was just a URL which took the phone number and message as query parameters). The message never arrived, so I wrote to "aircare" to complain. They replied promptly that my number was on the Do-not-call registry, so they would not deliver messages to it.

Read more…

Vim and X terminals

I've been using vim for more than a decade(!) now, but every so often, I still learn something new that makes my life a bit easier. Here are two things I learned today.


Emacs users have enjoyed the convenience of using M-x shell to run shell programs inside an Emacs buffer for years. I found a Python plugin named conque that does the same for vim. It works well enough to run vim inside vim (not that I plan to do that often), and using it to talk to psql while experimenting with schema changes is very convenient.


A friend pointed out that vim built with X11 support could yank text to and from the X clipboard using "*yy and "*p. Ubuntu's vim-gnome package gave me a console vim built with +X11 and +xterm_clipboard support, and I got the feature working as advertised after I set "clipboard" to just "autoselect" (the default setting of "autoselect,exclude:cons\|linux" caused vim to not connect to the X server at all).

I can now use * and + like any other registers, but one uses the primary X selection, and the other the X clipboard.

After less than a day of using this feature, I'm already hooked. It's so much nicer than pasting text into vim in insert mode, and also makes it easier to exchange text between two vims running in different terminals.

Back to procmail

When I first started receiving more email than I could deal with in my inbox, I reluctantly cobbled together a .procmailrc from bits of other people's configuration files. procmail was a mystery, but my needs were simple, and although I never graduated to liking its syntax, I learned to get along with it reasonably well over time.

Then I read Simon Cozens' article about Mail filtering with Mail::Audit, and I was delighted by the thought of writing a clear and understandable Perl program (ha!) to sort email. I had switched away from procmail to a simple Mail::Audit script almost before I had reached the end of the article.

My little program was convenient. Rather than having a separate recipe for each mailing list, the code would derive the mailbox name from the List-Id or Mailing-List header field. (For all I know, procmail may be able to do this too, but none of the examples show how to do it, and I never tried very hard to figure it out.) That code kept me happy for almost ten years.

Yesterday, I installed Ubuntu 11.04, which ships with Perl 5.10.1; by coincidence, the official end of support for Perl 5.10 was announced a day earlier, along with the release of Perl 5.14. I decided to leave the system Perl alone, and use perlbrew to maintain my own Perl installation. But I knew that would take hours with my reduced bandwidth, and I didn't want to wait until then to read my mail.

So I had the bright idea of installing Mail::Audit in ~/perl just to be able to run my mail filter. I downloaded Mail-Audit-2.225.tar.gz from a CPAN mirror and ran Makefile.PL, only to be warned that File::HomeDir, File::Tempdir, and MIME::Entity were missing. I tried to install using the system, only to find still more dependencies: Test::Tester, File::Which, Test::NoWarnings, Test::Script, Probe::Perl, MIME-tools, IPC::Run3, and Test::Deep. Something amongst that collection failed to install, and I was left looking at several screenfuls of failing tests.

Do I understand that the use of File::HomeDir and IPC::Run3 probably allows users of Windows and VMS to use Mail::Audit? Yes. Am I glad that all of these modules have comprehensive test suites? Yes. Could I have fixed the problem? Sure, if I had spent some time investigating. But my newly-installed gnome-terminal wouldn't scroll back far enough, and I suddenly remembered that procmail, inscrutable as always, was already installed.

Ten minutes and some regex-surgery on my filter script later, I had cobbled together enough of a .procmailrc to begin reading my mail.

(I'm not overly fond of CPAN dependencies, but this post is about my mail filter growing into something that demanded more attention than procmail, not about Mail::Audit having too many dependencies per se. For comparison, I am a reasonably happy user of Email::Stuff in some of my apps, and that has even more dependencies.)

Ubuntu 11.04 on an Asus P7H55

A month ago, I returned from a work trip to Kolkata to find my computer dead. None of the tricks learned during its eight years of service could coax it back to life, and I was forced to visit Nehru Place the next day to buy a new motherboard. I was disappointed by the lack of variety in the models available, but had too little time to explore. I wanted an Asus P7H55D-M Pro, but had to settle for the Asus P7H55 that RR Systems unearthed after much consultation on the Nehru Place bush telephone. I got an i3-540 CPU and 8GB of RAM with it, and had to buy a Radeon 4350 PCIe video card too (since the P7H55 doesn't support the on-die graphics of the i3/i5 processors).

I was too busy with work to do more than install the new hardware and continue to use the existing (32-bit) Ubuntu 10.04 installation. Given my track record of upgrading, I may have left it that way for a year or two, but for two things—the thought of half my RAM being unused was sad, and the machine wouldn't boot reliably. The latter problem was difficult to pin down, but I finally isolated it to the Via VT6415 IDE controller. Sometimes the kernel would hang just after enumerating the IDE devices (one of which was my root disk). Disabling the controller solved the problem, but meant I had to set up a new installation on a SATA disk.

Last night, I finally installed Ubuntu 11.04 (whose slick new installer does work in the background while waiting for you to answer questions!), and got my machine up and running with surprisingly little trouble. The proprietary ATI fglrx video driver continues to be horribly broken, but video performance has improved dramatically even without it (but I don't know if that's because of improvements in the open-source radeon driver, or something else). Installing LTSP and booting 32-bit clients worked flawlessly. The only thing I haven't figured out how to do yet is to switch back to using fvwm2 as my window manager, but that can wait.

And now all of that lovely 8GB of RAM is accessible.

Virtual servers at E2E Networks

For a recent project, I needed to find reliable server hosting with good connectivity inside India. After doing some research, I decided to use E2E Networks, which offers reasonably-configured virtual servers at good prices, and has well-connected hosting facilities in Delhi and Mumbai.

Read more…