Archive for October, 2009

Looking for one-line solutions

I try to collect as many practical and functional command-line applications as I can. And yet more and more frequently, it seems that much of what I want to get done doesn’t need an actual “application.”

As an example, I recently (and once or twice before, in the past) needed to convert between audio file formats, mostly because I prefer ogg files, but also just because m4a support is more work than it’s worth. :roll:

Each time it becomes important I make a quick run through the Internet, looking for something that looks like a comprehensive, console-based application that can convert between audio formats. And every time, the Internet spits out a page with this on it.

for nam in *.mp4; do nice mplayer -ao pcm "$nam" -ao pcm:file="$nam.wav" && nice oggenc -q5 "$nam.wav" -o "$(basename "$nam" .mp4).ogg"; rm "$nam.wav"; done

As you see it, it’s not really going to do the job, but with a few small adjustments — change the file type at first, and maybe the quality level — it suddenly becomes the perfect audio file converter. With mplayer and vorbis-tools already on board, it requires no extra dependencies, no obscure libraries and no more effort than it takes to copy that line into the terminal.

And the results are indistinguishable from what I might get from any “application” that’s out there. Of course, I have to admit, after finding that one-line solution, I didn’t look around much longer. ;)

hoz: Take it apart, put it together

I picked up another small console tool yesterday — hoz, a file splitter that hasn’t seen any work in a few years, but is still quite usable.

File splitters used to be must-have utilities for me. Nowadays I have to admit that — with the proliferation of high-speed Internet connections, gigabyte flash drives, large file hosting sites and even e-mail that accepts megabyte-size attachments — splitting things and copying them on to floppies to be reassembled on another computer. … Well, I’ll just say I haven’t done that in a while.

I can still see where it might be useful though, in the case of something like splitting an ISO for uploading, or a movie for e-mailing. Regardless of the use, it was interesting to tinker with this one and watch it work.

The last rendition was 1.65, which is unfortunately 5 years old and could still use a little polishing around the edges. The size option for kilobytes and megabytes, for example, didn’t seem to be working for me. I could ask hoz to split things into clumps of a particular size, but I had to convert the the size to bytes before it would work; my “M” and “K” tags were ignored. Probably it was my mistake, although I did look at the source code and see if I was doing it right. (It’s worth noting that there’s also an option for gigabytes in the code, but it’s been commented out.)

It would also be nice if hoz would prepend the numbering on split files with a zero-buffer, rather than just starting with “1″. Something like “iso.001″, “iso.002″ and so forth sorts nicer in the ls output; “iso.1″ and so forth get thrown around in the list.

Those are minor points though, and neither impedes function. Much more important is that hoz gave me picture-perfect splitting and splicing: I checked the md5sum on a random ISO, split it into about 12 pieces, then reassembled it and got the same results both times. And that’s what’s key.

Apparently there’s a GUI version available in the source code, and judging by screenshots around the Web it’s fairly straightforward. From the console it’s quick and easy to handle, and does things right. If you need a quick file cutter and reassembler, whatever the reason, this one will do it.

Travels with Charley

Before it suffered a stupendous hard drive crash, the Pentium laptop I keep as part conversation spur, part thumbing-my-nose-at-the-wastefulness-of-modern-consumerism was doing quite well in its role as mobile communication point.

Or as well as can be expected for a machine that has survived long enough to see two different centuries. In the short six or seven days I had it at my disposal, I jotted down a few notes to myself, if I ever decided to bring it along again.

Probably the biggest consideration was that it is quite heavy, and unfortunately there’s not a lot to be done about that. It’s simply the nature of the beast that the machine has a core weight of around 8 or 9 pounds, give or take.

I could remove the battery and the floppy drive, but the difference is negligible — and then I would have two unsightly gaping holes in the machine when I’m trying to pitch it to people as a working antique. :| No, the bulk of the bulk is in the central frame and display, so I’m afraid that’s just the way it is.

The battery is another consideration. I contacted a laptop battery company, and in spite of its age it seems that it’s possible to have the battery rebuilt — to the tune of US$65 or so.

I am debating whether or not I want to go that route; most of the time the machine is deskbound, so running without the power cable is never a need. Of course the reason it’s deskbound is because the machine has no battery, so I might have trapped myself in a mental loop there.

And on the other hand, it would be nice to have a small measure of portability from time to time. It’s just a little difficult, personally, to justify rebuilding the battery at a cost six and a half times what I paid for the entire computer. :roll:

Soundwise, I still haven’t figured out how to configure ISA hardware in newer kernels, and my efforts to use precompiled distros to give me a boost isn’t bearing fruit. So I had no music, but I brought along my music player, and the problem was solved.

Outside of those physical considerations, most of the issues I had with the machine were my own to solve. I had little or no experience working with WPA encryption, so when I visited a relative with an encrypted wireless network, I had some head-scratching to do. In the future I should impose upon a friend with a WPA network, before wandering around the planet and waiting for my ignorance to become a problem.

Furthermore I didn’t bring along a wired network connection, which in retrospect was a rather important thing to leave behind. In the case where WPA was an issue it would have been a convenient fallback to yank the wireless card and plug into the router, at least for an hour or two.

And for a machine of this age and speed, Crux is simply the best solution, although the option of adding more software was almost nonexistent. I did a good job keeping myself armed with the programs I would need, but if anything outside of the ordinary were to suddenly crop up, I daresay I would have been in trouble. By the time I would have it compiled, I would have been back in Japan.

But after that, there wasn’t much I felt was lacking. I could browse the Web with relative comfort, hook up to area wireless networks, check weather reports and flight times without too much trouble. In my downtime I had vitetris, freecell and a long-running game of Nethack to keep me occupied, which was more than enough. I got a couple of stares from people toting the latest and greatest netbooks, but I can’t say for sure if those were looks of shock, jealousy or disgust. Maybe all three. ;)

Windows 7, start to finish

The Windows 7 fooferah is in full swing, both here and elsewhere, and I for one have little or no contact with it. That’s partly because I have little or no interest in it, and one follows the other, so to speak.

Since I am not a Windows user and probably never will be, I won’t bother denigrating the latest Microsoft effort to stay in business. Although after a while, it becomes obvious to anyone — Linux users or Windows users — that people have to keep buying Windows, or Microsoft would go bankrupt. And from that, it becomes equally obvious why there is so much fooferah, and why Windows’ reputation for performance suffers so many critics. Myself included. :|

To put the lid on the fooferah, I’ll just post the photo that’s been reposted so many times elsewhere. …

Sent to me by one of my detractors, who prefers the expensive corporate swirl of electronic gobbledygook in order to use a computer, as opposed to the free and easily understandable gobbledygook that I use. Questions that might arise from looking at that picture — What does that mean? Are they for real? Who in the world would buy that? — would be better directed toward Microsoft, with regard to their product: What do you mean? Are you for real? Who in the world would buy that?

Next stop, a brief interlude to mention the BBC and a blog post by Rory Clellan-Jones, regarding Ubuntu and its viability when compared to Windows 7 and Mac OS 10.x.x (I can’t keep up with the versions there). I don’t know RCJ from Adam, and to be honest, it’s neither here nor there to me what the BBC has to say about Linux.

If there was ever a shill for Microsoft, it is the tech news department of the BBC. I respect them as an international news-gathering organization and I would crawl through a pit of red-hot razor wire and broken glass to get news from them over anything pumped out of America these days … but let’s face it: Their IT reviewers and tech pundits don’t impress me as much more than press release rewriters, latched firmly to their fax machines awaiting the next truckload of nonsense from Redmond. Or Apple. Or Twitter. Or Twittering about Apple. :roll:

So whether or not Rory Clellan-Jones knows a mouse from a hole in the ground is moot point to me; I stopped listening to their IT news not long after I started using Linux … because changing your perspective in that way makes them look foolish. On the other hand, aysiu has a much more effective rebuttal to RCJ’s review. :twisted:

Lastly, before anyone replies in any way to the pro or to the con about Microsoft’s latest release, it might be worthwhile to note that a good test of any product is to see what the people who sell the product use. Who cuts the barber’s hair, so to speak.

And in this case, the issue is up for debate. Ask Netcraft.com what bing.com uses as an OS and it will tell you Linux, but as is discussed, that’s more than likely a rerouting through another server system that is being reported, and not actually the inner sanctum of the Microsoft cathedral itself.

Personally I still find that ironic. Either side of the software freedom debate can rationalize that fact as they like, but to me, it speaks volumes that the world’s most powerful company and entrenched software producer relies on something other than their own product to relay information to their own service. Full stop.

So there it is. For me, for all practical purposes, Windows 7 is come and gone. Like it, hate it — decide for yourself. My own opinion was formed when the aforementioned BBC fawned over it with this quote, from only a few days ago.

It needs less computing power so older PCs run it quite happily. “Our PCs have gained another two years lifetime,” says Chris Page, who deployed Windows 7 on nearly 700 computers in schools run by Warwickshire County Council. Just one five-year-old laptop refused to run the new operating system, he reports.

Wow, a 5-year-old laptop can’t run Windows 7? Well, I guess that closes the door on me.

Until tomorrow. …

Bang the drum slowly

It’s October 26 here now, and I feel obligated to mark the day briefly, in public. To call it an important personal day would be a stretch, but it does bear some significance to me that Yahoo plans to pull the plug on GeoCities today.

Don’t misunderstand me: I am not now and never was so much a GeoCities fan that its passing becomes a heartbreaking event. But when I heard it was shutting down I had to take a moment and check a link that I hadn’t visited in almost a decade.

Yes, it’s shameful but true. A long time ago, when I was still new to these Intarnets, I tried to build a page or two on GeoCities. This was easily 1997 or 1998, and it was never more than a few scratchy HTML files linked with a random image or two. I never went so far as to smatter the page with rotating gif images, or embed midi tunes for my favorite TV shows. It was mostly an experiment, a sandbox, a place to dip my toes and check the water before getting serious.

Lo and behold, those cruddy little pages were still there. They hadn’t seen an update in a decade, and probably hadn’t been seen my any living being in almost as long (spiders don’t count ;) ). It was embarrassing, but nostalgic at the same time.

I should probably pull those files off the servers before they’re deleted, but I don’t remember my password for the account. I looked at the archive.org plan to file all those sites away for “eternity,” but honestly, I could care less about my files. They’re a decade old, barely related at all to my life now, and I’d probably just throw them out anyway. Yahoo is doing me a favor, so to speak.

It’s still sad though — like your remembering your first bicycle, or finding an old teddy bear in the closet. Not so dramatic or serious as some other personal milestones, but I’m sure you understand.

Anyway, I’m probably not the only person to look back on GeoCities as an entry point to the 21st century. Maybe this is how future generations will mark their own maturation — by whether or not their first presence on the Web is still accessible, or if it was reset to a string of zeros on some corporate server somewhere. Welcome to the new human empathy.

P.S.: Link? Absolutely not. ;)

Back with a bang

Thanks to everyone who left a note during my vacation; it’s been a little over two weeks and I have lots to tell.

Perhaps the most interesting thing that happened during my vacation, or at least the thing that had the biggest impact, was a spectacular hard drive crash in the Pentium. Lots of buzzing and ticking from the underside of the laptop, a few cracking noises and suddenly, my portable-but-outdated link to the Internet, e-mail and so forth was completely gone. No boot, no BIOS recognition, nothing but a persistent tapping from the belly of the beast, every time I turned on the machine.

On a scale of one to 10, this was an eight on the drastic-meter. All my local Crux repositories were gone, my to-do lists, e-mail archive, personal calendar, application settings, list of things to blog about, notes for before and after the vacation … you name it. All electronic vapor.

In a manner of speaking, of course. I made a point of e-mailing myself most of the lists before I went on vacation, and I did sync some things between machines before I left, but those files were 10,000 kilometers away, on a machine that wasn’t even plugged into the wall, let alone the Internet.

The real tragedy here was that I lacked the tools to get it going again. I was in a position to pick up a cheap laptop drive at a bargain basement price, but I couldn’t just delay my entire vacation for a day, while I recompiled an entire system from scratch on a piggybacked machine in a hotel or a friend’s house, inconveniencing any number of people in the process.

Now if I had been using, for example, the Thinkpad, I might have made a go of it. The Thinkpad has a CD player, a (relatively) fast processor and enough memory to at least rebuild a console-only system overnight.

But even that would have been mostly pointless, considering all the configuration and setup that would have been required. In all, the issue was closed.

So I borrowed a family member’s laptop from time to time, and did most of my e-mail checking and surfing the old fashioned way — from a graphical browser. Not my ideal situation, but desperate times call for desperate measures.

I should note that this is the second time in roughly two and a half years that a hard drive has imploded on me. The last time was shortly after I moved to Japan, but looking back there’s very little that seems related between the two incidents. Different manufacturers, different drives, different situations … all unrelated. I’m willing to chalk this up to bad luck.

And now that I’m home and I can inspect the machine, I am willing to accept it as only a minor setback. I have spare drives, and can start right away, rebuilding it if I want. But you know me — I already have a few ideas that are outside the “norm.” … :twisted:

A quick note

No pictures to share right now, but with a spare moment on a friend’s computer, here are the auction links I promised: the Pavilion and the Inspiron.

We’ll see what happens now. If you’re interested in buying, please take a moment to read the conditions of sale at the bottom; the seller has some requirements on how payment is made and who is allowed to bid. Cheers.

Scheduled downtime

It’s been about two and a half years since I moved to Japan, which means it’s about time for me to make a return trip to my own country, visit a relative or two, and perhaps enjoy a few places in between. The agenda includes a few spots around the globe, but being the secretive person that I am, I won’t give up any more information than that. ;)

But more importantly, that’s the reason I probably won’t be posting to this site over the next few weeks. Please don’t take that as some sort of sign that I have abandoned my quest to run Compiz on a Pentium :lol: , but instead that I am taking a short hiatus. I don’t find blogging to be particularly taxing (quite to the contrary: It’s rather effortless, because it’s rather pointless) but with transportation, schedules and other issues to worry about, I am omitting that one extra activity, whenever necessary.

The good news is that the Pentium is coming with me. Yes, it might not have a battery, and it might not be practical for anything but taking notes, and it might weigh a freaking metric ton … but I figured: Why not? It has survived this long, it deserves to go on vacation for once. Goodness knows it probably spent most of its days either at work or on a shelf, and I come from one of those cultures where inanimate objects can, under certain circumstances, be described as possessing a sense of disappointment at their lot in life.

All that is beside the point. When practical, I’ll jot a note and post a snapshot. “Postcards from the Pentium,” will be the coffee table book. ;)

So until later this month. … Cheers, and be kind to one another. :mrgreen:

– K.Mandla

When “fast” is less than 600Mhz

It’s been an interesting downshift, sending off the 1Ghz Inspiron and relying more heavily on the Thinkpad. It’s running Crux against the framebuffer these days, and as much as I’d like to deny it, there are times when I prefer a graphical environment to my rather nutty text-only adventures. And there are times when they’re almost necessary.

Like double-checking posts to this blog, and adding links that are just too long or convoluted to use a text browser for. Generally speaking, when I post things with Charm that require a link (like the word “Charm” there), I post without the link and add it after, in a graphical browser. I don’t really have to, but it cuts down on the margin of error over typing it manually.

The best solution I have to that problem, believe it or not, is Slitaz. I know, I know: You’re probably weary of hearing me yammer on endlessly about Slitaz, but if it didn’t solve so many problems for me, I wouldn’t mention as a solution so many times.

This time it’s quick access to a graphical interface, like I need for checking how the site looks to 99 percent of the people who visit it. I can reboot to the live environment (192Mb is more than enough) and be back online with a GUI in a minute or two. Check, edit, add links, and send the machine down to return to the console.

I’ve tried running Slitaz continually, but like I mentioned last week, I am too accustomed to the speed and convenience of the text-only environment, and a GUI just feels clunky. If you find that hard to believe … well, try it.

So outside of jumping between Slitaz and the console environment, music and entertainment (read: my ripped DVD collection) are the remaining chores for the Thinkpad. There are some oddball tasks too — it’s quicker and easier, for example, to install EasyTag in Slitaz than it is to compile a new console-based OGG file renamer, and get it going with all the dependencies. Call me lazy, but that’s the route I took.

Of course, that does mean that the Pentium handles most of the dirty work. Chatting, e-mail, blogging, personal calendar, to-do list, even the odd game or two. And although it’s a bit sluggish because it pages out to disk almost all the time, I can often do simple Web surfing on this machine too.

In fact, about the only thing missing between these two machines, that I had with the Inspiron, is a DVD player-slash-CD writer. Right now I have nothing that will burn an ISO to disk, for example. (And only days away from the Ubuntu 9.10 release! Gasp!) It’s not a terrifically critical thing, but should the occasion arise that requires a write to CD, I’ll have to tote the ISO to work, and mooch off the machines there.

Which is not an impossibility, and I am not too proud to do. But until I stumble across my dream machine, this ragamuffin little combination of vastly underpowered computers seems to be keeping me in business.

Ubuntu as a selling point

Ubuntu LinuxOne thing I didn’t mention when I had my little sob session for the Inspiron, was that I was also sending the Pavilion out the door for the last time. My attachment to it was far weaker than to the Inspiron, mostly because I took it on board as a challenge, not a charity case or as a gift.

And since it was no longer a challenge, and since it had lost its last local fan (the neighbor who owned it for a year), I decided it should also go the way of all flesh. Ebay, that is.

But I sent both machines into the afterworld sporting fresh operating systems — the Pavilion with a split Windows XP-Ubuntu 9.04 on it, and the Inspiron with only 9.04. Having done that, I can only wonder if that’s a pro or a con — installing Linux, that is.

Both machines are Linux-friendly (if I can use that term loosely), the Inspiron moreso than the Pavilion. The zv6000 has a Broadcom-based wireless card in it, which used to be the kiss of death, but nowadays is as meek as a lamb.

The Inspiron, on the other hand, has little in it that doesn’t play well with the Penguin — so little that I can’t think of anything off hand. If anything, the Inspiron works better with Linux than it does with Windows, since the machine is only licensed to run ME, and we all know what a flaming bowl of pus that was.

I felt bad omitting ME on the grounds that ME would barf up an electronic gut if it tried to work with all the upgraded parts in the Inspiron. But it’s difficult to explain that to someone with only a passing knowledge of computers. And to be honest, with only 1Ghz processing power and half the memory it really needs, Ubuntu is a bit overwhelming too. Maybe something else, something equally accessible but “lighter” would have been more appealing.

But saying they work great with Linux isn’t going to make them any more appealing to Joe the Ebay Surfer, who buys a computer because he likes the sound of the model number (after all, “zee vee six thousand” just sounds cool). My experience reselling computers with Linux on them has been hit-or-miss, with some people buying specifically because I put Linux on it, and others pleading for refunds because they don’t know how to do anything but Windows.

Their loss, really. Either way, I guess I’ll see how it goes. Maybe this time offering a machine with Ubuntu on it will be a selling point, and not something that needs selling, in and of itself.

Next Page »


Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 144 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,164,314 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 144 other followers