Category Archives: Arch Linux

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:

It’s like 2002 all over again

This long and rather rambling observation has its roots in a small, but innocent mistake I made about five years ago. And believe it or not, I documented that mistake here.

I have a lot of favorite machines that stick out in my memory years after they’ve passed on to new owners or the digital afterlife. There is an obligaory parade of forgotten machines, but some are definitely easy to remember.

This was one. And this one, while it was a whipping boy, was not easily forgotten. This one met with an unfortunate end that no one was to blame for. And for my money, there are still not many computers better than this one.

The mistake though, and the domino effect that brings me to this page, was sending this machine on to a new owner.

Like them or hate them, the 8000-series of Dell laptops from the turn of the century were some of the last ones to really tickle my technophile funny bone.

An 8000-labeled machine could handle a mid-market Nvidia GeForce4 440 card at 1600×1200, which in 2006 was more than enough to run Compiz in Ubuntu, or Neverwinter Nights at native resolution in Linux. (Don’t try that with Ubuntu now. :evil: )

The 8000 could hold a Pentium III chip up to 1.4Ghz, if I recall correctly. And the top-of-the-line 8200 machine, with a BIOS upgrade, could wrangle with the manly 2.6Ghz Pentium 4 — and, rumor has it, a 64Mb Nvidia Quadro4 Go GL.

On top of that, removable side and front media bays, support for dual hard drives, and the alternative to connect an external drive by parallel cable. Plus the option for not-just-one-but two batteries, a mini-PCI expansion slot (think: Intel wireless card) … and maybe best of all, the unspoken ability to handle 2Gb of PC2700 memory, although Dell wouldn’t document it.

Even the palmrests could be swapped out for six or seven different colors. :lol:

Short of building your own laptop out of a whitebox, the 8200 was probably the best you could expect to get from a mainstream computer company. You’d need to move into desktops to get something more flexible.

Getting into and out of an 8000-era machine was a piece of cake too. Four screws and the keyboard came off, putting you within striking range of the processor and video card. Three more screws and the screen was off. A few more, and the entire business unfolded like a string of paper dolls.

Dell followed the 8200 with a complete redesign — a shift into the silver casings and slimmer, lighter forms of the 8500 and others. The 5150 was released in 2003, the 8600 soon after. I’ve owned an 8600, and while it was smaller and lighter, it wasn’t nearly as much fun to tear down and build back up.

Around five years ago I decided it was time to part with my 8000, for reasons that sounded good at the moment. Many times since then I’ve wondered if I did the right thing. About six months ago I started thinking that the uncanny valley of computer pricing might put an 8000 back in range, and I started watching auctions.

And about a month ago, I came across an 8200 that was seemed clean and complete, without undue wear and tear, and the price was right … all of about US$60. :shock:

I did not misplace my investment. The seller claimed the machine was clean, but s/he didn’t say it was museum quality. I couldn’t have asked for a more perfect specimen. Impeccable screen, not a scratch anywhere, 1Gb of memory, carrying case included. I’ve even been inside the machine twice, and I can’t find any dust. The only sign of use is a small worn spot on the touchpad. (Well, of course the battery had failed. :roll: )

2014-04-22-6m47421-portrait

It’s like 2002 all over again. ;)

I’ve since done the final BIOS update and dropped in that beastly 2.6Ghz chip, as well as a 64Mb GeForce4 440. It’s got a proper wireless card now (I won’t patronize Broadcom, even in a 12-year-old laptop) and a second hard drive. I’m waiting for a DVDRW and a pair of sparkly green palmrests. :roll: And ironically, the system drive it is using right now is the same one I bought years ago, for my original 8000. Imagine that.

2014-04-22-6m47421-icewm-firefox-audacious

It’s a good feeling. It’s one part nostalgia and one part having the luxury of rebuilding a machine to its practical summit at a price that isn’t astronomical. I said once a long time ago that technology prices follow a strange curve, bottoming out after about 8 years and then spiking back up when people start to attach the word “vintage” to it. And nowadays, it feels like the 8000s have reached the trough of that curve.

So putting together everything I’ve described — even with a machine that really ought to have been twice as much as what I paid — has barely broken US$150. And yes, that includes the sparkly green palmrests. :roll:

Still with ConnochaetOS

In case you were wondering, or even if you weren’t, I should mention that the 150Mhz Mebius is still the brains behind this operation.

And although I sometimes flip-flop between distros for it, the chief contender at this juncture is still ConnochaetOS.

During my Extremely Busy Time a week or so ago, I briefly returned to the Crux installation I had in place as recently as March.

But that unfortunately relies on Xorg to do most of the dirty work, and on a machine this slow, I have no faith in X and company.

ConnochaetOS inherits a lot of Arch Linux’s demeanor, and using only the framebuffer (which it can automatically configure to 800×600 on this confounded Trident video card, even when I can’t do it myself :evil: ) makes this machine a very impressive performer.

By default ConnochaetOS installs a graphical environment, and that means you’ll have to strip out a lot of the stuff that comes in the 0.8.9 beta 2 ISO.

It’s worth the effort though, because the resulting system, spared of the trappings and dead weight of Xorg, takes up much less space on the hard drive and much less space in memory.

It’s not perfect of course. Sound is sometimes sketchy, but it’s sketchy in my custom systems too. Sometimes the bell rings when someone sends a message in centerim, and sometimes it doesn’t. :roll:

But it admits a little more flexibility, hardware-wise, than the custom systems I have built. And there’s the benefit of being lazy, and letting someone else handle the hard work of updating core software. ;)

That’s nice, even I have to build and maintain the other 90 percent of the software I use, because it’s not in the conventional repos.

Luckily Arch, and by extension ConnochaetOS, has some remarkable tools just for that. Hello, PKGBUILDs.

All things considered, I like using this a lot more than some of the other systems I’ve tried at this speed. Debian won’t boot, Crux is more high-maintenance than I want right now … this one is just right.

If you’re also trapped in the i586 bracket, I wholeheartedly recommend it. Even as I did six months ago. … :)

Revisiting the tabbed desktop

One of the things I had time to try, but didn’t have time to write about, was a revisit to someone else’s idea. I do that quite often, now that I think about it.

This time it was urukrama’s tabbed desktop from a couple of years ago. Things like that tend to roll around in my mind, and then bubble up after a while.

I caught myself thinking the other day that screen’s status bar, while it doesn’t seem to like to be pushed to the top of the display, could do some reverse-text codes, and make it look like tabs.

You might have to use your imagination here, but if the active “window” is set to the same color as the terminal background, then if you squint really hard and hold your breath, it looks like a tab. See? See? :P

Playing with that for a few minutes sent me back to urukrama’s desktop, which did a better job with tint2 and Openbox than I was doing with screen alone.

  

That’s rather rudimentary, and not really much of an improvement over the grace and style of urukrama’s original work.

And most of it was slapped together with tint2’s onboard wizard (the aptly named tintwizard.py), which makes things much, much easier. I’d like to find something along those same lines for Openbox itself.

But I haven’t saved the configuration files here because it wasn’t much of an accomplishment, and because it only took a few minutes to arrange what you see.

And really, if I’m going to rely on a tab-like interface to a long string of terminal programs, then there are better ways to arrange it. Probably. :)

Dark, light and Openbox

I have suffered an inordinate number of real-world issues over the last week or so, which is why I am doing such a poor job of keeping this page updated.

I apologize for that. But in the little free time I have, I have not been idle. Here are two distros that both focus on lightweight desktop arrangements with Openbox.

 

On the left is CTKArch, and on the right is MadBox. I believe I heard about these when someone left notes about them here; I apologize if I failed to keep note of who said what.

CTKArch (as you might have guessed) is Arch-based, and is both stylish and well arranged. Many of the tools you would need to manage its look — like panel controls and configuration — are wired into Openbox’s menu, for convenience. I like that.

Similarly, Madbox has a very smooth feeling about it, incorporating everything from conky to network managers and similar tools.

Madbox is Ubuntu-based though, and I don’t see a version beyond 10.10. So that might be on its way, if you are patient.

It’s nice to see Openbox desktops as full-featured distros, mostly because for a long time lightweight window managers had the reputation of being some-assembly-required.

The popularity of things like Crunchbang and company did a lot to change that. No doubt there will be more of these in the future. ;)