Planet Openbox!

February 08, 2010

Openbox 3.4.11 released

In case you're going to be bored this valentines day, we've made another Openbox 3.4 release, so you can spend your day with Openbox.

There are a number of bug fixes in this release, and continued improvements to menu behaviour. The coolest thing however, is changes to the the focus cycling (Alt-Tab) dialog. It is now dynamic as windows appear/disappear while focus cycling. We've got some more really cool changes coming up for in in the 3.5 series as well so stay tuned for those.

As you may have noticed, we are also moving our web hosting to a new site, which is allowing us to use the openbox.org domain fully. As such, the http://icculus.org/openbox site has moved to http://openbox.org since a few weeks ago.

You can see the full changelog here: http://openbox.org/wiki/Openbox:Changelog And download the latest before it hits youre distribution here: http://openbox.org/wiki/Openbox:Download

K.Mandla


This might not be of interest to you, but to me, it’s a miracle of modern science.

  

How KolibriOS squeezes all that into 1.44Mb is beyond mortal comprehension. And it’s not just that there’s a blinking cursor attached to a terminal somewhere, but an entire graphical system, complete with notepads, system monitors, games, utilities and more nifty doodads than you can shake a stick at. The mind boggles.

Like anything it’s dependent upon hardware, but you’re looking at the same 120Mhz Pentium I use on a daily basis with Debian against the framebuffer. Run-of-the-mill it is not.

And wouldn’t you know it, the touchpad is perfect (in fact, better than Linux, since it doesn’t have X’s odd tracking behavior), keymap is … well, it’s a Japanese keyset, so I am forgiving in that department … video is quick and responsive, powerdown is lightning fast (even if startup is rather slow, coming off floppy of course), and even the conventional PC speaker (you do remember the chirpy PC speaker, don’t you?) works fine. I can see where there is support for SoundBlaster cards, but to be honest I didn’t try setting it up. That might even work, you never can tell.

Hardware is going to be where it falls down too, of course. I don’t know how much it can do with network cards, and add to that the need for PCMCIA support, and add to that the need for wireless support, and short of a standard desktop PCI network card I don’t how useful (in a conventional, I-must-connect-to-the-Internet-or-I-will-go-into-withdrawal sense) it can be.

On a standalone offline machine I would endorse this in a heartbeat; on an online machine that has whatever networking hardware it can do, I would insist upon it. This is a great, full-blown operating system with a horde of additional goodies, and at the same time it’s a marvel to watch in action and prettier than most ultralight distributions based on other software. Granted, it’s not Linux, but with something this light, this functional and this cute, how can you complain? :mrgreen:

I’m Still Here (& Engaged!)

Hello again, Internet! It’s been a while since the last update, so I thought I’d drop in and act like I still have a blog. First and foremost, I need to mention something I’m ecstatic about.

On the beautiful palindrome Saturday of 01/02/2010, I proposed to Julie, my girlfriend of four years. Since she accepted, I now must get used to calling her my fiancé!

We’re planning on having the big day in September of 2011, so we have plenty of time to figure out exactly what we want. But wow — I’m now finding just how complicated all this planning is. :)

Yay for Julie and me! Thanks, everyone, for the kind wishes.

February 07, 2010

K.Mandla


Against my better judgement, I am still poking around with the 560e, but with not much more to report than a few botched attempts to install Puppy Linux, alongside a few botched attempts to boot Puppy Linux.

I can’t account for why Puppy wouldn’t boot at 166Mhz, and I’m fairly sure it wasn’t the size of the initrd this time. But after a blinking cursor that simply pulsed at me for about five minutes, I decided there wasn’t anything else to be learned.

I certainly don’t hold it against Puppy though — now that is a fine piece of ultralight software. In it’s vanilla form (which is anything but vanilla) it can run at a decent pace on machines as slow as 550Mhz or slower, and requires less than 256Mb to run completely from memory. It looks good, it sets itself up well, and it’s a healthy mix of speed and function.

Between Puppy Linux and Slitaz your low-end hardware needs — provided they can struggle to a graphical desktop — are probably covered. I know there are other options out there, but if you have only two blank CDs and don’t want to waste a lot of bandwidth on distros with vague aspirations and little to show for them, those are the two I’d suggest.

In the mean time I’m going to inspect a couple other low-end distributions, and see if they have any luck getting started, and then see if they have any luck bringing up a graphical environment. I know that even if X rears its ugly head at 166Mhz it will be a disappointment, but I have to keep chasing this one for some reason. Don’t ask me why. :roll:

Dancing dog

This dog dances better than I do.

Making "Citizen Science" compelling

I had the opportunity to participate in a focus group on NASA's new "citizen science" project, called Moon Zoo, with a bunch of other fellow lunatics, amateur astronomers and lunar enthusiasts.

Moon Zoo sounds really interesting. Ordinary people will analyze high-resolution photos of the lunar surface: find out how many boulders and craters are there. I hope it will also include more details like crater type and size, rilles and so forth, though that wasn't mentioned. These are all tasks that are easy for a human and hard for a computer: perfect for crowdsourcing. Think Galaxy Zoo for the moon. The resulting data will be used for planning future lunar missions as well as for general lunar science.

It sounds like a great project and I'm excited about it. But I'm not going to write about Moon Zoo today -- it doesn't exist yet (current estimate is mid-March), though there is a preliminary PDF. Instead, I want to talk about some of the great ideas that came out of the focus group.

The primary question: How do we get people -- both amateur astronomers and the general public, people of all ages -- interested in contributing to a citizen science project like Moon Zoo?

Here are some of the key ideas:

Make the data public

This was the most important point, echoed by a lot of participants. Some people felt that many of the existing "citizen science" projects project the attitude "We want something from you, but we're not going to give you anything in return." If you use crowdsourcing to create a dataset, make it available to the crowd.

Opening the data has a lot of advantages:

  • People can make "mashups", useful sites that display your data in useful ways or combine it with other data. This can generate more interest in your project and more contributors.
  • School groups can work on class projects or science fair projects, probably contributing more data along the way.
  • It might help the next generation of scientist get started.
  • It shows openness and good faith: witness the recent blow-up over the leaked IPCC emails and the debate over how much climate data has been kept private.

Projects like Wikipedia and Open Street Map, as well as Linux and the rest of the open source movement, show how much an open data model can inspire contributions.

Give credit to individuals and teams

People cited the example of SETI@Home, where teams of contributors can compete to see who's contributed the most. Show rankings for both individuals and groups, so they can track their progress and maybe get a bit competitive with other groups. Highlight groups and individuals who contribute a lot -- maybe even make it a formal competition and offer inexpensive prizes like T-shirts or mugs.

A teenaged panel member had the great suggestion of making buttons that said "I'm a Moon Zookeeper." Little rewards like that don't cost much but can really motivate people.

Offer an offline version

They wanted to hear ideas for publicizing Moon Zoo to groups like our local astronomy clubs.

I mentioned that I've often wanted to spread the word about Galaxy Zoo, but it's entirely a web-based application and when I give talks to clubs or school groups, web access is never an option. (Ironically, the person leading the focus group had planned to demonstrate Galaxy Zoo to us but couldn't get connected to the wi-fi at the Lawrence Hall of Science.)

Projects are so much easier to evangelize if you can download an offline demo.

And not just a demo, either. There should be a way to download a real version, including a small data set. Imagine if you could grab a Moon Zoo pack and do a little classifying whenever you got a few spare minutes -- on the airplane or train, or in a hotel room while traveling.

Important note: this does not mean you should write a separate Windows app for people to download. Keep it HTML, Javascript and cross platform so everyone can run it. Then let people download a local copy of the same web app they run on your site.

Make sure it works on phones and game consoles

Lots of people use smartphones more than they use a desktop computer these days. Make sure the app runs on all the popular smartphones. And lots of kids have access to handheld web-enabled game consoles: you can reach a whole new set of kids by supporting these platforms.

Offer levels of accomplishment, like a game

Lots of people are competitive by nature, and like to feel they're getting better at what they're doing. Play to that: let users advance as they get more experienced, and give them the option of doing harder projects. "I'm up to level 7 in Moon Zoo!"

Use social networking

Facebook. Twitter. Nuff said.

Don't keep results a secret

Quite a few scientific publications have arisen out of Galaxy Zoo -- yet although most of us were familiar with Galaxy Zoo, few of us knew that. Why so secretive? They should be trumpeting achievements like that.

How many times have you volunteered for a survey or study, then wondered for years afterward how the results came out? Researchers never contact the volunteers when the paper is finally published. It's frustrating and demotivating; it makes you not want to volunteer again. Lots of us sign up because we're curious about the science -- but that means we're also curious about the results.

With citizen science projects, this is particularly easy. Set up a mailing list or forum (or both) to discuss results and announce when papers are published. Set up a Twitter account and a Facebook group to announce new papers to anyone who wants to follow. This is the age of Web 2.0, folks -- there's no excuse for not communicating.

I don't know if NASA will listen to our ideas. But I hope they do. Moon Zoo promises to be a terrific project ... and the more of these principles they follow, the more dedicated volunteers they'll get and that will make the project even better.

February 05, 2010

K.Mandla


A lot of well-meaning people dumped their leftovers on me when I mentioned I was using a machine with a floppy drive, and had use for some spares. The things are like coat hangers now though — I have about twice as many as I wanted, and 10 times more than I need.

I also don’t really want to know what was on the floppy before it became mine, so I scrounged around a bit and found this as a command to overwrite the disk, until I find time to actually use it. As an alternative to the shred command. …

dd if=/dev/urandom of=/dev/fd0

The drive assignment is for Debian there, so it might be different for your distro. And changing the destination assignment will work for a USB drive or something else too. My primary school maths teacher taught us that we should always check our work, so …

dd if=/dev/fd0 count=1 | hexdump -C

That gives you a quick look at the earliest part of the floppy, so you can check and make sure what’s there is more or less unreadable. It’s not terrifically secure method or proof against forensics efforts, but neither of those is really a concern for me. :)

Orbán Viktor speech live

Peter and his coworkers over at Virgo have been working all week to get a flash project working that will stream their former prime minister's speech live (2010-02-05 14:00 GMT).. It has a live twitter feed and has voting capabilities. As a programmer, stuff like this is exciting when it's on such a large scale: http://backchannel.virgo.hu/

K.Mandla


Since I nailed down a way to encrypt files before transferring them over the Internet to a family member, I have been considering locking up a lot of the personal files I have on hand, in case they are lost or stolen. There are quite a few though, and the time it takes to step through the encryption process makes it inconvenient, to say the least.

gpg has a batch mode though, and splicing together the loop from this command and the encryption sequence from this command, plus a little help from gpg man page and elsewhere, I cobbled this together as a one-liner that appears to do the trick.

for nam in *.doc ; do echo MyPassword | gpg --batch -c --force-mdc --passphrase-fd 0 $nam ; done

The -c flag is the same as the --symmetric option, and the --passphrase-fd 0 flag accepts the password from whatever I type after entering the command … except that the echo fills that in for me. The --force-mdc option is only to avoid a warning message on the receiving end when it is decrypted, so you can omit that if you like.

I suppose it’s worth mentioning that I used detox to clean the file names a little bit beforehand; otherwise, spaces or oddball characters can interfere with the encryption command and cause the loop to halt. If you can improve upon this, by all means please let me know. I am well aware of my limitations as a script writer. :roll:

February 04, 2010

K.Mandla


My “newfound” philosophy regarding leftover parts is taking a sideways step these days, and making me reassess the less-than-a-month-old-to-me 560e I tinker with. I’m starting to feel like maybe this is one that’s worth releasing back into the wild, to find its own way.

Truth is, after a month of working with it, I can’t help but feel like it has shortcomings — a lot of shortcomings. Probably the biggest and most encumbering is simply the lack of any way to get a system on to it, without yanking out the hard drive or relying on a network connection (which of course, would require an installed system). No CD drive, no floppy that works (I’ve tried four that will connect, but none will read a disk) and short of hunting down a PCMCIA-driven CDROM (there’s an expression about “hen’s teeth” I think I could use here) and then still wondering if it would be compatible, it seems I have only one option for installing or handling hardware.

And this particular machine isn’t exactly flexible in that department either. Getting to the hard drive requires removing 14 screws, or at least about nine of those 14 and peeling back the upper plastic tray. I used to be annoyed to have to pull out a drive, plop it into a modular tray and jack it into my old Inspiron, but that was a dream compared to pulling the hard drive out of this.

I have other complaints besides just technical-unfriendliness and limited inroads for installation. Thus far, I’ve tried three different releases of Debian, one of Ubuntu, one of Slitaz and even put Windows 2000 on the machine (a lot of good that did me … Win2K wouldn’t even start), and not a single operating system has been able to show me a graphical environment. Even the framebuffer, which is usually something that I can handle myself without needing help from well-orchestrated distros like Ubuntu or Debian, or magical ones like Slitaz, can’t get past 80×60, and most crash and burn violently under X.

It’s not only frustrating, it leads me to wonder if there is some sort of minor fault in the hardware, if nobody can get something working. If something works in one distro but not another, I usually put that on my to-do list as a future challenge. But this is something no one can handle, and that has me eyeing the computer itself suspiciously. And honestly this wouldn’t be the first time something didn’t work quite “right” in it.

This isn’t an issue of function — I have a long list of things to do with a computer like this, first choice being to park it near the router, drop in a 120Gb hard drive and a halfway-decent network card, and let it seed distros throughout its remaining life. But again, I feel like a somewhat-useful 12-year-old semi-inconvenient computer isn’t much better than a somewhat-useful 8-year-old semiworking network card.

Especially because there are more options of its calibre on hand. Today at the recycling shop I saw another ten-dollar-wonder … a 133Mhz NEC Pentium, and that one with 32Mb in it and a CDROM as well. What a luxury. I didn’t ask about the model number, but I at that price I can take a chance and maybe pluck a winner from the display case. …

February 03, 2010

K.Mandla


A while back I remember seeing news around the ‘net about Linus Torvalds voicing concern over the growing size of the kernel. Things like that are usually non-issues for me and I think they are for most end-users, but it’s the first thing I thought of when I put Ubuntu onto a 2Gb 4200rpm drive and dropped it into a Pentium with 32Mb of memory in it.

For the longest time now, my mental limbo-pole for Ubuntu on any computer has been 32Mb: Without 32Mb in the machine, the installer program twitched and flailed uncontrollably until you finally took it off life support and cut the power. You could, conceivably run Ubuntu on a machine with less memory than that, although dipping much lower — even by just 8Mb or so — left you in dangerous territory.

Or so I thought. I was pleased to find the random 16Mb stick of PC66 at the bottom of a box in my local recycling shop last week, and after a 12-hour marathon of memtest, it’s showing no defects whatsoever. But the aforementioned 2Gb hard drive with a clean installation of Ubuntu on it refused to start all the same. “The initrd is too big,” it said, quite politely.

I see elsewhere on the Internet where BIOS settings can come into play, but this time it might be that the initrd is just too big. How big can it be? I thought, and transplanted the drive (again … swapping drives is the story of my life) in an effort to find out. And the answer was 40Mb.

Good grief. I must be looking at that wrong. Discrepancies like that can only be explained as some mistake of mine. In any case, the error message was telling the truth. That is too big.

Now the size of a stock Linux kernel and the size of the initrd in a vanilla installation of Ubuntu 9.10 are not necessarily related, but I could swear this was never a problem before now. I am more-or-less certain that I have installed minimal Ubuntu systems on computers with only 32Mb of memory — some within the past couple of years — and they started up fine. And Debian runs without complaint on the machine, although I haven’t needed to check the size of the initrd in Debian, so it might be different. (It appears to be less than 8Mb for initrd.img-2.6.32-trunk-486.)

I suppose weight gain is the only excuse. Forty megabytes is considerable when your world is topped off by a 550Mhz Celeron, and no machine has more than 192Mb. But this world never has a need for more than about 24 of those 192Mb at any given time … unless of course, you’re trying to start up Ubuntu.

I’ll have to scrape around a little more and see if there is any way to carve down that 40Mb number, and maybe actually get the system working without having to swap memory chips as well as hard drives. I don’t hold out much hope though … 40Mb might be a stumbling block for a beat-up leftover 166Mhz Thinkpad, but to anyone else who’s not living in 1998, 40Mb here or there is nothing to voice concern over. Unless you are Linus.

Configuring git colors

I spent a morning wrestling with git after writing a minor GIMP fix that I wanted to check in. Deceptively simple ideas, like "Check the git log to see the expected format of check-in messages", turned out to be easier said than done.

Part of the problem was git's default colors: colors calculated to be invisible to anyone using a terminal with dark text on a light background. And that sent me down the perilous path of git configuration.

git-config does have a manual page. But it lacks detail: you can't get from there to knowing what to change so that the first line of commits in git log doesn't show up yellow.

But that's okay, thought I: all I need to do is list the default settings, then change anything that's a light color like yellow to a darker color. Easy, right?

Well, no. It turns out there's no way to get the default settings -- because they aren't part of git's config; they're hardwired into the C code.

But you can find most of them with a seach for GIT_COLOR in the source. The most useful lines are these the ones in diff.c, builtin-branch.c and wt-status.c.

gitconfig

The next step is to translate those C lines to git preferences, something you can put in a .gitconfig. Here's a list of all the colors mentioned in the man page, and their default values -- I used "normal" for grep and interactive where I wasn't sure of the defaults.

[color "diff"]
	plain = normal
	meta = bold
	frag = cyan
	old = red
	new = green
	commit = yellow
	whitespace = normal red
[color "branch"]
	current = green
	local = normal
	remote = red
	plain = normal
[color "status"]
	header = normal
	added = red
	updated = green
	changed = red
	untracked = red
	nobranch = red
[color "grep"]
	match = normal
[color "interactive"]
	prompt = normal
	header = normal
	help = normal
	error = normal

The syntax and colors are fairly clearly explained in the manual: allowable colors are normal, black, red, green, yellow, blue, magenta, cyan and white. After the foreground color, you can optionally list a background color. You can also list an attribute, chosen from bold, dim, ul, blink and reverse -- only one at a time, no combining of attributes.

So if you really wanted to, you could say something like

[color "status"]
	header = normal blink
	added = magenta yellow
	updated = green reverse
	changed = red bold
	untracked = blue white
	nobranch = red white bold

Minimal changes for light backgrounds

What's the minimum you need to get everything readable? On the light grey background I use, I needed to change the yellow, cyan and green entries:

[color "diff"]
	frag = cyan
	new = green
	commit = yellow
[color "branch"]
	current = green
[color "status"]
	updated = green

Disclaimer: I haven't tested all these settings -- because I haven't yet figured out where all of them apply. That's another area where the manual is a bit short on detail ...

February 02, 2010

K.Mandla


I mentioned a script yesterday, so I’ll mention another one today — another sort of “download manager” for the console. This isn’t nearly as feature-ful as fttps, but since it approaches the issue in a concise and straightforward way, I thought it worth bringing to attention.

wget-queue.pl claims to be an offshoot of a bash script called wget-queue.sh, but I haven’t had much luck in tracking that down, unless this is what it means. It works in much the same way as I originally envisioned when I thought I was coming up with an original idea, and probably if I had enough skill to put together a program (which I don’t) it would look and behave in the same way as wget-queue.pl.

I’ll let you dig around and see how it works; if it were me I would plant this in a directory somewhere, set up cron to execute it once an hour or so, and keep the list of programs to download somewhere in your home directory. I adjusted it slightly for my system, so that it keeps a “session” directory where the logs and settings are stored, and a “watch” directory where I can manage the list of files to download. I wanted the style to mimic rtorrent, if you must know. I also added an -nv flag to the actual download command, because I foresaw the log file getting rather big.

If I must be terrifically honest, I think blice’s fttps is still a step above this even if it never fully matured. Even in its unfulfilled state fttps has a few more controls and features than wget-queue.pl (and wget-queue.sh, if we can count that one) and while it is worthy of some refinements, I’ll probably stick with it on my machines. The perl script is worth investigating though, if you are curious and capable of tuning it. ;)

February 01, 2010

K.Mandla


I only have a minute or two today, so I’ll just mention that I found this perl script that supposedly presets the used modules in a kernel configuration, which I hope will be useful in arranging custom kernels between Debian and Crux.

I still have it in my mind that I want to convert this entire system to a Crux analogue, mostly because my settings and configurations are sometimes intended for still-fresher versions than what Debian testing offers. Part of that would include getting a kernel adjusted to this machine, and considering that Debian has had better luck than I with regard to some things (like the framebuffer), I am willing to take a cue.

A script that scans through the modules you have on board, then tweaks a configuration file for you, would be useful. I think that’s what this does, although as always, I might misunderstand. I promise a report, either way.

January 30, 2010

Openbox 3.4.10 released

We just can't get enough of the Openbox 3.4 series. Today we're happy to release version Openbox 3.4.10.

This is a minor bugfix + new features release, mostly focused on Openbox menu behaviours. Here's the complete changelog:

  • Improve keyboard navigation in Openbox menus.
  • Add a --root option and a manpage for obxprop.
  • Use a negative value for submenuShowDelay and submenuHideDelay to cause an infinite delay. This means you have to click to show a submenu, rather than just hover over it.
  • Improved code for submenu show/hide delay. Added the submenuHideDelay config file option, under the "menu" section.
  • Fixed bug #4464 (Typo in openbox-gnome-session script).
  • Fixed bug #4436 (Focusing a window used to stop focus cycling).
  • Renamed obprop to obxprop due to collision with Open Babel (See bug #4419).

You can download the new release from here: http://openbox.org/wiki/Openbox:Download

p.s. Happy new year !

K.Mandla


I realized a day ago, that I needed to bring my perspective into line a little bit. For about two years now, maybe more, I’ve been holding on to a somewhat-useful axnet-cs-based wired PCMCIA card, because it was occasionally in a good mood and would connect a really old laptop to the Internet, and sometimes save the day.

Truth be told, its success rate was under 50 percent, but I always assumed it was an issue of configuration, that I could probably rely on it in a pinch, and that it was worth keeping around for compatibility issues.

So imagine my surpise earlier this week, when I bought a second leftover PCMCIA wired LAN adapter, and brought it home and plugged it in, and found that it too used the axnet-cs module, and that it too dropped connections when the traffic spiked. I dug the old one out of the trash, and stashed them both in the closet, for emergencies.

And then I started to think about it: Why stand on ancient PCMCIA cards that I know to be less than useful — and in some cases actually the source of problems — when there are literally bins full of leftover PCMCIA network cards at the recycling store? Why suffer these quirky leftovers when 10-year-old network cards are only about 95 cents US, and sold with a smile?

I can afford to sink a few dollars into finding one that’s not axnet-based, that doesn’t need a dongle and is mostly reliable, I told myself. And while I’m at it, there’s no need to keep the unworthy floppy drive for the 560e in the closet, when there are two or three spare IBM external floppy drives floating around in those same bins, and not one of them is more than US$3.

So I went to the recycling shop yesterday and scrounged around until I had found two cards that I was fairly sure would be CardBus-free and probably work with Linux (of course, with hardware as old as what I seek, it would be terrifically rare to find something incompatible). The first was an IODATA-branded PCET100-CL, which needs no dongle and immediately lit up like a Christmas tree when I stuck it in the 560e. Debian pounced on it, pointed its finger, shrieked “NE2000!” and assigned it to eth1.

The other was a Planex ENW-3503-T, in its original box and with a faded TurboLinux sticker on it (“OK!” says Tux, while holding a lightning bolt). That proved to be a winner too (Tux doesn’t lie) when Debian found the pcnet-cs module for that one, configured it and assigned it to eth2. I’ll probably use the first one though, since the second needs a dongle, and I dislike those.

So there were two cards, both avoiding hardware chipsets (or software drivers, I suppose) that are less than helpful to me, and neither one costing me more than a few US dollars, relatively speaking. Why I never did that a year ago is still a mystery, considering the dozens of times I tossed them aside while digging around in the recycling store.

(I was a little less lucky with a leftover Thinkpad floppy; it powers up and the drive will spin, but it too doesn’t read the floppy, which could mean that it’s not compatible, or maybe not working. I can try again; I saw at least one more while I was there on Friday.)

Wait, though: The best part of the story is coming. When I originally bought the 560e, there were two PCMCIA cards still stuck in the ports. One was some sort of IBM emulator card (I think it was a token ring adapter) and the other was an Intel PRO/100 PCMCIA card. I jumped for joy to see the second one until I remembered there was no dongle, which made it into a worthless hunk of plastic and aluminum.

Making a long story short though, the Planex dongle fits the Intel card, and while the lights don’t turn on while it is running, it gets sustained download speeds of well over 500kbps, and possibly more if I use a fast, in-country server. It feels good to watch a Pentium download an entire Ubuntu ISO — a file that takes up one-third of its hard drive — in less than 18 minutes.

So now I have three working wired network PCMCIA adapters, none of which shows any difficulties and all of which show nice, fast, consistent download speeds. What happens to the old axnet-cs cards? I’m not sure. I don’t like throwing stuff away, but I don’t like pawning off less-than-reliable hardware on someone else. I suppose it’s a buyer-beware situation anyway when you’re working with stuff this old, but if I can convince myself that the lifespan of those cards is expired, I might send them on to the aluminum reclaimers.

I guess the moral of the story here is simply, “When working with out-of-date hardware, there’s no reason to suffer through poor performance.” That might sound odd, but it makes sense if you think about it: There are so many cheap, leftover replacements for certain accessories that unless you’re strapped by virtue of location or function, you can afford to employ a scattergun approach, and buy two or three at a time and take your chances. Provided the hardware still works, it’s fairly safe to say that Linux will too.

January 29, 2010

TriZPUG, Fabric, epdb, oh my!

Yesterday I attended my first TriZPUG meeting to check out Kurt Grandis‘ talk on Fabric, “a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

It was pretty cool to see a bunch of guys who share the same interests take some time on a Thursday to hang out, drink beers, and chat about python, django, zope, and other stuff. After the original talk was over and some of the other lightening talks that succeeded it was over, a couple of things became very clear to me:

  • There was a real need to make it easier for system administrators and OPS people to handle the difficult task of deploying and maintaining systems, cloud or not;
  • Some of the tools and/or tool implementations presented were being used in an attempt to minimize this pain, but you were still pretty much had no control over what made its way to the systems in the end of the process;

Having been using rBuilder Online to manage and maintain my Transifex Appliance, and being somewhat “spoiled” with the ability of having fine grained control over the entire software stack and having the option of deploying my final “product” on several different cloud environments, I couldn’t help but offer to speak a bit about my experience. I sure hope my impromptu presentation didn’t come across as being “just a sell’s pitch” and I definitely tried my best not to sound like I was selling something. I truly feel that the technology developed here at rPath can solve many of the typical issues that people have getting their product through the many different life cycles and eventually out the door and into the hands of their customers!

Today I started going through Fabric’s documentation and am already making plans to include it in some of the test automation tools we’re developing here!

Anyhow, after my presentation there was a quick intro to epdb, the “Extended Python Debugger”, a very cool python debugger developed by an ex-rPathian and something I use on a daily basis! Turns out that the epdb currently packaged for Foresight Linux was outdated, so I spent a few minutes during my lunch today to update it. If you’re running Foresight, just run conary update epdb=:2-devel or wait for it to make its way to the stable label. If you’ve never heard of epdb, I strongly suggest you give it a try!

January 28, 2010

K.Mandla


My job occasionally requires that I handle files written and named in international character sets. Sometimes that is inconvenient, not in the least because file names can cause odd behavior at the command line, or interfere with the way files are managed or opened. My worst-case scenario was a file I couldn’t save after I had edited it, because the name of the file was interfering with the application’s ability to write to disk.

Manually renaming a file is the obvious solution, or if there is more than one, a fun little tool called detox will systematically convert nonstandard characters into boring equivalents. In my case, a Japanese file name might be changed from an unreadable sequence to something like “K-U_e_R_yen_ae_yo_o.doc” — which is easier for me to open, edit and send along.

By default detox will handle mundane things like converting spaces (which sometimes annoy me) to underscores, changing unusual character sets with analogues in common keysets, and weeding out characters which otherwise interfere with life at the command line — like certain quote marks or keycodes.

One of the nice things about detox is that it is configurable to a very low level, so if you don’t like the particular conversion it picks on its own, you can adjust it slightly for different results. That also means that specific sequences and character-to-character translations are probably doable.

As it is a command line tool there’s nothing really to show for it in action. The documentation is excellent and it makes a provisions for dry-runs with the -n flag, so you can test it once or twice if you have a fear of committment. There may be other ways to circumvent this issue but as an easy one-step solution to a lesser inconvenience, I find this acceptable. :D

On Linux Planet: a simple Poker game in Python-Qt

[Poker game in py-qt] I've written in the past about Python GUI programming using the GTK and Tk toolkits, and several KDE fans felt that I was slighting the much nicer looking Qt.

So my latest article on Linux Planet, Make Pretty GUI Apps Fast with Python-Qt, shows how to develop a little poker game using the python-qt toolkit.

I didn't want to dwell on it in the article (and didn't have space anyway), but pyqt turned out to be a bit of a pain. There's no official documentation -- or at least nothing that's obviously official -- and a lot of the examples on google are out of date because of API changes. None of the tutorial examples explain much, and they never demonstrate the practical features I'd want to do in a real app. It was surprisingly hard to come up with an application idea that worked well, looked good and was still easy to explain.

And don't get me started on this whole "Slots and signals are revolutionarily different even though they look just like the callbacks every other toolkit has used for the last three decades" meme. I'm sure there is a subtle technical difference -- but if there's a difference that matters to the average UI programmer, their documentation sure doesn't make it clear.

All that aside, PyQt (and Qt in general) does produce very pretty apps and is worth trying for that reason.

[spade] [diamond] [club] [heart]

The suit images in the article are adapted from some suits I found on Wikimedia Commons (the "Naipe" set). I wanted them to look more 3-dimensional, so I applied my blobipy GIMP script as well as scaling and resizing them. I really liked those shiny-looking Tango heart and spade emblems (also on the Wikimedia Commons page) but I couldn't find a diamond or club to match.

The poker program I wrote has menus and a second round of dealing, where you can mark off the cards you want to keep. I couldn't fit all that in a 700-word article, but the complete program is available here: qpoker.py or you can get it in a tarball along with the suit images at qpoker.tar.gz.

K.Mandla


Occasionally I collect links that I think might make interesting posts, but individually these don’t really constitute enough to ramble about. So here are a few points bundled together, so that they might stand better than they do alone:

  1. I learned something the other day, by way of Phrakture’s bloghow to properly supply information for a bug report. I report them when I’m sure they’re bugs and not something freaky I’ve done wrong, but I need to make a note for future refrence because the tips and guidelines there seem wise. Once more, the Arch Linux Wiki proves why it’s one of the best around.
  2. So long as we’re mentioning blogs, I’ll make another plug for Luke Maciak’s Terminally Incoherent, which is a nicely written collection of technological discussions ranging from gaming to TV to popular culture. I don’t have a submission for the call for “best IT stories,” although I do have a truly classic anecdote about the tech staff at my last job, who didn’t know how to fix a Fedora Core 4 server because it had never broken in the three years it had been running, and ended up asking me if it was possible to do some things for them. …
  3. Ubuntu GUI users have a club of their own, and it seems to me that there ought to be a CLI club too. Membership will be loose and casual, anyone who uses operating system that has a command-line prompt is allowed to join. No dues, aside from an occasional screenshot to entertain other club members. I submit:

    There will be punch and pie.

  4. About a month ago I made a note to myself of a page that showed some helpful terminal commands. Some of them are useful, others are rather mundane, and still others are now tattooed on the back of my left hand, so I can read them as I type. There are a bijillion sites around these Internets that show wicked ways to use the command prompt, the best of which are command line fu and Command-line Kung Fu. I should’ve used the word “fu” in the title of this blog, but at the time I didn’t realize its popularity with Linux geeks.
  5. Finally, there is a sad irony in the pursuit of computers that are silent — or at least computers that are less than noisy. As I mentioned in that thread, I have a perfectly soundless machine … the only problem is, nobody wanted to talk about my 120Mhz Pentium laptop but me. Still, to think that 14 years ago we had quiet computers, and now you actually have to buy specific parts to dampen the noise … what’s the word for that? Oh, yes: regression. Or at least, it is to me. ;)

Now go forth, and be kind to one another. :mrgreen:

January 27, 2010

lal 1.1 released

Thanks to some poking and prodding by MTecknology, there’s a new lal release.  It mostly just adds command line options, a man page, and a fix of a warning.  You expected more changes from such a tiny program?  Grab it, check it out, report any problems.

K.Mandla


Feed readers, news readers and e-mail clients all represent a hazy gray area for me, since many of them do two or even three of those things at the same time. So for fun, I have a lump of applications here that might do one of those things, two of them, or maybe all at once. Regardless, they don’t burden your system with garbage, and that’s the real point.

I’m not going to mention alpine or mutt, mostly because mutt is the Internet poster child for console mail readers (meaning you’ve probably already heard about it, and your best friend’s sister’s boyfriend’s brother’s girlfriend has it set up with GMail), and because alpine is something I talk about here. I’ve also mentioned elmo in the past, but because I see no updates on that front, there’s nothing more to say that hasn’t already been said.

First, two important alternatives to alpine and mutt: cone and sup.

 

cone is convenient and quick, menu-driven and most options are easy to control and figure out. Compared to something like alpine, which is overpacked with options and settings, cone is almost kid’s play to set up. How well you go along with cone (as with anything I mention here) is going to depend a lot on your mail service and hardware, so I won’t bore you with cumbersome details about configuration.

Personally, I think I might prefer sup though, mostly because it seems more streamlined and direct than cone (or alpine, for that matter). Configuration is done either through the sidecar program “sup-config” (that speaks in a cowboy voice) or by direct-editing brief text files. And as you can see above, the results are practically oversimplified.

I plan to investigate sup more, and see if it will dethrone alpine at present. I like alpine and I am happy to have it around, but configuration is a huge complex chore, and even after roughly a year of use I still have points about it that I don’t like. I find it useful but something more concise might be better for a day-to-day email checker, which is all I really need.

Moving forward, here is canto, newsbeuter and nrss, alongside snownews, which I’ve mentioned before.

 

 

(Now before you get started telling me how canto supercedes nrss, I just want to point out that both are available in Debian, they behave a little differently and perhaps most importantly, nrss runs a bit faster for me at 120Mhz. It might be because canto is written in Python, and python is slower at that clock speed. I can tell you that ruby-based applications are particularly sluggish down here with the Pentiums, and it wouldn’t surprise me if language were the reason I see a difference between canto and nrss.)

I won’t claim a preference for any one of these, since they all seem to have similar styles and do much the same thing. canto probably arranges things in the most boxy style, with each feed in its own bracket. nrss is similar in its presentation, with keypresses for floating previews and jumping to a browser. Learn one and you’ve learned the other.

I used snownews for a while, just to see if I could get used to reading feeds, but it didn’t catch. snownews is akin to newsbeuter, with a file/folder approach that looks more like an e-mail reader. Nothing here is particularly different from raggle though either, which means it too could be an option. If feed reading is your thing and you want to dedicate one particular application to that, try one of these and see if it fits.

For a strict news reader, I can only suggest slrn.

I am in completely uncharted territory with news readers; I have no idea what or why or where the attraction lies, but if you can advise, I am an apt pupil. I managed to get this going and connected to gmane, but beyond that I don’t see anything that looks like “news,” so to speak. But like I said, I have no experience with these things, so I don’t know that to look for either.

Before this is done, here are two quick tools that you might find useful to read feeds, even though neither one is a full-blown “application” like the ones above. Here’s rsstail and rawdog.

 

“Oh boy,” you say. “One that spits titles into the terminal, and one that spews out HTML code. Yawn.” Yes, that’s right on both counts. rsstail basically trims a feed to specific components, and sends the output along elsewhere. And rawdog sends the results of its efforts into an HTML file, which is rather boring too.

But imagine where you can go from there: Rather than devote time to learning a whole new application for reading news, you send one instruction to cron to execute rawdog every hour (or maybe less), then bookmark the local output page in your browser of choice. Better yet, tinker with the settings and tailor the output to match your personal preferences for display.

And all you conky weenies still stuck to X in spite of my warnings to the contrary, you should fall out of your chair to realize there’s a command-line tool that takes up all of 32Kb in source code, that will inject the new entries from a feed into standard output. Good grief, the potential there is worth far more than 32Kb, and you get it for free.

I kid. :D Like everything in life, these things are only as valuable as the time and effort you invest in learning them. Maybe you’ll like them, maybe you won’t. If you do and want to brag about it, feel free; if you have others you think worth mentioning, I am always interested. ;)

CentOS gnome-applets-sensors 2.2.1

Well as most of you know by now I use CentOS, and some things just need to be tweaked. I for one have always liked the panel applet for sensors the version I was using was a little old and I wanted to see if I could update it and sure enough I could and I did. Obligatory screenshot

sensors

So as always the rpms are located in the rpm4centos section and you will need two of these which are
libXNVCtrl – which gives lm_sensors the ability to see nvidia cards
gnome-applet-sensors – the panel applet for gnome

You need to have lm_sensors installed for this to work which you can just do a yum install lm_sensors for.
Then if you have not run /usr/sbin/sensors-detect as root do that before installing these packages. Then
as root install the libXNVCtrl first then the sensors rpm with the normal rpm -Uvh command, log out of gnome and back in and click on your panel and select add applet. Then look for Hardware Sensors Monitor and add it to your panel. There are some settings you can adjust in the applet preferences so be sure to check that out as well after you have it on your panel.

If all goes well you should now have the sensors displaying their temps in your panel.

January 26, 2010

New Xchat and Easytag RPM’s

New in the rpms4centos category I have built the latest version of Xchat for CentOS along with Easytag v2.1 as well today they are available in the rpms4centos section. On a side note for Xchat to install you will need libsexy which you can get from Dag’s repo which is here, Enjoy!

January 25, 2010

K.Mandla


I exchanged e-mails a day ago with someone setting up mplayer to run in much the same way as what you see in my screenshots. The config file I use for mplayer was helpful to them, and so I’ll post it here in case it is helpful to someone else.

really-quiet="1"
vo="fbdev"
vf="scale=400:-3"
framedrop="1"

It’s short and not terrifically illuminating, but

  • the really-quiet option trims away any output to the console (with only one or two minor omissions);
  • vo declares the video output mode as the framebuffer device;
  • the vf option scales the output to fit half of my 800×600 screen and whatever ratio is determined by the file;
  • and setting framedrop to 1 sometimes smooths out skipping if the codec is too weighty, or the transfer rates are slow (I usually keep video files on an external drive, and watch them across USB1.1).

mplayer has about a zillion options, but these are useful at around 550Mhz, and will handle most common output formats without overburdening the machine. I regularly used divx with mp3 playback when I encoded some DVDs, and the ogg sets work fine too. I have borrowed some movies from friends that had mkv or m4a (I think it was m4a … ) encoding, and they were sketchy at times. I mention that in case you have a 300Mhz machine somewhere, and you are wondering how much muscle it will take to watch your Spongebob Squarepants collection. … :roll:

How to print text files in Ubuntu Karmic

Ever since I upgraded to Ubuntu 9.10 "Karmic koala", printing text files has been a problem. They print out with normal line height, but in a super-wide font so I only get about 48 ugly characters per line.

Various people have reported the problem -- for instance, bug 447961 and this post -- but no one seemed to have an answer.

I don't have an answer either, but I do have a workaround. The problem is that Ubuntu is scaling incorrectly. When it thinks it's putting 10 characters per inch (cpi) on a line, it's actually using a font that only fits 6 characters. But if you tell it to fit 17 characters per inch, that comes out pretty close to the 10cpi that's supposed to be the default:

lpr -o cpi=17 filename

As long as you have to specify the cpi, try different settings for it. cpi=20 gives a nice crisp looking font with about 11.8 characters per inch. If needed, you can adjust line spacing with lpi=NN as well.

Update: The ever-vigilant Till Kamppeter has tracked the problem down to the font used by texttopdf for lp/lpr printing. Interesting details in bug 447961.

K.Mandla


I have been using mplayer for years, and I find it handles most everything I require. However, I was enamored by vlc’s ncurses interface a month ago, when I discovered it.

I’d love to use the same thing for video or audio playback at the framebuffer level, and I have seen pages elsewhere on the Internet that suggest it is possible. The problem is really, that my attempts to build vlc with no requirements outside of ncurses and framebuffer output (kind of like I did for mplayer) … well, they’re tedious.

I tried twice already to wade through the configuration options in a vanilla vlc tarball, but there are quite a few, and I am in very unfamiliar territory. The few I tried crashed for missing dependencies, and add the fact that I am doing all this at 550Mhz, and maybe you can see why this is a bit slow.

I have put this on my to-do list for when I find a faster, more powerful machine, but it might be a ways into the future. If you have any suggestions or if you know the proper flags to use when building vlc, please feel free to coach me. It would be greatly appreciated.

P.S.: I’ve seen the AUR package for vlc-nogui, which I used as a starting point. But I would prefer not depend on a lot of those things — like hal or sdl-image — if I can avoid them.

new e16-1.0.2

e16 1.0.2 was released yesterday so it was time to update my rpms4centos as well. New e16 rpms can be found in the designated area. Some of the fixes in this release are as follows this is from the mailing list

e16-1.0.2:
- Fix bogus image cache directory files being written in home directory.
- Enable pango by default.
- Enable showing mini icon in border part.
- Fix stacking order when showing desktop state is set off.
- Merge autoraise settings into focus settings dialog.
- Remove old e-icons, add some new ones.
- Fix manual placement when switching desktop.
- Fix potential crash when window is destroyed while being
moved/raised/lowered.
- Merge miscellaneous documentation into e16.xml/html.
- Add simple e16 man page.
- Fix old translucent move mode when shm pixmaps are not available.
- Many minor bug fixes and enhancements, see ChangeLog for details.

As usual enjoy!

WTF, no WTFPL?

I have been thinking about starting a little project. It is only a trivial project and I really do not think anyone will ever benefit from it, but out of curiosity and because I can, I am thinking of doing it anyway.

So, last night I was looking at different open-source licenses with the intention of selecting one for my new project. Now, considering what I have already stated, I came to the conclusion that the WTFPL was probably the best license to opt for. The WTFPL is extremely permissive and therefore it is ideal for a throwaway project. By using the WTFPL, I can effectively build and release my project and never have to worry about anyone ever contacting me about using it. Or for that matter, any crazy stuff happening, not that it would, but anyway…

…with a decision made on which license to use, I then considered where I would like to host the project. I have recently been following a few projects that are hosted on the Google Code service, so I decided that the Google Code service might make a good home.

I set about creating a new project using the web form provided. I started filling in the details, describing what my project was about and then I arrived at a dropdown menu where I was given a choice of open-source licenses. I had not considered that the WTFPL would not be listed — I mean, it is recognised by the FSF!

So, not being too sure what to think about this, I performed a quick web search and found that Rémy Sanchez had recently raised this as an issue on Google Code:

I'd like to submit a project using the WTFPL license ( http://sam.zoy.org/wtfpl/ ). I have seen how much licenses are a trouble (oh, is this license GPL compatible ?), and I think that unless you have reasons (like a big project, or something made by a company, etc), you generally don't care about the exact details of what is possible or not with the license. This is why I put most of my code under WTFPL, and that I'd like to host a WTFPL project here.

And the response from Chris DiBona:

No. The wtfpl is cute, but if you want to use it, you'll need to go to another host.

Initially I was somewhat perplexed with the response given by Chris and I asked myself why a FSF recognised license would not be suitable for use by projects on Google Code? I decided to do a little more digging and whilst I was watching the video of Chris DiBona's talk, "Open Source is Magic", I got my answer. Basically, the Google Code service only supports the major open-source licenses because there is a greater chance that lawyers will already have come across these licenses and know about the attached compliance issues. Funny thing is, I am definitely not a lawyer, but I am pretty sure I understand the WTFPL!

Tags: fun, licenses, software

K.Mandla


I picked out four unrelated applications this time, more on the basis of their display than a central function. The reason for that is the one I’ve given a few times in the past: Applications that are a step above a single command can serve as replacements for GUI programs, and with much lighter requirements.

The first is abook, which is fun if only for following what looks like a tabbed index card shape.

I would guess that the real reason we have GUIs at all is to remind us of how an application corresponds to a real-world equivalent. That’s where the idea of the “desktop” came from really, from the idea of a desk littered with files and folders and tasks. abook does the same thing for an address book, recalling those small black books arranged by letter with a little pencil in the spine. Jot down a name and a number, and then wonder for the rest of your days who that was and why you wrote their name down.

Add a name, an address and e-mail or two, phone number etc. The nice advantage of abook over the little paper version is that it organizes and keeps things neat for you. My little paper address books were always quite scratchy.

abook is intended to work alongside mutt, although it certainly doesn’t have to. I don’t have mutt installed and alpine has its own address book functions for e-mail, so unfortunately abook probably won’t stay on my machine for long. On the other hand it is a nifty console application with a clean arrangement and easy interface. Couple this with something like wyrd and your entire office is manageable at the cost of something like 300Kb in disk space.

For a system monitor, here’s atop.

If it looks like top to you, it does to me too. Noninvasive, straightforward and packed with information. Doesn’t exactly scale itself to the space its given, but that’s not a requirement. On the positive side, it’s far from heavyweight and needs almost nothing to run (what you see there is over ssh between a Celeron and a Pentium, and there’s no drag whatsoever). On the negative side … well, it’s not htop. And we all know how popular htop is.

Here’s another console-driven file manager — clex.

Everybody has a particular file manager that they love, whether it’s Nautilus, PCManFM, Midnight Commander or what have you. clex is unorthodox in its arrangement, but perhaps the proper perspective is to look at this as a kind of enhancement to the shell.

clex has hotkeys for the standard ideas — moving files, copying things and so forth — but also for some unusual things, like user and groups information, or a shell command line. Some of these things are available in other managers, but some are unique (for what I’ve seen) to clex.

Many of us console weenies are bred into the two-pane arrangement and so in that case it might be difficult to get past clex’s list format. But this is one of those programs though that becomes more useful the more you use it … and if that sounds odd, just trust me.

Last, here’s ncdu.

This one I find myself coming back to quite frequently. I must agree that the standard disk usage command for Linux is a bother. If all I want to know is the amount of space a folder is taking up on the drive, I have a long and arduous string of flags to tack on to du before I can get the information I want.

ncdu, on the other hand, spins up fast, sorts everything in a jiffy and has enough small frills to make it absolutely indisposable. It doesn’t do much beyond show the size of a directory, but it will track down space hogs faster than they can reproduce, it will remind you of junk you meant to delete weeks ago, and best of all it has an easy-to-manage interface that almost makes it fun. This is another one I recommend as a program that does one thing, does it well and does it with flair.

As always, if you have suggestions or know of similar applications, I’d be happy to hear about them. (And yes, vifm is on my list. :roll: )

Blog entries aggregated on this page are owned by, and represent the opinion of the author.
Hosted by Tim Riley
Administered (to a degree) by David Barr