Category Archives: Debian

More vaguely unattached ideas

Once again I seem to have collected a few small notes and links that would do better lumped together, rather than alone.

  • In the way of updates, I should mention that the Tamsyn font I learned about a month ago has been updated to include line drawing symbols, which makes it much more attractive in text-based user interfaces.

    That’s 7×14 and very clean. Even 6×11 is very readable, and the way that looks, I might have to feed it into my Debian systems. I could use a little vacation from Terminus. ;)

  • Also from the font department: I regularly use a Japanese keyboard but rarely go through the hoops to set up multilingual characters or international fonts beyond what is default in Xorg. To that end, there’s a very good series of posts at Chip’s Tips on getting urxvt to show CJK and other letter sets. And if that’s not enough, the Gentoo archives wiki page on UTF-8 is very helpful.
  • The Mebius has been updated to Crux 2.7, which is only important because I had held off for so long on making the jump. Directly updating from the Crux 2.7-i586 ISO was easy, but still needed two or three packages recompiled — most notably imlib2 and anything that required openssl (think: elinks beta, alpine, etc.). In any case, I put that off for far too long.
  • I got a note from Brandon about an HP Pavilion laptop with a Trident-brand graphics card in it, that has some horrific wrapping effects when using the framebuffer.

    I have seen this on my Trident-based machines that can work with the framebuffer module, but I usually only lost one pixel — not entire rows of characters. If anyone knows how to tweak the framebuffer module to push those things back around to their proper side, both Brandon and I would be thankful.

  • Similarly, Jose Catre-Vandis sent along a link about setting up jinamp to play music for a party — shuffled playback only, with no intervention required. I was a little surprised, since my own run-in with jinamp a long time ago was very superficial and not much to my interest. A tool for every job though, and this time it sounds like jinamp was exactly what was needed. And one small +1 for the wiki.
  • Lastly, I mention this not as a console game, but as a game that will make you feel like you’re at the console.

    That’s asciiportal, which definitely isn’t The Orange Box, but will remind you of it, if you know it. It’ll take a little more in the way of resources to run asciiportal than, for example, robot finds kitten, but that’s not a good reason not to try it out. For a little while at least. ;)

I think that’s about it for now. :)

Bend the universe to your will: Gearhead

It’s a fair bet that if I haven’t updated this page in a day, that something new has absorbed my attention. This time it’s Gearhead.

Before I start out, I should mention that yes, I found this the same way I’ve been finding a lot of new console programs lately, via Debian’s package search pages.

And yes, I mention this quick on the tail of freesweep, which I don’t actively dislike. I just prefer something with a little more … depth. Gearhead definitely comes through on that point.

Comes through in spades, really. Gearhead reminds me of my years of tabletop gaming, with cardboard tiles and hex maps, firing arcs and reload times and overheating weapons.

If you remember (or still play) things like BattleTech or Star Fleet Battles, Gearhead will be a natural transition for you. Many of the principles are the same.

But there’s a role-playing element at work here too — you’re not just ticking off ammunition and waiting to incur enough damage to knock over a robot.

I haven’t had the chance to dig very deeply into that aspect — I’ve only been playing for a day or so — but luckily there’s a wiki that will show you how to get started. Pilot attributes must count for something.

Personally I didn’t need much coaching to get started. Not that I’m some kind of genius or something, just that the game is menu-driven on almost every point, and most of the indicators and commands are fairly self-explanatory.

But with this much to absorb me, this is definitely going into my book as a keeper for the console — right alongside Crawl — as a game I can really sink my teeth into.

Some side notes: First, I know there is a Gearhead2, which I tried on my Pentium machine running Debian, but it was terrifically laggy and sometimes took 20-30 seconds to move between menu options.

I see on the wiki that Gearhead2 is described as “in the making,” so it might be that it’s sluggish because it’s not quite done. Or it might just be too heavy for 120Mhz.

Both are possible. But either way, I definitely have my hands full with Gearhead. I can wait a little bit for the sequel. ;)

Second, if you prefer a graphical version, I see that there are tile-based oblique-view animated versions that have developed around Gearhead{1,2}, much like the renditions that accompany Nethack, etc.

If you get one of those running, please send a screenshot. :)

Bend to the will of the universe: freesweep

There are powerful forces at work in nature. There are things about life I just don’t understand or comprehend, and one of them is the appeal of Minesweeper.

I might be the last remaining person on the planet over whom this game holds absolutely no sway. I find it dull, uninteresting and terrifically mind-numbing.

But I can’t ignore its history or influence, even if I have probably spent the entire sum of eight minutes of my life actually playing the game. Part of those eight minutes includes this:

I consider it my responsibility to inform you of analogues between popular parts of graphical computing, and life at the console.

So for those of you who wouldn’t consider jumping to a text-only lifestyle because you can’t live without Minesweeper, well, you don’t have an excuse any more.

In fact, freesweep might be an even greater challenge, considering that the game will scale itself to whatever dimension you want. It’s clever enough to scroll over borders, meaning your minefield can stretch far beyond the limits of your screen.

And it has color. And it’s easy to configure. And it’s hardly a drag on system resources; what you see there was quite speedy at 120Mhz, running under Debian.

So for those of you who were desperately clutching at a graphical environment because the indomitable ebb and flow of the universe demand that you play Minesweeper … you can still achieve inner peace. :mrgreen:

A finished product: The weather clock project

I have to say up front that this wasn’t originally what I envisaged, but I do like the way this has turned out.

There it is, ladies and gentlemen: the finished combination weather map and wall clock, or as close to finished as I anticipate getting.

I wouldn’t want to be boring or mundane :roll: , so I’ll jump straight in and explain the details of how and why.

First, I have to say that everything seems to be working as I intended, with a minimum of compromise. The machine synchronizes itself against the Internet on a regular basis, downloads a weather map whenever possible, updates the rotation of the earth to show sunsets and sunrises, and powers off the backlight during night hours.

So I don’t have much to add to my previous post, when I gave all the nitty-gritty of setting it up. I will add one thing though: My mysterious lockups seemed to be happening when I performed a dist-upgrade, and so while it will update itself against the repositories automatically, I leave the actual upgrading to be done manually.

A proper, working CR1220-model wristwatch battery turned the entire system from near garbage to a dream come true. No more clutching the keyboard to adjust the BIOS after every boot, no more manually adjusting the network to pick up the wireless signal, I can yank the extender arm and the whole thing is working just dandy.

What a difference a battery can make.

Now to be honest, the original image I had in my head three weeks ago was of an actual frame around the screen, with the guts suspended underneath, in some sort of casing to hide their ickyness.

However, I had difficulty finding a frame that would fit that size. This screen is 29cm x 21cm, with the actual LCD measuring 27.25cm x 20.5cm.

I did find a couple of frames that would fit those dimensions, but one was going to leave a gap of about 2cm top-to-bottom, and I doubted the width of the panel would have fit into the other.

Price was also an issue here. I got the CMOS battery for a meager 168 yen with free shipping (thanks, so paying upwards of US$12 for a frame, plus an additional amount for some sort of case … well, that seemed extravagant.

At the same time, the motherboard and remaining guts are a good five centimeters wider when the PCMCIA card is included, which means if the bottom part would need to be affixed to the wall independently, or the weight would pull it cockeyed.

The last consideration was heat. The processor runs warmer than I anticipated, and I feared trapping the motherboard in some sort of box would cause heat problems.

I found this wire frame at a 100 yen store and realized that this would solve 90 percent of my problems — it would hang straight, there was a means to suspend the screen and motherboard independently, the frame keeps it away from the wall, there is no heat issue. …

And it looks pretty cool, in a geeky kind of way. It’s like one of those visible human projects or see-through phones: Yeah, it’s not intended to be in plain sight, but it’s interesting once it’s up there.

The screen and motherboard hang from the wire rack by means of steel hooks backed with heavy-duty adhesive.

I gave these a test-run before actually putting it up on the wall, and although the motherboard is slightly heavy (I blame the hard drive), it hasn’t slipped and seems to be holding firm. With any luck, it will continue to do so.

I did try to use a CF card and adapter on this machine, but ran into difficulty because the computer uses an L-shaped adapter to connect from the IDE pin array to the motherboard.

The depth of the adapter was lifting the connector away from its contacts, and the system couldn’t sense the drive. A minor inconvenience, since the old drive I have on here works fine.

And so once or twice an hour, it will spin up, check for a weather map, then spin down again. Otherwise for probably 58 minutes out of every hour, it’s silent.

The LCD inverter board, which hangs horizontally between the panel and the motherboard, needed its wires massaged before it would hang level; in the pictures it’s laying sideways like a drunk sailor. I just needed to stretch out the cords a little.

And for once, the screwball behavior of the ath5k driver in recent kernels is actually a blessing — the power and link lights on the card blink at roughly a one-second pace. How convenient: a bug that keeps time.

The only real unforeseen difficulty, and one I really chide myself for not noticing, was that the power cord between the connector and the AC adapter box is rather short — about 1m, which means it hangs off the floor by a good 45cm or so.

That’s not good, but not anything that can be helped, either. For now I have a stool with a couple of boxes on it, supporting the adapter. Later I’ll actually affix the adapter to the wall.

The only other tight spot was the cable between the motherboard and the screen, which you can see is drawn rather tight. The cable coils into a metal tube, and then exits out the other side.

I don’t know if there’s any slack inside there, but if the spacing on the wire rack were a little narrower, it wouldn’t be a problem. As it is, it’s just a little taut.

One small note about system resources: Running the clock constantly and supporting Xorg puts RAM usage at around 24 percent of 128Mb, with CPU strain at under 10 percent when idle. Naturally, rendering the map and cloud pattern pushes it upward, at regular intervals.

So for a 450Mhz machine with a lowly 128Mb in it, that’s almost nothing. It would be feasible to halve the system resources and get away with the same setup … provided your disk space is still around 2Gb.

But there it is, folks. I’m going to call this a success, mostly because I find myself rather addicted to it. It’s quite clear and easy to read, even from an angle, and as a result I already have a tendency to look up at it, rather than check the clock on the computer in front of my face.

And so: for as long as it lasts, I think this machine has finally come to a good end. It makes me feel warm and fuzzy to think that a computer I beat up for so many years glides smoothly into retirement, and is still fulfilling a purpose.

Like I said above, it’s not exactly what I had in mind when I started — but I’m glad it went the direction it did. I hope it’s a small inspiration in your own projects.

Cheers and good luck. :)

P.S.: Bonus points if you do this on your own, and make it (a) tick through the internal speaker, and/or (b) chime on the hour. Let’s see you out-geek me. … :twisted:

The results of rigorous testing and research

I have a list a mile long of console applications that deserve attention, I have a shortlist of graphical applications that probably should be noted as well, I have a series of links to pages and lists of applications, I have a wiki I try to maintain myself … and these days my methodology for finding interesting new programs is probably pretty dumb.

Here it is:

See that list on the lower right side? That’s how I found empire, while looking at another game — greed — that I already noted a long time ago. And after empire came zivot, and after zivot, this one.

nettoe, a game so simple and obvious that it’s probably a CS homework assignment. Sure, it’ll play networked games too, which is a plus.

But that’s the way I’m finding new stuff these days — I let Debian packages pluck them out of the sky for me. Pretty lame, huh?

Sometimes they’re winners and sometimes they’re way off track, but I wouldn’t want you to think the stuff you read here wasn’t the result of rigorous testing and research. :roll:

Looking for ‘Life: zivot

I haven’t got much time today, so I can only jot a note as a signpost in a search for something else.

For a while I have been wondering why I couldn’t find a version of Conway’s Game of Life for the console, outside of the demo version packed in teapot or a few semi-eponymous “life” packages intended for graphical worlds.

I did find zivot the other day, but … it’s a little less than I anticipated.

This is more of a frame-by-frame snapshot of each stage, and not so much a full animated version. It seems odd to me that I can’t find something ncurses-based that animates the sequences more gracefully. I must be overlooking it.

I guess I’ll just have to stick with worms. :D

More updates: The weather clock project

The verdict is still out on the old laptop being converted into a wall clock and weather map, although I did have a full day to work with it this week, and I have a little more news to share.

First of all, it’s completely disassembled now and I have most of the parts and components working together, in a way that I like. Mostly.


For a hard drive for the system, I have the old 2.2Gb 4200rpm drive that I scalped from the Mebius (its original system drive, now that it is running with a CF card in it.

That drive, of course, is a horrid invention — it sounds like a dental drill every time it spins up, generates a wicked amount of heat and has no redeeming qualities whatsoever.

Lucky for me, I did a lot of work with hdparm a long time ago, so I can avoid prolonged sessions of ear-splitting whining with this command:

hdparm -S2 /dev/sda

which, when added to rc.local, causes the drive to sink into suspend state after 10 seconds. Yes, it takes almost as long for it to spin up again, but my ears thank me.

Next issue: I almost forgot that this video card has a hard time remembering its terminal settings after shifting to X, which meant that the tty sessions were invisible once X took over.

Lucky for me I have a blog that reminds me of all the obscure commands and modules that solve all these issues for me :roll: and after a few minutes of searching, I found this post that reminded me of the vga16fb module.

Adding that to /etc/modprobe means I can bounce between terminal sessions, if necessary. Better to have it and not need it, than to need it and not have it. :)

Also, after rolling around with wicd-curses for a little bit, I managed to pinpoint some of my router issues and got the machine online with an Atheros-based card I got as a gift (some gift … :roll: ).

If you’re in the same boat and running Debian Squeeze, you’ll need to enable the non-free repositories and install firmware-atheros. Ta-da! Like magic, it works.

So I’ve moved from wired to wireless, I put an old hard drive to use without torturing my ears, and I can manage the machine without the need for an external keyboard or ssh. These are good things.

The bad things are still around, but appear less daunting these days.

For one thing, I keep running into system freeze-ups, usually after a long period of inactivity. The first few times I’m sure it was faulty memory because pulling it made them go away.

However, there might also be a heat issue at work here, at that’s a little harder to circumvent. (Get it? Circum-vent! A pun! Ha! :| :roll: )

They seemed to appear when I finally got the processor and heat sink separated (yes, the problem was crusty thermal paste), but again, it might be untested, old memory.

I pulled the original case fan because it was noisy and ran continually. I’m wondering now if perhaps I should put it back on, and see if the freezeups go away.

I’m also able to set the machine in the BIOS to ignore the floppy drive — which is good because it means I can detach it completely as well as the extender arm, and run without both.

The problem is that the CMOS battery is dead, which means any time the power is cut the BIOS reverts to its defaults … and tries to find the floppy drive again.

Which means each time I boot I have to reattach the keyboard, acknowledge the error message and then detach.

Which finally leads me to the final issue: The power bracket, where the plug meets the motherboard, is a little loose now that it has been pulled from the casing.

Apparently the case offered a little support for it, and now that the case is gone it tends to rock a little and lose contact with the plug.

So occasionally — usually when I’m attaching or detaching the keyboard to acknowledge the boot error message — I get a full power drop, the machine clicks off, and I’m back to square one.

It’s a little comical, so feel free to laugh. Once I figured out what was going on, I laughed. :roll:

Right now, the plan is to make a few more forays and see if it’s really going to work, in the long run, for this machine. That’s because the next step involves buying things.

First of all, I want a no-frills plain-Jane picture frame to serve as the basis for the entire clock. And since it’s going to hang on the wall, it’ll need some grit.

If that will work, I will clearly need a new CMOS battery — it’s a CR1225, if you’re interested — to keep the BIOS settings between powerdowns.

And really, if I’m going to invest that much in it, I might as well pick up another CF card and adapter, which will probably be less than US$20 if I don’t need a full 8Gb of space.

I feel good keeping a hard drive out of China’s vast garbage fields, but really, I would probably save a little in weight and heat by going this route.

Like I said, this is the investigative part of the experiment. Things are more or less working as I would like, and in it’s transitory state it’s quite interesting.

But it still has the potential to go south, so I’m still holding my breath. Give me another week and I should have more to tell. :)

Oh great, another addiction (that I could swear I have seen before)

I had a major flashback today, finding this game that I could swear I remember playing in the early 1990s, on 286 machines in one form or another.

If this is the first time you play empire, you might think it a bit hackneyed, but that will only be because the style and rules date back quite far.

Dominate cities with armies, build units for exploring and battle, and teach that stinking computer a lesson or two.

The man page has more than enough information to get you started, and the commands and units are all mnemonics. I can give you a little help: Edit mode is your friend. :twisted:

In any case, I have a little something that will distract me from Crawl and Icewind Dale for a while. That’s either a good thing or a bad thing. :|

Another nifty load meter: ttyload

Litho mentioned ttyload last week, and this one is worth singling out on its own merit.

A static photo doesn’t give you the full effect. Those arcs shift from right to left like a traditional graph display.

It’s also smart enough to mesh colors if they overlap, and one thing that’s really nice is the time stamp along the bottom, that corresponds to the system time.

So not only do you know which arc represents which meter, but you can pinpoint an exact time when the load changed, or where it fell off.

And the graph scales vertically too, so peaks cause the entire display to shift down, or fall away when they move off screen.

Very nice, I like this one a lot. Thanks, Litho. :)

P.S.: Oddly enough, I found this one in Debian Squeeze, but not in Arch/AUR. Anyone want to adopt a very easy and very low-maintenance PKGBUILD? :|

P.P.S: A new update as of yesterday?! How timely! :mrgreen:

The geeky details: Clock and weather map

I promised I would give a rundown of the wall-clock-slash-weather-map setup, once I got to a braggable state. I think I can do that now.

I should explain the idea I had in mind before I started though. First, I wanted the weather map to update regularly, both with the planet shadow and weather overlay. Those two things are fairly easy to achieve, given the work I did with this last time.

I wanted it to start straightaway to X, without a login. I don’t see it rebooting much, but it seemed prudent just the same.

Next, I wanted conky to show only the time, but in big enough letters to read across the room. Any additional information, like a hostname or kernel version, would be unnecessary but acceptable.

The mouse cursor needed to disappear. It rather defeats the purpose to see the cursor on a wall clock. And there should be no timeout on the screen, no screensaver and no powersave timeout.

Finally, I wanted the screen to turn itself off at night and turn itself back on in the morning.

So this is how I solved most of those things. Autostarting was the easy task: Simply adjust /etc/inittab in one of the fashions shown in the Arch wiki.

Once X is up an running, there’s little I can mention in the way of improving xplanet over the last time I wrote about this. I will say that I moved the xplanet command to Openbox’s ~/.config/openbox/ file, just for housekeeping purposes.

I also commented out the line that paints a background color in, since that’s just an added step.

Inside, I adjusted xplanet’s wait flag to 900 seconds, or 15 minutes. That’s not for the benefit of the weather map, but to watch the sunrise and sunset creep across the planet.

I also adjusted the radius of the image to 64, so there’s a better impression of a sphere. Not important, but worth mentioning.

Next, conky. I used this old conky arrangement from a long time ago, setting the font size to 64 point and moving it to the lower right corner instead of the lower left.

My xorg.conf file enables the double buffer, and my .conkyrc uses that for more-or-less :roll: seamless refreshes.

Next, I needed a way to hide the mouse cursor. Enter unclutter, which does only that one thing.

It has a few options for timing and specific conditions for hiding, but the defaults worked fine for me. If I press the touchpad the cursor reappears, but disappears a second later.

The biggest issue, and the part that gave me the biggest headache, was to tell X to stop blanking and just show the screen all the time — no timeouts, no powersave.

You’d think that would be easy, I got all kinds of crazy behavior, including a bizarre hash-pattern-plus-giant-X screensaver that I didn’t even know existed.

In the end, here’s what worked:

xset s off
xset dpms force on
xset -dpms

Believe it or not those options in that order and only in the file were the only things that worked. I added them to .xinitrc and even to .xsession, but something always zapped them once X passed the session to Openbox.

Both xplanet and conky will update themselves without any hard work, but there are a couple of other things that need cron.

First, the weather map needs downloaded at four-hour intervals (I think it was four hours. Maybe three). I’m not sure exactly when it’s updated, so I set cron to run the python script and download on the hour.

The script is smart enough to check first, and see if the existing file needs updated. If it doesn’t, it closes.

The last thing was a way to turn off the backlight at night, and turn it on in the morning. A tool for every job, and for this job the tool is vbetool.

vbetool, as I understand it, allows the console to access DPMS functions, which are usually triggered through the BIOS. In my case some of the functions were inaccessible, which I believe might be because of the age of the machine.

Regardless, just dpms off and dpms on were enough to get the behavior I wanted. These were only working as a root user though, so I added these to root’s crontab. Which now looks like …

00  * * * * /usr/bin/python /home/kmandla/.xplanet/ /home/kmandla/.xplanet/clouds_2048.jpg
00 23 * * * /usr/sbin/vbetool dpms off
30 06 * * * /usr/sbin/vbetool dpms on

And that’s it, really. I thought it would need a little work than that, but the only thing I’ve added to the machine over the past day has been dropbear, so I can access it remotely and save myself typing on that rotten keyboard.

I originally planned to add a system update to cron, but since Squeeze moved to stable, I haven’t seen much in the way of updates at all.

So I might do those manually, along with making sure ntpdate sets the clock right. So far the display hasn’t been far off from any other machine in the house, or more than a few seconds.

So that’s it. Between this post and the one from a few years ago, you should be able to set this up in Debian without undue effort.

I see that most of this software is available in Slitaz, but I think you might have to build most of it in ConnochaetOS, if you want that for an old i586. For others … check and see. ;)

Next stop: Tearing it all apart. :twisted: