Category Archives: Arch Linux

The masses have spoken: The ’41s

I wasn’t expecting the avalanche of replies and e-mails asking — sometimes demanding — to hear more about the hardware I have in the house right now. I’m flattered, and just for the record I wasn’t being self-deprecating or fishing for compliments when I said reading about my old junk would be boring. I honestly thought it would get a bit tedious.

But apparently not. So I might as well drag out a couple more basement dwellers, and show them the light of day. Here are a couple I refer to obliquely as “the ’41s.”

2014-08-19-kl-mkc96-t41 2014-08-19-lv-c5551-x41

Through some twist of fate I came up with two Thinkpads from the same release era: the X41 tablet on the right and the stock T41 laptop on the left. Every picture tells a story, so here’s a little background for each.

The X41 was a deliberate purchase that coincided, ironically, with my plan to transfer all my personal electronic documents to an encrypted live system. This is a true Centrino, with the 915 graphics card, a 1.5Ghz processor and PRO/2200 wireless.

00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 11)
04:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d)
04:00.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 13)
04:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)

It’s a good combination for Linux in particular; I haven’t seen a thing on this computer that required more than the tiniest measure of configuration. About the only hiccup I ever see is a recent hesitation by the 2200 card to keep connections under Arch Linux. I see this in other machines though too, so it’s not specific to this computer.

Courtesy of inxi:

System:    Host: lv-c5551 Kernel: 3.13.0-32-generic i686 (32 bit, gcc: 4.8.2) Desktop: Gnome Distro: Ubuntu 14.04 trusty
Machine:   System: IBM (portable) product: 18665GU version: ThinkPad X41 Tablet
           Mobo: IBM model: 18665GU Bios: IBM version: 75ET34WW (1.05 ) date: 09/07/2005
CPU:       Single core Intel Pentium M (-UP-) cache: 2048 KB bmips: 1197.1 clocked at 600.00 MHz 
           CPU Flags: acpi apic bts clflush cmov cx8 de dts est fpu fxsr mca mce mmx msr mtrr 
           nx pae pbe pge pse sep ss sse sse2 tm tm2 tsc vme 
Graphics:  Card: Intel Mobile 915GM/GMS/910GML Express Graphics Controller bus-ID: 00:02.0 
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1024x768@60.0hz 
           GLX Renderer: Mesa DRI Intel 915GM x86/MMX/SSE2 GLX Version: 1.4 Mesa 10.1.3 Direct Rendering: Yes
Audio:     Card: Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller 
           driver: snd_intel8x0 ports: 1c00 18c0 bus-ID: 00:1e.2 
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-32-generic
Network:   Card-1: Broadcom NetXtreme BCM5751M Gigabit Ethernet PCI Express driver: tg3 ver: 3.134 bus-ID: 02:00.0
           IF: eth0 state: down mac: 00:0a:e4:3b:c5:b2
           Card-2: Intel PRO/Wireless 2200BG [Calexico2] Network Connection driver: ipw2200 ver: 1.2.2kmprq bus-ID: 04:02.0
           IF: eth1 state: up mac: 00:13:ce:86:7f:18
Drives:    HDD Total Size: 40.0GB (9.0% used) 1: id: /dev/sda model: HTC426040G9AT00 size: 40.0GB temp: 31C 
           Optical: No optical drives detected.
Partition: ID: / size: 36G used: 3.4G (11%) fs: ext4 dev: /dev/sda1 
           label: N/A uuid: 01e3748a-7b12-457b-b480-32d25b36afa8
           ID: swap-1 size: 1.60GB used: 0.00GB (0%) fs: swap dev: /dev/sda5 
           label: N/A uuid: f1d61a8b-cd4a-4d44-8acd-b1accc79dd11
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Unmounted: No unmounted partitions detected
Sensors:   System Temperatures: cpu: 46.0C mobo: 39.0C 
           Fan Speeds (in rpm): cpu: 0 
Info:      Processes: 152 Uptime: 10 min Memory: 334.2/1499.9MB Runlevel: 2 Gcc sys: 4.8.2 
           Client: Shell (bash 4.3.11) inxi: 1.9.17

Yes, that does show Ubuntu 14.04 on it; the photo is a much more agreeable Arch Linux system. But I’ve never used a tablet computer for any length of time, and I have talked down the Unity interface for so many years, I figured I should at least test it in a tablet/smartphone style before continuing to deride it.

It’s more or less what I expect: It’s completely unintuitive for me as a regular desktop user, the application search tool is particularly obtuse, and I really, really dislike the injection of so much Amazon and online searching crap. But it’s not intended for me, so my complaints are moot point. Perhaps some other time I’ll tell you what I really think about it.

Here’s it’s bigger brother, the T41:

00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV200/M7 [Mobility Radeon 7500]
02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
02:01.0 Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
02:02.0 Ethernet controller: Qualcomm Atheros AR5212 802.11abg NIC (rev 01)

And from inxi:

System:    Host: kl-mkc96 Kernel: 3.15.8-1-ARCH i686 (32 bit gcc: 4.9.1) Desktop: N/A Distro: Arch Linux
Machine:   System: IBM product: 2375FU1 v: ThinkPad T41
           Mobo: IBM model: 2375FU1 Bios: IBM v: 1RETDRWW (3.23 ) date: 06/18/2007
CPU:       Single core Intel Pentium M (-UP-) cache: 1024 KB bmips: 3191 clocked at 1600 MHz
           CPU Flags: acpi bts clflush cmov cx8 de dts est fpu fxsr mca mce mmx msr mtrr pbe pge pse sep sse sse2
           tm tm2 tsc vme
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RV200/M7 [Mobility Radeon 7500] bus-ID: 01:00.0
           Display Server: N/A drivers: ati,radeon Resolution: 145x55
Audio:     Card Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller
           driver: snd_intel8x0 ports: 1c00 18c0 bus-ID: 00:1f.5
           Sound: Advanced Linux Sound Architecture v: k3.15.8-1-ARCH
Network:   Card-1: Intel 82540EP Gigabit Ethernet Controller (Mobile)
           driver: e1000 v: 7.3.21-k8-NAPI port: 8000 bus-ID: 02:01.0
           IF: enp2s1 state: up speed: 100 Mbps duplex: full mac: fc:1f:19:e1:a9:0d
           Card-2: Qualcomm Atheros AR5212 802.11abg NIC driver: ath5k bus-ID: 02:02.0
           IF: wlp2s2 state: down mac: 00:05:4e:47:fd:c4
Drives:    HDD Total Size: 30.0GB (94.1% used) ID-1: /dev/sda model: IC25N030ATCS04 size: 30.0GB
           Optical: /dev/sr0 model: MATSHITA UJDA755zDVD/CDRW rev: 1.20 dev-links: cdrom
           Features: speed: 24x multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw state: running
Partition: ID-1: / size: 28G used: 27G (96%) fs: ext2 dev: /dev/sda1
           label: N/A uuid: dcff29f5-b72d-40dc-9535-704e57eea88e
           ID-2: swap-1 size: 0.21GB used: 0.03GB (16%) fs: swap dev: /dev/sda2
           label: N/A uuid: f93b41a6-efd1-4cc1-9248-ed09f27d26b0
Info:      Processes: 71 Uptime: 6 days Memory: 139.1/498.4MB Init: systemd Gcc sys: 4.9.1
           Client: Shell (bash 4.3.221) inxi: 2.1.29

The T41 has a little more interesting history: I literally pulled it out of a trash heap a couple of months ago. The hard drive had been physically ripped out, taking with it a chunk of the palmrest, and there was no power cord. But the battery was there, and everything else was intact.

I took it home, diagnosed its shortcomings and checked on replacement parts. A meager US$16 later, it had a new palmrest, a new drive caddy and cover, and a compatible after-market power supply. Reborn, from the ashes of its previous self.

It has a few eccentricities though; most recently it has become somewhat hesitant to start. The normal Thinkpad lamp test finishes, the battery light illuminates, but the BIOS logo screen never appears. It’s a little disappointing, but the problem seems to revolve around using the power cord and battery together — start from battery alone and it’s fine; start from power cord alone and it’s fine; connect both at the same time and there’s some sort of unhappiness in there.

But I’m still pursuing that. I am a patient person; if it is suffering through the last of its short life, I’m willing to work with it and offer palliative care. ;)

That’s about it for now. Machines come and go in this household; I divested myself of two dual-core Latitude machines just a week or so ago. Don’t ask about those; I’m doing my best to keep you up-to-date, and a week makes a big difference around here. :mrgreen:

The trailing edge of the wave: The CTX EzBook 800

For as many times as I’ve introduced old laptops on this blog, you’d think I’d have a formula or a template page tucked away somewhere.

But I don’t, and here we are again with another underdog to report. I hope it’s not too dull for you; if it’s any consolation, I have three or four other laptops that I haven’t bothered to mention, because I imagine it to be terribly boring for you.

This one though, I feel is noteworthy. Not because it’s a cherished acquisition, like this one is, but because it’s such a curmudgeon that I have a feeling someone, somewhere down the line — probably me — will need information about it in the future. So I put it here, to avoid slogging through all the quirks again. And because that’s what this site was originally for. ;)

2014-08-06-ezbook-800-bootup

This is a CTX EzBook 800, the top-of-the-line model for EzBooks of 15 years ago. It’s a pure K6 machine, meaning it lacks a lot — and I mean a lot — of the requisites that most people saw in the computers of a decade ago, let alone now.

I got this as a castoff from a friend, who is also a bit of a technophile and prefers to work with out-of-date machines for a number of reasons. My friend is primarily a Windows person though, and I have a feeling this was such an underperformer that he was glad to see it go. I know he considered putting Linux on it and even asked a few questions online, but was out of his depth and didn’t see much future in it.

Apparently he paid about $1 in an online auction for it, plus the cost of a new power adapter. Not bad.

This is not my first EzBook, and that was one of the reasons I agreed to adopt it. I have had 700 and 700E models in the past, and if I remember right, that 700E was one of my first test runs with Linux. It didn’t go well, but I lacked the experience then to make it work.

And it seems that I still lack some experience now, given my rather lackluster success at getting the 800 version to sing along. Not that I have terrifically high expectations, but I do have a reputation to preserve. :???:

Here’s a rundown on the guts, and I can explain the implications later.

00:00.0 Host bridge: Integrated Technology Express, Inc. IT8330G (rev 03)
00:10.0 VGA compatible controller: Neomagic Corporation NM2160 [MagicGraph 128XD] (rev 01) (prog-if 00 [VGA controller])
00:12.0 ISA bridge: Integrated Technology Express, Inc. IT8330G (rev c1)
00:12.1 IDE interface: Integrated Technology Express, Inc. IT8330G (rev 11) (prog-if 0a [SecP PriP])
00:12.2 USB Controller: Integrated Technology Express, Inc. Unknown device 1234 (rev 03) (prog-if 10 [OHCI])
00:18.0 CardBus bridge: Texas Instruments PCI1131 (rev 01)
00:18.1 CardBus bridge: Texas Instruments PCI1131 (rev 01)

The hard drive is a Fujitsu MHD2032AT, and the optical drive is a TEAC CD-220EA. My friend maxed out the memory at 128Mb, which complements the 300Mhz K6 quite nicely. I’ve had good success with NeoMagic cards (better than the Tridents, that’s for sure >:( ), and having USB ports on a machine this old makes it an absolute treasure. Phoenix made the BIOS, which is important because the USB ports and a few other things are enabled or disabled through that.

There are some critical points in there, if you’re fighting with a similar machine or one from this era. Please bear with me, and I’ll work through them slowly.

My friend said he could get no modern version of Linux to work on it, and even though I suggested both Slackware and Debian, he still claimed no success. I can attest to that now: Both Debian 7.x and Slackware 14 ran into problems either locating the CDROM or hard drive, or both. You can add these to that list:

  1. Alpine Linux 2.7 for x86, which boots and will configure itself to the live CLI environment, but can’t find the hard drive.
  2. Puppy Linux, slacko in the non-PAE version, which spit out errors demanding a CPU with cmov.
  3. TinyCore, in its newest version, which reached text mode but couldn’t find the hard drive or CDROM.

In most cases, those were dealbreaker attempts, because the live or installation environment couldn’t find hardware I would need to move forward. Here are some others that fell flat, but for slightly different reasons.

  1. Crux Linux 2.7, which was the last i586 rendition. Refused to boot past connecting to the CDROM and ended in the jaws of the mythical “can’t access tty; job control turned off” error.
  2. Debian 5.1, which installed but boots into a soft lockup and seems content to spend eternity reporting its hopelessly frozen state at 90-second intervals.
  3. *buntu versions after 6.10, which usually didn’t get so far as Debian 5.1, and reported no hard drive or no CDROM or both.
  4. Slitaz, the 4.0 release, which booted into text mode and would allow me to install, but locked on boot.

Just out of curiosity, I also tried:

  1. ReactOS 0.3.16, the live rendition, which amazingly worked better on that machine than any other I’ve tried in recent years. I reached a Windows-esque blue desktop and a brief show of some wallpaper, but then it hung and became unresponsive. That may have been a low-memory complication.
  2. FreeDOS 1.1, which took an exceptionally long time to install, and would boot with the assistance of the installation CD. From there it would need the obvious additions of useful software and perhaps a graphical desktop.
  3. Clonezilla in recent 486 versions couldn’t find the hard drive, which is only important because it means any system I build on there will have to be dd’d off via USB1.1 for backups. :shock: Oh well, it’s not the first time. …

The real plot twists come here:

  • Ubuntu 6.06.1 and Xubuntu 6.06, both of which would find the hard drive and CD drive, and install over the course of an hour or so. The resulting desktop was forced into 800×600 (on a 1024×768 screen), and was marginally useful. I tried hand-editing the xorg.conf file but only managed to bork the display so badly as to require starting over. No network access through the PCMCIA port, which sounds familiar.
  • DSL 4.4.10 would of course work, but I ran aground again with the system freeze on wireless insert bug, which I blame on the 2.4 kernels. I used to suspect the PCMCIA-to-CardBus switchover for that, but it seems even CardBus PC cards inserted into a CardBus bridge will trigger it. My only orinoco-based card just doesn’t respond with DSL. :(
  • Crux 2.4 for the i586, which includes kernel 2.6.23.9 by default but could have a newer one implanted. Booted, found CDROM, found hard drive, and installed without major incident.

For me, what is at issue here is the evolution of PC hardware away from ISA-based components to the standards which are more common now. Along with that, there was the shift away from the old kernel support for PATA hard drives to the newer SATA-style code. Add to that an ATAPI CD drive, and it’s easy to see why some distros just didn’t work, and others worked reasonably well.

You can almost pick out a month and year when the trailing edge of the wave fell away. This machine seems to have ridden the far edge of that crest, and as a result finds itself drifting on the other side. :sad:

My proof for this is in the kernel configuration for Crux 2.4, where the old-style ATA options are enabled and all the drives are found. That should correspond to the mid-2000s versions of Ubuntu, where the last support for those same drives is found. After 6.10 or so, the machine falls off again.

I can’t account for Lenny’s soft lockups though, and I don’t see much help online for that particular issue. I tried the old noacpi gimmicks from a decade ago, but whatever plagued the 5.x versions of Lenny persists.

But all is not lost. If I absolutely gut Crux’s 2.6.23.9 kernel, I can compile it in about 45 minutes at 300Mhz, and best of all, I can boot to a graphical desktop with blackbox, which comes by default. (Now you understand my recent affection for blackbox. ;) )

In fact, short of getting a CardBus network adapter to respond, the entire machine works fine.

And depending on how CDs I’m willing to burn, I could conceivably hopscotch my way up from 2007 to circa 2011. The bulk of those packages is precompiled and available on the ISOs, with the exception of the contrib ports. And I have time these days to babysit it, as it churns away at the code.

There’s a little voice in my head that keeps telling me to yank the hard drive and install it externally, and then replace it. Usually there’s another little voice right after that one though, that says I’m too clumsy to get the case open on this without cracking or scratching the body somehow, and it’s too pretty as it is.. And of course, there are no service manuals online any more. … :(

So while all is not lost, this is definitely on the verge of falling through the cracks. And let’s be clear: I have no aspirations of bringing this machine into the 21st century, or for that matter, playing a YouTube video with it. Those days are over, friends. We have the Internet to blame for that.

I can’t deny it’s a terrific challenge though, and I am enjoying smacking my head against the screen for hours on end. But it does feel good when I stop. ;)

blackbox, as seen in the wake of Openbox

I haven’t posted much here lately, and that’s a sure-fire sign that I’ve been quite busy. You probably know what with. ;)

Yes, after literally years of baby-stepping through the alphabet, I finally finished that ginormous list of applications for the console. The one that I discovered four years ago, dragged around for another couple of years, and finally dissected over the course of the last 18 months.

So, yes, in that alone I’ve been quite busy.

On top of that though, there have been some recent hardware adoptions that I’ll show off later. A couple of them are real prizes, and some might be … curses. More on that in the days to come.

Today though, I needed to come to grips with blackbox, for reasons that will be clear in the future. Suffice to say that it was worth learning on my “production machine,” and sounded vaguely like fun after May’s run-in with twm.

2014-07-13-6m47421-blackbox

That’s Arch Linux again, for no particular reason other than it was easier to strip down my existing Arch-based desktop, and build it back up again with blackbox.

I first remember blackbox from my very earliest days with Ubuntu, and I daresay I tried blackbox before I ever got into Openbox. I even tracked down the original how-to I used to set it up, almost a decade ago.

Some of what’s in that post doesn’t really apply though; there are small changes in what bluevoodoo1 was doing, and what you can do with Arch now, eight years later. Most of those changes are not deal-breakers.

I have to give blackbox credit for being infinitely easier to configure by hand than Openbox. The menu system is strictly brackets-parentheses-braces, for the command-title-executable, and that’s a huge advance over Openbox’s XML-based configuration files. Yes, I know I’m a weakling for complaining about XML. I’ve learned to live with my shortcomings.

Configurations, if you can believe this, are mostly done through the right-click menu. There are quite a lot of settings that will require you to edit your .blackboxrc file — especially the path to your styles (think: themes) — but I’d guess 90 percent of blackbox’s setup is handled through the right-click menu … a la Fluxbox.

And since I mentioned it, blackbox “styles” are fairly easy to handle too. I don’t hold theming against Openbox since that’s generally a single file that needs attention. And part of that can be managed through obconf.

From a ground-zero setup I’d have to say blackbox was quite manageable. I had it up and working in a matter of minutes, and configured to my liking over the course of an hour or so, while I allowed myself to be distracted by events on television.

Once it’s in place, it plays a lot like Openbox, with obvious additions and subtractions here and there. blackbox has its built-in “toolbar;” I don’t recall seeing anything like that in Openbox. blackbox has a “slit” that I generally ignore; I don’t think Openbox uses a slit (Fluxbox did, last time I checked).

Openbox can do a few things blackbox can’t, of course. Most painful to me are the loss of programmable hotkeys — Super_L+1 for alpine, Super_L+2 for Midnight Commander, and so on. If I understand things right, there was a bbkeys utility, a half dozen years ago, that could handle keystrokes like that, but has since faded away. AUR can’t build it, and Debian dropped it.

On the purely aesthetic front, it would be nice to insert proper separators into right-click menus. All my menus in blackbox look like hastily scrobbled lists of programs mashed up against each other. And since I can’t relegate them to key presses, the list is longer and scrobblier than ordinary.

I do admire blackbox’s austere default schemes though. As you can see above I removed some of the frills that remained and came up with a very flat, very rectangular desktop … that springs into life like a 1950s American housewife on prescription methamphetamines.

So in spite of reaching maturity at a time when dual core machines were just mirages in the desert, blackbox has managed to win a few points with me. It definitely shows a degree of greater usability than twm, even if it never approached the feature-completeness of Openbox.

But really: Yes, it doesn’t have all the bells and whistles that Openbox has learned over the past decade, but it does manage all the fundamentals without becoming overburdened with XML gobbledygook or bogged down in the need for endless ancillary graphical tools.

I never thought I’d say it, but in that sense, I prefer this to Openbox. :shock:

betty and the cult of personality

There’s a case to be made for making things easier — particularly for newcomers. And of course, there’s a case to be made for keeping things as they are, and expecting everyone — newcomers included — to learn the basics and gain some ground-level proficiency.

I’ve seen more than a few web sites and forums drop links to betty over the past couple months, most touting it as a way to use natural (English) language patterns at the console. For Linux newcomers or CLI-o-phobes, betty is probably a godsend.

As I understand it, betty interprets a request and attempts to link it to a standard Unix-ish command. I like the idea; it suggests one could send instructions to a computer, using natural language (or perhaps even speech-to-text), and expect an intelligible answer or appropriate action.

Usually betty does a pretty good job, so long as she (I’ll just call her “she” for convenience ;) ) can figure out what you want.

2014-06-08-6m47421-betty-01

And that’s the real trick: Making sure what you want is what betty understands. For example, she has no issue at all with this:

kmandla@6m47421: ~/downloads$ betty how many words are in this directory

She dutifully replies with:

Betty: Running find . -type f -exec wc -w {} \; | awk '{total += $1} END {print total}'
100

which in this case, was correct. Unfortunately, ask

kmandla@6m47421: ~/downloads$ betty how many files are in this directory

and betty returns:

Betty: I don't understand. Hopefully someone will make a pull request so that one day I will understand.

It’s odd to me that betty can tear apart a directory to count out individual words, but gets confused when asked how many files there are. Is word counting in a directory a command used so frequently that it gets taught to betty? I honestly don’t recall ever needing that before, although I daresay I could piece it together on my own, if I had to.

Moreover, is it really more convenient to type out “betty whats my username” — and here, it’s actually important to deviate from correct English punctuation, because the apostrophe would throw bash into a tailspin — than just to use whoami? whoami is shorter, and given that it’s just a contraction of the natural English words “who am i”, I don’t see how betty’s way is an improvement.

betty’s git page has a long list of precise commands she understands, and can reply to. I have an even longer list of precise commands that betty has no knowledge of, and can’t seem to comprehend — most of which are just one-word changes, like above.

It’s my unfortunate opinion that betty is no more effective or efficient than a mile-long .bashrc jam-packed with aliases for specific commands. If betty doesn’t actually pick apart and interpret a command, in the same way a valid artificial intelligence might, then what betty actually does is obfuscate things: She turns most basic commands, some of which were derived from natural language, into longer commands that carry their own eccentricities.

In other words, betty is the anti-alias. :shock:

The entire business reminds me of a time a few years ago, when I accompanied our CEO on a survey of a local school building in Japan. In the lull between our arrival and meeting the school representative, my boss showed me his smartphone, and demonstrated how it could interpret his speech and return a map showing directions to the school.

Except it didn’t work. He tried four or five times, rephrased his question four or five different ways each time, and the closest he got was the home page for the school. The arrival of the representative saved him the embarrassment of admitting it wasn’t as great as he liked, and me the embarrassment of pointing out that he could have gotten the same information directly, 10 minutes earlier, if he had taken charge of the situation and sought out the map himself.

Shortcuts and gee-whiz tools aren’t really improvements if they don’t work in the way people think and behave. Expecting someone to type out the exact line “betty please tell me what is the weather like in London” (which is supposedly a valid command but returned an error from the git version I installed in Arch) is not an improvement for anyone who instinctively asks, “betty what is the weather in London” or “betty what is the weather report for London”.

On the other hand, learning whoami and its syntax means you can probably navigate almost any variation on “betty whats my username” … with or without the punctuation errors.

I didn’t intend for this to be a hate-fest against betty; as I said above, I like the idea, and I think were it to actually parse and deconstruct language and find a likely solution, it would be near-genius.

My complaint is partly in the fact that, as it is, it’s no improvement — in fact, it’s quite the opposite. And partly in the fact that, as it is, I can get the same results from a long, long list of aliases.

And partly in the fact that, as things are, Linux users seem too eager to join the cult of personality of any tool that “streamlines” console lifestyle, without really taking into account what the tool does … or doesn’t do. :|

imlib2 and @my_libs@

Nostalgia struck this morning and I was pining after the wmhdplop and wmforkplop dock apps, from … gosh, more than seven years ago.

If you don’t know what those are, or if you don’t remember, the home pages are here and here, and in action, they look like this:

2014-05-10-6m47421-wmhdplop-wmforkplop

That’s them, up in the corner. Yes, they are quite obtrusive. I know. :roll:

Dock apps are my few extravagances, and these two are really the only ones that have survived over the years. Imagine my surprise today when the tried-and-true PKGBUILDs out of the AUR spat out ugly little gcc errors instead.

 gcc: error: @my_libs@: No such file or directory 

This is odd. And what is that “@my_libs@” stuff? I don’t ever recall seeing a gcc error like that before. Of course, I have all the compiling prowess of a dusty brick, but still. …

For once, rather than just yammer mindlessly about it on this site, I put on my deerstalker cap and went investigating. :|

To make a ridiculously long and uninteresting story into a short and only a little more interesting story, the culprit is … imlib2, of all things. Apparently that “@my_libs@” string appears in version 1.4.6 of imlib2, which dates back to around Christmas.

I don’t know what exactly @my_libs@ is supposed to mean there; apparently the packaged imlib-config.in file is some sort of configuration script. It could be stereo instructions for all I know. :roll:

But the Linux From Scratch gang, with the electric precision that earned them their reputation, decided that it was best excised from the source code. With extreme prejudice.

I’m all for that. In short, if you build imlib2 from scratch, either with ABS or yaourt or whatever, do this first:

sed -i 's/@my_libs@//' imlib2-config.in

You should end up with an installable version of imlib2 that doesn’t trigger gcc errors when you attempt to build wmhdplop and wmforkplop. :???: Which was the original goal. :D

The resulting package, to the best of my knowledge, is perfectly compatible on every other front, and perhaps even an improvement in that it doesn’t cause problems. I think. :shock:

I’m debating if this is bug-worthy for the Arch version; it seems like this occurs waaay up the food chain, back to the Enlightenment crew. I’ll at least leave a note on the AUR pages for whoever stumbles past them. ;)

twm, because what’s old is what’s new

I saw a screenshot for twm last week, and it inspired me enough to swing past it for the a couple days. This was my inspiration:

twm

What I managed to create was:

2014-05-07-6m47421-twm-rhapsody-palemoon-vim

That’s Arch Linux again, and it was not the terribly long and uphill journey you might imagine. If you’ve ever worked with Openbox, you’ll have no problem getting twm to do something similar. And in some ways, twm has an edge.

For one, twm is incredibly fast. Window moving and resizing are exceptionally quick, even on decade-old hardware. htop says it’s taking up less than 0.3 percent of the memory out of 1Gb available, which suggests less than 400Kb, while managing five or six windows. To the side of that machine I have a D830 with 4Gb of memory in it running Musca, and the difference is between the window managers is trivial.

Also on the plus side: Most everything you could want to do with twm — colors, borders, menus and submenus — is done in one configuration file, and in a straightforward arrangement.

You can specify per-application settings, desktop-wide color schemes, and exact per-window cursor behavior. You can even jam theme settings directly into your menu, and twm handles it with grace.

It’s simple, and doesn’t have too many frills to distract you. It keeps things clean and fast, but doesn’t become the tiling window manager du jour.

Of course, there are some things I don’t like about twm, or things that I’m used to that I find it difficult to work without. To wit:

  • First and most obvious, twm’s focus model. I realize this dates back a human generation, but it’s immensely irritating. A window has focus when the mouse moves over it. But that does not raise it, which means grazing the touchpad or bumping the mouse while you type sends commands into the next window … or into the ether.

    Similarly (and this is a little hard to explain), it also means when you spawn windows, they are not necessarily focused. Start an application and you get a ghost frame that you can maneuver into place, then click to drop. It’s a good idea, and makes things very fast for older hardware.

    However, if you click and don’t shift the mouse back over the same window, it doesn’t have focus. Which means you have to learn the habit of spawn-shift-drop-then-mouse-over, to actually use the program.

  • The rules to raise windows are a bit strange too. You can give focus to a window by mousing over it; that we already discussed. You can click on a window, and again, it has focus. But a window doesn’t raise to the top layer until you click specifically on the title bar.

    Unfortunately, that means if you’re like me and you have a tendency to “lose” applications in the stack on your desktop, you might end up shuffling things around to find out what the heck you’ve been typing, and see the whole application. Needless to say, it takes some getting used to.
  • There are no layering options for pinning windows to the top, or trapping them at the bottom. Those are features from IceWM and Openbox that, believe it or not, I need on a daily basis.
  • I’m not a fan of the icon manager. I can’t explain that any more than to say try it, and see if it strikes you as cumbersome too. I’m used to a middle-click in Openbox that shows every window, minimized or not, and you can jump straight to them. Since the iconmanager is not quite a panel, it behaves more like a hidden application that holds all the icons that are running, which has to be unminimized in order to unminimize something else. :???:
  • As best I can tell, twm can’t do xft fonts in borders. I might be mistaken and maybe there’s a patch, but I saw/found nothing to suggest otherwise. Of course, that may be part of what makes it fast. And of course, your applications can use xft fonts, so it’s not a hindrance.
  • There are plenty of options for custom mouse clicks, but I had difficulty getting Mod4+Key hotkeys set up. I don’t think twm was ever really meant to spit out a file manager when I press Mod4+2, or trigger gmrun with Alt+F2. I should really try that again, though.

I know some of these things could be corrected, or at least sidestepped, with a little more time and a little more trial-and-error in my .twmrc file. After a while though, I grew disinterested. I am ashamed. :oops:

I have some other minor complaints, but I don’t want you to get the impression that twm was a bad experience. If you run your Openbox sessions close to the bone, or if you can live without all the doodads that come bundled in IceWM, or if you like tiling window managers but you’re homesick for something with a title bar on it, twm is not a bad option. I might use it again, on something with less muscle.

For what it’s worth, and for my own reference later, I’ll drop my .twmrc file here, after the more tag. If you need better ideas or a few other options to spur your interest, try Graham’s TWM page, which helped me build my .twmrc much quicker than picking through the man page. Oh, and of course, xwinman.org has a page on twm and its cousins. Oddly enough, the Arch Wiki page on twm is a bit scant. Perhaps I should do something about that. :|
Continue reading

Animated gif previews of video files

A few months ago I won some bonus points with the boss, in a way that deserves keeping a note here.

Our office keeps a large collection of training videos on a networked drive, as part of the orientation program. New employees walk through them in sequence as part of their introduction, and I expect other companies may do something similar.

The files are named with a complex numbering system though, and it doesn’t lend itself to the actual topic of the video. We’ve mentioned that to the training staff and IT specialist, but it’s rather far down the list.

I took the initiative one afternoon and following a lead by Prashanth Ellina, found a way to thumbnail a video frame, and use that as a preview.

Prashnath’s command works like a charm for run-of-the-mill AVI files.

ffmpeg  -itsoffset -4  -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg

My only addition would be the -y flag, which overwrites old images; that really only comes into play while you’re testing the output though. ;)

A picture is worth a thousand words, so a six-frame animated gif is probably worth about 6,000 — and that’s my contribution to Prashanth’s trick. You’ll need imagemagick for this part:

for i in {10..70..10} ; do ffmpeg  -itsoffset -${i}  -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test-${i}.jpg ; done ; convert -delay 75 -loop 0 test-* test.gif

And the end result is a simple, six-frame looping gif that shows the content of the first minute or so of the video.

Since our videos all incorporate the same 10-second intro before showing a title screen and opening the lecture, this gives us a snapshot opening frame, followed by a few moments of content. It’s easy to see what the topic is, and remember where you are in the sequence.

You could adjust that loop to start at the 60 second mark and snap a frame every minute, or however you like. It’s convenient and flexible, and the end result can be seen in a browser or an image viewer, so it doesn’t rely on specific software.

The only downsides that I can see involve how ffmpeg tracks to those points in the video: it runs out to the 10-second mark, then snaps. Then restarts, spins out to the 20-second mark, and snaps. Then 30, 40 and so forth, taking a longer time to track out each time.

I don’t know if there’s a way to adjust Prashanth’s original command and just loop through once, and snap at every 10-second interval. I leave that to higher minds than mine.

But it might be inconvenient if you have a lot of videos to gif-ize. In our case it was about 50-60 videos, which was easy to loop through but took about half an hour to process. The end results were worth it though.

This worked for me in Arch, but I don’t see how it wouldn’t work with almost any other Linux flavor that includes ffmpeg. And since Prashanth’s command dates back to 2008, I think earlier releases would be fine as well. For what it’s worth, I’ve used this with Flash videos too.

And that … is everything. For now. :mrgreen: