Wednesday, November 30, 2005

AAAAAAAAARGH!

Python has been ported to the GP2X!

That means pyGame can now be used to create GP2X games.

And I've had so little free time available, I still haven't got very far with learning Python.

I'm being punished, I just know I am. I finally discover a language I can learn, and think of dozens of things I could do with it, but then can't find the time to learn it well enough to do any of them.

It's driving me nuts. I've got to find more time!

Tuesday, November 29, 2005

XDMsnow - screenshot!

Following on from my last post:

Innit pretty?!

MP3s suck

I'm not a music fanatic. I like to have some background music at various times, but that's about it: I don't have any major hardware purchases dedicated to enhacing my music-listenting pleasure, or anything like that.

And for background music, MP3 is a great format. But when you really concentrate on it. . . yuck. Seriously.

I just had a go on Pandora, another of those internet radio things. It's working quite well so far. But when it played an MP3 of Life Uncommon by Jewel. . . it was really bad. I know that song well, and this was not right. It was. . . I don't know, flat. It was almost hard to listen to it. I actually removed an MP3 of Flashdance (ripped from a CD I own, before anyone starts) from my collection because that sounded really, really bad.

I know MP3 is aimed at certain types of sound and not all songs will fit its bracket. But I'm growing steadily less impressed with MP3s. They render too many of my favourite songs hard to listen to.

Possibly my current meditation practice is another factor: It revolves around increasing my concentration skills, so I'm listening much more closely to music than a 'casual' listener. I don't know.

I just know I'm incredibly grateful for the Ogg Vorbis encoding. Never mind the fact that less hardware supports it, at least it doesn't ruin the music that I like enough to rip.

Christmas is coming. . .

. . . and it's an old, old tradition that Xsnow gets hauled out.

Of course, it's easy enough to trigger it to run when you yourself log in to an Xwindows session: Just put "xsnow &" in your .xinitrc or .xsession file.

But what about your login screen? After all, that's got far less windows getting in the way, and it can accumulate some impressive snow drifts.

I, of course, use XDM as my login manager, because it's the best. To set up XDM to run xsnow, it's very simple:

cd /etc/X11/xdm
echo "xsnow &" >> Xsetup_0
echo "killall xsnow" >> GiveConsole


Easy as that! From now on, your XDM session will have Santa, Rudolph, Christmas trees and flurries of snowflakes that go away when you log in (If you don't use the third line, Xsnow will run even after you log in)

Xsnow's great. I've even been able to compile it for Cygwin here at work. And it's got lots more options than you might think: You can even run multiple sessions with different-colored snowflakes in each one to make it more colorful (You'll get a warning about the perils of yellow snow if you choose that particular color tho ;o)

There are Windows and Mac versions for you non-Linux users too, so there's no excuse!

Saturday, November 26, 2005

Open Document vs. MS XML

I just saw this comparison on Groklaw

Have you seen how MS's format actually codes the contents?

It's hideous! Unbelievably ugly. Words cannot express the horribleness of the format. I am genuinely stunned at how awful it is: I can honestly say I expected a lot better of Microsoft.

Coming from a Linux zealot such as myself, that should tell you something ;o)

Friday, November 25, 2005

The Wall

My dad's a big Pink Floyd fan - an endless stream of it used to issue from the HiFi in my childhood years.

I was never hugely into it myself, but I got to know a lot of it very well, just because I heard it so much.

In the last year or two tho, I have started to like it. Enough to buy a couple of albums from the secondhand stall in town, anyway. . .

The Wall, in particular, seems to have numerous bits that are still highly relevant today. In fact, probably more so than they were back in 1979, when (according to the album copyright notice) it was first released. Such as:
Momma's gonna keep you right here under her wing.
She won't let you fly, but she might let you sing.
Momma's gonna keep Baby cozy and warm.
. . .
Of course Momma's gonna help build a wall.
Take a look at numerous big players in the technology stakes. Especially the Digital Entertainment and Trusted Computing stuff. "Don't worry. We'll look after all your needs. Trust us. We're only sealing you away from the things we think are bad." sums up their attitude neatly, wouldn't you say?
The prisoner who now stands before you,
Was caught red-handed showing feelings.
Showing feelings of an almost human nature.
This will not do.
And if at least one of their initiatives hasn't struck you as striking against basic human nature, then you really haven't been paying much attention, IMHO. Creativity for any reason other than profit? Ignore it, it's an abberration. Sharing with others? Should be illegal!

etc. etc.

Just something that struck me as my PC's media player randomly selected a PF track as it cycled through my music files, which for some reason is now an illegal collection in some countries, even though I own all the CDs. . .

Thursday, November 24, 2005

As above, so below. Or not.

Something that occurred to me a while ago: I use Gentoo, and that means all my software is compiled from source. When you compile something you have the option of compiling in specific parts of the code for specific functionality.

You might want to compile in support for Esound rather than Alsa or Arts, for instance. You might want to compile the Links text-browser without X11 support. You may want to compile mplayer with support for Windows codecs. And so on.

It's just like compiling the kernel itself: You work out what you want it to do, and compile in support for the things you want, without support for things you don't want.

But it's not like that. Because the kernel has another option: It has loadable modules. This means you can code in support for almost anything, but without having it make the kernel any bigger, because it's loaded separately, and only when needed.

Linux is often touted, even today, as running on software with minimal requirements. Imagine if every feature of every bit of software could be chosen at compile time, as either "in", "out", or "module"

Let's take Firefox as our example.

I never use the "Back, Forward, Stop, Refresh" collection of buttons: I use keyboard shortcuts and/or mouse gestures. These buttons are worthless to me. I'd like to compile them out.

I don't use Live Bookmarks much any more: I have an RSS aggregator on my web page, it works better as it can give me article summaries instead of just the titles. But occasionally, I do want the live bookmarks for some reason. I'd like Live Bookmarks to be a module: Not loaded when Firefox starts, only loaded into memory when I actually click on the Live Bookmarks subfolder.

Some people might not want any bookmarks at all: They might think del.icio.us is all they need.

Some people don't use Firefox extensions at all. But they still have all the functionality for it, none of which they're using. Same goes for themes and Plugins. And so on.

Linux code is almost invariably modular. I gather Xorg is being re-written to be even more modular to make it easier to maintain and upgrade the code.

What if that modular nature were expanded even more? What if every piece of software were as configurable as the kernel? You could still use "Yes, chuck in the kitchen sink as well" binaries for people who don't care. But for people who do care, being able to compile in only the features that are needed could make Linux as configurable as it's possible to get.

It's not so it could run on old hardware: That's all well and good, but doesn't really benefit many people.

But rather, so that it could run on very modern hardware: PDAs and other small devices that are cutting-edge but not very powerful. If you could make Linux software as lean as possible, you could really increase the number of Linux apps. that these devices can run, and the speed at which they can run them.

Especially if you could make it so that it didn't interfere with existing ways of installing software, but just added a new one, so you could:

Download a compiled binary with all the typical options built-in

Compile from source with all the current typical options

Call up a "menuconfig"-style menu that allows you to enable, disable, or modularise every possible feature of the software.

I reckon you could really boost Linux' appeal in less-powerful devices by doing this. To say nothing of the benefits of having highly modular code.

Just a thought. . .

It isn't easy being geek

I'm used to the frequent "The printer's not working!" and "Why can't I save this file?"type questions: I get them every day.

But at this time of year, I start suffering from "Where can I get a PSP cheaply?"and "Will an iPod work with a Windows PC?" and the like.

And the trouble is, I'm too much of a geek to give an authoritive answer. Less-geeky people would own a PSP and an iPod and all that sort of thing. But I have a GP2X. Less-geeky people use iTunes, I'm trying out last.fm (check the link over ->) and Gnomoradio for my non-CD music needs.

I can give a pretty good answer most of the time, because I keep current with such matters, but it's not definitive because I'm not an actual user. So when there are questions about battery life, prices, et al, I start getting vague.


I had a request from http://www.tectonic.co.za to republish my Linux != Windows article, since altho my whole site is under a Creative Commons license, it's a non-commercial one. It was a rather out-of-the-blue request, so I've no idea whether or not to give permission.


Due to my continuing email debate about coders and interfaces, I updated yersterday's post on interfaces, and put a link to it into the article itself.


And I'm trying to learn Python, learn how to use Blender & Gimp a lot better, create a completely new FVWM theme as part of an FVWM tutorial, post to a blog, and still have time to do do my work & have an actual life. . .


You don't hear about luddites worrying about these things!

Wednesday, November 23, 2005

Why aren't cars flexible?

Another random thought strikes. . .

It's a truism that most technological innovations are preceded by nature. Computers are just very simple brains. We envied birds for flight for centuries before aircraft. Digital cameras are still light-years away from matching our own eyes. Etc. etc.

This has lead to many people looking to the natural world to try and borrow the inventions instead of coming up with them independently: People want to manufacture spiderweb silk, they're trying to work out how those odd lumps on humpback whales can give turbulence without drag, and so on.

So why is it that cars & other vehicle haven't started emulating the dolphin approach to streamlining?

Different speeds & conditions create different demands for streamlining. Dolphins deal with this simply: their surface is highly flexible, and can be 'moulded' by the pressure of water against it, almost literally 'flowing' out of the water's way and ensuring that they are always as streamlined as possible, regardless of speed or body position. I believe bird feathers do the same sort of thing in many cases, as well.

Why is this not applied to cars? The biggest concession I've seen so far is a spoiler that pops up occasionally on a few posh sports cars.

Flexible bodywork would help to improve streamlining, which obviously cuts fuel consumption. It would also be good in crashes: Cars are already designed to crumple to absorb the force of the crash, why not go the whole hog and make soft & flexible body parts? Pedestrians hit by cars would be better off, and so would all those car owners who've had a minor prang result in hundreds worth of repair bills to bend the annoying dent back into shape.

You might be able to make a case for such bodywork being less durable than the existing ones. I don't necessarily agree: There are numerous soft-yet-tough compounds already in existence, and unlike their metal counterparts, soft polymer car panels wouldn't rust.

Maybe that's the problem. I know we could produce rustproof cars right now for the same cost. The reason we don't? Nobody would replace them. Or so say the manufacturers.

Ah well. . .

Coders & interfaces

I received a bit of feedback on one of my web pages (Guess which one)


The writer disagreed with one thing I said in particular: The bit that reads:

When somebody devotes a large chunk of his own time to create a piece of software, he will make the user interface (UI) as good as possible. The UI is a hugely important part of the software: there's no point having functionality if you can't access it via the UI. You might not know what it is, but there is always a reason why the UI works the way it does. That reason? Because it is the best UI the creator could create.

Before you insist that a more Windows-like UI would make the software better, bear this fact in mind: The creator of this software, a coder who, by definition, knows far more than you do about this piece of software, doesn't agree with you. He might be wrong, but the odds are against it.

He essentially was of the opinion that coders make awful interfaces, and that a coder's idea of a good, simple interface was an end-user's nightmare.

I disagree, as I said in my reply, quoted below for the interest of anybody who's interested:

Your points are all completely valid and accurate, but irrelevant to the point I actually make in the article. Your stated definition of a good user interface is exactly the one I address as a problem in the article: The definition of "User friendly software", which has become a synonym for "easy to use immediately without any prior knowledge"

Undoubtedly, a coder who sits down to write a piece of software for text manipulation will write a piece of software that a "typical" user will find horrendous to use. This is perfectly illustrated by vi, clearly a coder's text editor, and absolutely nothing like a non-coder's text editor, such as Windows Notepad. By "user-friendly" standards, vi is an utter loss and worthless as a text editor. And yet it's still in widespread use today, gaining new converts (such as myself) as well as keeping it's "old-school" users.

A coder who writes a piece of software for a task writes it to do so as efficiently and easily as possible. But because he writes it for himself, he has to take no account of "user friendly" concerns: He can happily say "'[ESCAPE] colon double-you queue [EXCLAMATION]' is a great way to save a file and quit the application!" His software will do everything it needs to do, with just a few keystrokes. It will also be an absolute nightmare for other users who don't know what keystrokes to use, but that's not his problem: He wrote it to do a specific job well, not to be intuitive and obvious to other people.

Or for a perhaps more relevant example, let's consider a simple, everyday task: Unzipping a multi-file archive.

On "user-friendly" Windows, this involves double-clicking the file. Up pops a new WinZip window, showing you all the files in the archive, the location in which it will extract them to, and some big, easy-to-understand buttons. To extract the file, you click the "extract" button, and with just one or two more mouse clicks, you're done.

Sit a "user-friendly" addict in front of a Linux shell and tell him "Unzip that .tbz file" and he won't even know where to start. Even if you give him the hint "Use 'man' for help and the unzipper is called 'tar'", how long will it take him to work out that "tar xvjf filename" is the magic combination he needs?

By a "user-friendly" definition, tar is a complete failure: It's a coder's unzipper, and unsuitable for "user-friendly"-demanding end-users. And yet it's still ubiquitous throughout the Linux world. Why? Because its nasty, unfriendly, failure of an interface is simply better than WinZip in many circumstances.

Consider, for example, you have a hundred Zipped archives, one of which contains a file you need - a possible enough occurrence if you run regular backups on your machine and accidentally delete a file you shouldn't have.

Using "friendly" WinZip, I may have a hundred double-clicks to do to find this file. I'm going to be there a long time.

Using our "failure", tar, I can find it with a one-line instruction by using tar's "list contents" switch and piping it through a "grep filename". I'm going to find my file in a matter of seconds.

So to return to my point: I never say, anywhere in the article, that a coder will create a "user friendly", intuitive, simple-to-use interface to his software. To do so would be laughable, and your point that coders make poor interface-creators is self-evident in a vast multitude of software.

Even in "user friendly" browsers like Firefox & IE, there is failure to make use of simple UI rules. The "Back" button is the most used browser button, and should therefore be larger and more obvious than the others. Instead, it's no more prominent than the rarely used "Forward" and "Stop" buttons. Why? Probably because coders use "Alt-Left" and never actually touch the "Back" button.

However, I do say, and I maintain, that a coder will make the user interface as good as possible. Not as friendly as possible, nor as intuitive as possible, but as efficient, powerful, simple, and effective as possible. An important thing to remember when comparing comemrcial projects to FOSS ones is that, typically, in FOSS the coders creating the software are almost invariably also the end-users as well. They aren't hired by another concern to create software that they will never use, they're creating software for their own use.

The coders out their working on Firefox are all browser-users. The people coding the Gimp are graphical designers who are adding the features they require in the way they require them. Gnome is being created by people who want a better Desktop. And so on.

So while it may be true that that the end-user should be the one who defines the interface, not the coder, in most FOSS projects, unlike most commercial projects, the end-user is the coder. That's an important factor to consider: If somebody is both a knowledgeable end-user and a knowledgeable coder, and he says "This is the best way to do it", he's in a position of authority on the subject that few others are qualified to match.

Easy to use and "ease of use" are two very distinct concepts today. It's easy to use tar to find that one file from a hundred archives, but WinZip is unquestionably the software that scores highest in typical "ease of use" comparisons. That's all well and good, but it completely ignores the fact that spending a little time learning how to use a more-efficient but less-intuitive application can result in saving time perpetually afterwards.

I work in an office where our job consists entirely of writing medical reports, which contain many frequently-used terms. By spending a half-hour teaching my technically-illiterate co-workers how to use MS Word's AutoReplace option to effectively write out long, frequently-used terms for them, I've increased the amount of work they can do in any given day. By making them invest some time in learning how to do something non-intuitive, they've made back a significant amount of time ever since. And will continue to do so tomorrow, and ever after.

An application's "user-friendliness" only ever matters at the start. If you have a totally non-intuitive, "unfriendly" piece of software, that only matters when you first put the users on it. After you've taught them how to use it, it no longer matters that it isn't friendly, because they can use it perfectly well regardless. If that application then means they save five minutes out of every hour because it makes up for its lack of intuitiveness by being superbly efficient at its task, then that application is the one that should be used, even if it does mean you had to spend an hour or two teaching them how to use it on day one. In under a week, that investment in time will have paid for itself. Considering an application's suitability for a task solely on the basis of how fast a user can start using it will result in bad decisions most of the time.

As a personal example, I recently wanted to design a new theme for a window manager: Icons, wallpaper, and all. MS Paint is unquestionably easier to use than the Gimp or Photoshop: I had to do a Google search just to find out how to draw a rectangle in the Gimp, for Heaven's sake!

But while I could draw a rectangle in Paint the moment I started out, how long would it have taken to create a graphic such as the wallpaper in this image:



with just "friendly" Paint? I'd have been there forever! By spending a little time learning to use less-friendly software, I accomplished a task in minutes that would have taken hours or just been downright impossible with friendlier but less powerful software.

So I must say again: I disagree that coders make poor interfaces. They don't often make good "user friendly" interfaces, agreed, but they make supremely efficient and functional interfaces. And that's what counts in Linux software.

If you doubt that fact, try a simple test: Go onto a typical Linux forum and ask "How do I unzip this .tbz file?" and see if you get pointed to tar, or to some user-friendly, GUI-touting unzip software.

Tuesday, November 22, 2005

Today: The best gaming & multimedia machine ever made

Over in America, they started selling the Xbox 360 - Microsoft's latest attempt at taking over the home entertainment industry. I gather they've carefully made sure the supply didn't come even close to meeting demand, to ensure they'd be sold out very fast & create a media buzz.

Not that I care about that silvery tat MS is touting, you understand. I only mention it because I got something far better in the mail this morning. Yes, my GP2X has arrived!

A small handheld based on Linux, it can play movies, it can play MP3s and Oggs, it can play games, and it can even output them to TV so your handheld can be used as a TV games console too.

I haven't had any chance to play with it yet, sadly, I just wanted to gloat about the fact that it had arrived at last :o)

The trials & tribulations of maintaining a Linux page

I've been a Slashdot reader for a few years, something that's much easier when you set your comments view to only show the better posts, and I'm all-too-aware of the Slashdot effect.

Accordingly, my heart skips a beat every time I check my stats and see that somebody was referred to my site via /.

So far, it's always been linked from comments a reasonable way down, fortunately. I don't think my server could survive a direct link from the front page. . .

But it can be very interesting to see where my stuff winds up getting linked from. You get a lot more feedback by seeing what people say about you in forums than you do waiting for them to tell you directly via email or comments.

Of course, you have to be prepared for the "What a load of crap" comments (especially from people who haven't actually read what you wrote, for some reason) but even those can be constructive. And it's always nice to see that people have linked to your stuff because they think it's a worthwhile read.

The latest ego-boost: LinuxForums.org have made a link to my site a sticky in the Newbie forum. So at least a moderator thinks it's a good read ;o)

Somebody sell me a Sony CD!

It could be worth $100,000 - that's what I call an investment! :o)

This brightened up my morning no end. I had to fight to avoid laughing out loud :o)

It's not just that Sony's getting shafted for it's extremely anti-social DRM. It's that you can feel all those litigation-happy Americans rummaging through their music collection, looking for any DRM that they might already own and trying to make a lawsuit out of it.

Imagine the questions being asked in all the media companies right now: Every consumer that buys DRM could potentially cost us a tenth of a million? Is that really more than casual piracy is going to cost us?

I think not! Sony has set DRM and its acceptance back years with this scheme: Public awareness is much greater, and the industry has just had it thrown in their faces that No, people aren't willing to be sit back and be treated like criminals grateful for any scraps they get thrown.

Sell us a decent product, sirs, or we won't buy what you sell. Sell us a bad product that you pretend is a good product, and you will be held accountable for it.

Your priority is pleasing your customers, not running roughshod over them in the name of preventing piracy. Remember?

Monday, November 21, 2005

A DRM problem that needs addressing.

Most people who know much about the subject agree that music CDs and DVDs are overpriced - discs that costs pennies to make are being sold for pounds.

Most tech-savvy people agree that this is a big incentive for P2P piracy and say that if the industry wants people to buy instead of download, they should drop their prices to a more reasonable level.

The industry, naturally, says "Charge less money? Charge Less Money?!?" and slaps another DRM scheme on their products to maintain what is effectively their monopoly.

The thing is. . . ignoring all the "DRM just turns honest users into pirates" debate, something that seems to be largely ignored is:

A DRM-free CD is worth a lot more to me than a DRM'd one. If I buy a non-DRM CD, I can rip it & play it on my PC, copy it onto an iPod, copy it to tape & listen to it in the car. . . I can do a lot with this CD. Legally and ethically, I can do a lot more than just play the CD in a CD player.

If, however, I buy a DRM CD, then I can't do those things. And yet the DRM CD will cost just as much as the non-DRM one.

Faced with this immense loss in value to the consumer, what exactly is the justification for keeping the price as high? If I buy a DVD player with less features, I expect to pay less. If I buy a DVD with less features, why am I expected to pay the same?

Anybody?

If you want me to buy a CD or DVD with a shedload of restrictions, I might actually accept that. If the price reflects the decreased value it has. I'd be willing to buy the occasional DRM'd DVD if it only cost a couple of pounds.

But pay as much to get much less? How does this benefit me, exactly? I have a GP2X arriving tomorrow (I hope) and I intend to transfer DVD movies & CD music onto it. I won't be able to do that with Creature Comforts because (I discovered after buying it) it's copy-protected and won't run on my computer.

The DVD is therefore worth less to me than all my others. And yet it cost me just as much. DRM has cost me a large chunk of the value a DVD has to me.

I'm not a pirate. And yet, DRM is causing me problems. And it's not giving me any compensation for those problems.

Why, therefore, should I be anything but anti-DRM?

(And, one other thing to ponder: Creature Comforts is avilable on several bittorrent sites. So what exactly did the DRM accomplish, other than pissing off at least one paying, non-pirating customer?)

Christmas began yesterday

As you may have gathered from other posts, we suffer from condensation in our flat. This year, it's been far worse than usual: We've got some decent radiators keeping the place warm, so the air can stay a lot more humid. Every window in the place is dripping with condensation every morning.

So we figured it was time to bite the bullet & buy a dehumidifier yesterday. Then my parents rang on anopther subject, and when we mentioned why we were out shopping, they told us we weren't to buy a dehumidifier under any circumstances.

Three guesses why. . .

So it seemed a bit silly that we spend a month squeegeeing our windows dry because of Xmas, so they offered to let us have it now. Early, and it does spoil the Xmas thing a tad, but it's far too practical not to, really. So yesterday afternoon, we took receipt of a big & rather posh dehumidifer.

By night-time, it had gathered 3 pints of water in its holder. The whole place was much, much warmer. Think about it: How long would a kettle have to boil to evaporate all that water? That's how much heat was locked up in the evaporated air. Getting the water out makes a big difference. And we've still got quite a bit to go: The radiators are good at heating the place up, the summer was so mild that the winter is a very cold one, so there's lots of water to get out of the air and down the sink.

And I have an email in my inbox that I've been waiting for for weeks. The contents?

Hello,

This is to confirm your recent GP2X order has now been sent to you.
Oh yes! Games, movies, music, all in one compact, Linux-based handheld package. I've been waiting for this for months!

Lastly, I'd like to complain about another Christmas-period water-based bugbear of mine. Frosted car windscreens.

There are three ways to get the layer of ice off the windscreen. In order of popularity:

  • Get a (usually plastic) scrapey thing and chisel the ice away. This is a bad idea for one simple reason: Scraping like this puts microscopic scratches in the glass. And the rougher a surface is, the easier water can condense onto it, and the more frost you'll get forming. You're exacerbating the problem every time you rasp the ice away like this. The only way to do it without this problem is to use a softer scraper (a rubber squeegee is good) and run the car heater on the inside at full blast. This melts the ice from underneath, and you can simply slide the ice off. Very few people seem to do this, however. They scrape it off in a way that sends shivers down my spine.

  • Get a can of spray-on de-icer. This is great, only it's solvent-based and rots rubber. That means the seal holding your windscreen in place, and the blades of your wipers, are both being disintegrated every time you use it. Plus you need to buy a new can regularly.
Note that these approaches are the only ones you can buy in the shops. Too many people think this means they're the only ones available. That's because the third alternative is better than either and completely free, thus disliked intensely by shops.
  • With any water-holding recepticle, such as a bottle, jug, or kettle, pour cold water (Not hot. Hot water on icy glass can result in spontaneous shattering!) over the ice. The water, although cold, is still liquid and therefore relatively warm. It will wash away the ice. Then use the wipers to remove the water before it freezes. Voila, your car is free of ice in seconds, completely free and without doing any damage to anything.
Year after year I see people wrecking their windscreens by chiselling at the ice with platic, or even metal, scrapers. They spend ages at it, without even using the car heater to help them, and it's totally uneccesary. Turn on the heater and give it a minute and you'll be able to slide the ice away in seconds; Or better still, keep a bottle of water in the car and just wash the stuff away!

Sunday, November 20, 2005

Fun with forkbombs

I figured it was time I locked down a couple of my settings. Specifically, preventing runaway processes from crashing my PC by spawning an endless number of new processes - a forkbomb.

If you want to do this yourself, you can: Just enter the following text into a console & press enter

:(){ :|:& };:

Unless you're protected from forkbombs by limits placed on the number of processes a user can run, this will lock up your PC. To check beforehand (a good idea if you don't like hard reboots!) run "ulimit -a" to get a list of your limits.

You'll see something like:

core file size          (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 4095
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 4095
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited


In this setting, I can run 4095 processes before I'll get error messages. That's rather high, although better than completely unlimited.

So I edited /etc/security/limits.conf with the following line:

*               hard    nproc           100
And the next time I check my limits:

core file size          (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 4095
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 100
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 100
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

100 processes should be plenty for anybody. Running the forkbomb now will generate lots of errors, but not actually lock up my machine.

I've also switched the Xterm that I always run in my desktop (See my screenshots post) to run with a higher nice level - by executing it with nice -n 20 xterm instead of just xterm. This means that if a normal process, with a default nice of zero, crashes in a using-up-all-resources way, the xterm will be unaffected and I'll be able to kill -9 it with much more speed.

Neither is likely to save me from a huge headache, to be honest - forkbombs are usually a problem caused by malicious users, but I don't allow remote logons, and if all a cracker can do is crash my PC, then frankly, Who Cares? And it's usually easier to end a gone-crazy process by Ctrl-Alt-Backspace-ing out of the X11 session. But it's better to have them than not to, so. . .

Saturday, November 19, 2005

Bloody noise

Right. Sound.

Sound was never a major feature of Linux when I started out with it more than 10 years ago. MP3s hadn't been invented back then, the only thing I really needed sound for was Doom.

But things have changed, so when I came back to it a few years ago, I was glad to find Alsa had been created. Of course, it still presented some problems, but overall, sound worked.

The main problem that people complained of was that Alsa only lets you play one thing at a time. This was, in my book, an advantage.

The people who complained, you see, where the Windowsy people who switched over to KDE or Gnome and, as on Windows, had a DE which plays noises for the most mundane reasons - like starting up, shutting down, and clicking on something.

I hate this "background chatter" intensely. In my book, sound should be played when it's asked for, and at no other time. If I'm not watching a movie, playing music, or talking via Skype, then my speakers should be silent.

The people who complained about Alsa's one-track approach were the ones who'd get a system beep go off as they started their media player, and find that the media player wouldn't work, or who'd play an MP3 and then get an error message when their email tried to beep at them. This, they found, was annoying.

I agree. That's why I shut all the damn things off. I don't even let my terminal beep at me when it's got a problem: I don't want my music to have system-error-muzak mingled with it.

So I saw no problem with Alsa only doing one thing at a time. Mostly. Very, very occasionally, I'd get some interference that was annoying, like a sound from a browser Flash dohickey going off just as I was starting up XMMS; or shutting down XMMS improperly so it stayed holding onto the sound /devs even tho it was gone.

Small niggles, but niggles. So when I found that Alsa can do multiple sounds at once, I decided to give it a go.

I created a file, .alsafile, in my home dir, and put the following contents into it:
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}

bindings {
0 0
1 1
}
}

pcm.dsp0 {
type plug
slave.pcm "dmixer"
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.default {
type plug
slave.pcm "dmixer"
}

ctl.mixer0 {
type hw
card 0
}

This bit of code enabled Alsa to "mix" sounds: The reason a default Alsa only does one sound is that the player grabs the /dev nodes for sound, and don't let anything else use them. By using dmix, you create an intermediary: Dmix grabs the sound devices, and everything else grabs dmix. Multiple sounds at once now work fine.

So I was happy, and everything worked fine. Until Skype. Skype didn't work, constantly complaining that it couldn't find either arts or esd - the Gnome & KDE sound mixers. Annoyed, I shrugged & installed esd. Then told everything to use esd, and once again I had working multiple sound, only via a different mixer.

And all was well, until Skype stopped working recently. Re-installing it, I found it didn't need esd at all. But it was all set up & working, so I left it.

Until today, when suddenly XMMS wasn't playing any sound. No erros, it thought it was playing. But it wasn't. So I switched it back to Alsa, and it played fine. Esd has just become more trouble than it's worth: I wipe it out, recompile mplayer without esd support, change Gaim's settings to use Alsa, and I'm back to square one.

Except the Sound Scope GKrellM plugin no longer works: I can't see my sound output on a graphical display.

*sob*

Fortunately, good old gentoo forums come to the rescue yet again: "amixer get Capture" shows all well, but "amixer get Mix" doesn't: capture is switched off. "amixer set Mix cap" fixes this, and suddenly, GKrellMSS is working.

Except the stereo monitor seems to think everything is only going out via one speaker: "Girls just want to have fun" has a great stereo bit at the start, and
GKrellMSS's twin monitors show a constant sound from just one speaker.

So that's still broken. But everything else works fine.

Perseverance is, I'm told, a wonderful trait. . .

The joys of shopping

There aren't any.

This was brought home to me yet again this morning, courtesy of my mother.

Having taken last week off entirely so that I could go shopping without all the weekend hordes doing their Xmas buying, you can imagine how thrilled I was by my mother's request that I go & buy myself a new shirt & trousers for her to give me for Xmas.

Humpf.

So we went to M&S where I'd seen a shirt I rather liked, but hadn't bought yet. Other M&S stores didn't have that one when I looked - only a darker one that wasn't quite so nice. When I went there yesterday, my local M&S didn't sell it any more either - only the dark one.

Butthe dark one was still an OK shirt, so I went to get it.

They'd sold out of it, too.

Spent a while pratting about with other shirts & trousers, which either looked awful or didn't fit, despite being the right size on the label.

Gave up & headed back to the car. On the way, we passed TK Max & Lou suggested we try there. Reluctantly, I agreed.

I don't much like TK Max - they have some hideous clothing & it's badly laid out. However, they have one redeeming quality that at least makes me willing to enter them: They arrange clothes not by brand, but by size.

This amazingly good idea I've encountered in only two or three shops, and it still baffles me why other shops don't use it. It's such a wonderful experience. It eliminates forever the chore of looking at every bloody item in the shop, deciding which ones you like enough to buy, and then finding that they don't have it in your size.

I'm sure you've had it happen numerous times: "Oh, that's a nice shirt that doesn't fit me." "I like these trousers that they haven't got in my size." "I'd buy two of these jackets if not for the fact that I can't even buy one."

Instead, you can simply go to the bit of the shop that holds all the clothes in the place that will fit you. And then you decide which ones you like, and you buy them. No frustrations at all: If it's in your section, you can buy it.

Wonderful! And yet, so rare!

So, I hunted down a shirt that I rather liked, because it wasn't blue (All my casual shirts are blue. Absolutely all of them. I'm sick of having to choose between a dozen different blue shirts) and some jeans that I liked because... well, they were jeans. What difference does it make, they're all blue denim tubes sewn together at one end.

So that was that sorted, and now I can give them to my mother tomorrow and act all surprised when I get given them for Christmas next month.

I hate shopping. Especially for clothes.

And especially when I have to do it at the weekend, a month away from Christmas, right after a whole week off when I could have gone shopping for the poxy things in peace!

Thursday, November 17, 2005

Sometimes, it's easiest to cheat

When it comes to learning Vi, anyway. . .

When I was trying to get my head round it, I went through vimtutor and made notes of the interesting & useful commands. The most useful ones, I saved. And here they are, for whoever wants them:

(The formatting doesn't preserve wonderfully, I'm afraid)
===============================================================================
VIM cheat sheet
===============================================================================

h, j, k, l - left, down, up, right
) - Beginning of next sentence
( - Beginning of current sentence
$ - end of line
^ - start of line

CTRL-E - Scroll down a line
CTRL-Y - Scroll up a line
CTRL-F - Page down
CTRL-B - Page up
CTRL-D - 1/2 page down
CTRL-U - 1/2 page up
CTRL-G - Show position
n Shift-G - Move to line n

/text - Search for text
n - Search for next instance of text
:set ic - ignore case
:set noic - stop ignoring case
% - Find matching ) > ] etc
:s/old/new - Change the next occurence of old to new
:%s/old/new/g - Replace all old with new
:n,ns/old/new/g - Replace all old with new from lines n to n

u - undo last commands
U - undo whole line
CTRL-R - undo the undo

r - replace current character
R - Overwrite text
x - delete current character

d - delete things
dw - delete word
dnw - delete n words
de - delete word but not space
d$ - delete to end of line
dd - delete line
dnd - delete n lines

p - put

i - insert text
o - Open line and enter insert mode
a - append text
A - append to end of line
:!command - execute external command
:r filename - read filename into current file

:w (name) - write (to file name)
:n,n w (name) - write lines n to n (to file name)
:q! - quit without prompting

mx - mark current position as x
`x - move to mark x
'x - Move to start of line containing mark x
:marks - list current marks

guw - Change current word to lower case
gUw - Change current word to upper case

yw - yank current word
v - visual mode (select)


I hope that helps any prospective Vi users. If not, run through vimtutor and make your own :P

Living in the past...

Have you been struck yet by the number of corporations that are supposed to be cutting-edge that are instead about a decade out of date in their thinking?

I mean, their whole DRM approach is laughable - they make life harder for the average customer, who wouldn't be trading MP3s in the first place, and ignore the fact that it only takes one pirate to put something on P2P and the whole world can get a DRM-free copy.

Somebody needs to sit the execs down and say "Look, imagine a P2P which can make ten copies an hour. (And that's a very conservative P2P speed) Now imagine one person breaks your DRM:

In one hour, there are ten copies
In two hours, there are a hundred
In three, a thousand
Four hours, 10,000
Five hours, 100,000
Six hours, a million
And in only ten hours, you've now got more copies than people living on the planet. That's why even a DRM scheme that stops 99.999% of copiers will not do any good. P2P makes numbers irrelevant, find a better solution!"

Something like that might possibly make it into their heads. Baby steps.

But then you see the whole Printers & Game Console thing. And you just sigh.

Here's the wonderful bit of logic they used here: "We have one product, that is very hard to duplicate at a lower cost than we could supply it at. We have subsidiary products for it (ink & games) that can be replicated very cheaply, in fact virtually free.

So, where should we try and make our money? The easy-to-rip-off product, or the hard-to-rip-off product?"

And then they go and sell their printers & consoles at LESS than they cost, and sell the ink & games at ludicrous prices. And then people supply ink & games at pennies, and so they come up with all sorts of schemes to make it hard to supply ink & software.

FFS! How dumb do you have to be?

They could supply games at $1 each and still make a profit on them. Same goes for ink fills. Instead, they supply stuff that's easy to rip-off at hugely inflated prices to cover the cost of the stuff that's hard to rip-off sold at a loss, and then they complain that people are under-selling them.

And then you get such utter stupidity as the DMCA being used to prevent ink cartidge refills, and people downgrading their PSP firmware so they can install homebrew games, and Howto guides on taking an Xbox apart for modding without damaging it.

What is WRONG with these people? Is it so hard for them to understand that the world has changed, and the old tactics won't work any more? They're supposed to be the ones who understand this better than anybody!

Plus, if they worked out just how their futile efforts were causing so much resentment, they might realize just how pointless it is for them to keep trying to get people to switch away from Linux, BSD, GNU, and all the other Free initiatives by pointing out how hard to use they are.

Who cares? I'm sitting on a computer whose OS has been designed 100% to maximize what I can do with it, not to maximise what I can't do because corporations make more money that way.

Tuesday, November 15, 2005

Another screenshot

Yes, I know, I did a post on screenshots just days ago.

Well, here's one more. It's my login screen, for any curious individuals:



It's done with the XDM login manager, none of this messing about with the "more functional" GDM or KDM - both of which are nowhere near as far ahead of XDM as they'd like to think!

Courtesy of XDM, I can see what my PC is up to in regards to CPU, disk, and network usage (I'm paranoid); get updates via portage; and reboot or shutdown at will, without any sudo or root logins.

Monday, November 14, 2005

Xmas shopping begins

And man, am I glad I was wearing my new shoes! After hours of trudging around the Bluewater shopping mall, I usually expect my feet to be killing. Instead, there was barely a twinge. I'm impressed.

Just as well, as my shopping success was. . . underwhelming. My mother is now completely sorted out. That just leaves my father & gf and my sister-in-law.

Ho-hum.

We collected my parent's dog on the way back - they're in France overnight, so we're dog-sitting. He's a bit subdued - he was recently diagnosed with throat cancer, and has just had his first blast of chemotherapy, plus his throat is still sore from where they hacked a large lump of it out, plus he's never too happy about being away from home, altho he does quite like out flat in many ways - it's small & cosy, and he's a clingy sort of a dog. Which can be awkward, given that he's an alsatian-collie cross, and so very large.

I saw something in Bluewater that I must add to my Xmas list now, as well (People are always asking me what I want ofr Christmas, so I've gotten into the habit of putting a list online) - there's a Python Cookbook from O'Reilly that looks pretty good.

I've made a start on getting into my Python book again, by the way - I'm several chapters in, and have two pages of notes so far. With any luck, I'll get a good bit further in during my week off.

Sunday, November 13, 2005

Fighting the Shoe Event Horizon

I've been needing some new shoes for a while now. In town yesterday, our route took us to the cycle shop, which took us past the running shop I bought my jogging trainers in. We figured that, tho they're a running shop, they might have something suitable for general walking as well, so in we went.

If you really want running shoes designed for serious runners, you should of course disdain utterly the high-street 'sports' shops and the Nike and Reebok style of trainer. These are fashion items, not sport equipment - kinda like an iPod is never going to replace an audiophile's roomful of hifi equipment, no matter how cool & fashionable it may be.

The diference is apparent from the moment you enter the store - somebody trying to sell you Nikes will ask your shoe size, hand you the requested items, tell you they look great & are really popular, and sell you whatever is comfy enough to part you with the ripoff price.

However, in the running shop, they want you to take off your shoes & socks so they can examine your feet, the way you stand, how you walk, and so on. Then they point you at the 3-4 types of shoe they sell that are appropriate for you, taking into account your foot's shape, your posture, how you spread the load over your soles, and so forth.

Then they make you try it on in multiple sizes, which they (unlike any other high street store) have in half- as well as whole-size numbers. My jogging shoes, for instance, are 10.5s, whereas I generally wear 11s for other footwear.

So I bought some jogging shoes there a while back, since when I've had absolute zero issues with knee pain. So I had a fair amount of faith in their being able to supply me with some shoes that are better than my current ones, which in fact cause me such problems that I can't wear them any more.

I can feel you thinking "This seems a lot of effort to get some comfy shoes. And how can ordinary walking shoes cause problems, anyway? Isn't he just wasting time & money on gimmicks?"

And the answer is, no.

This time last year, I was quite literally half-crippled from RSI. To the point I was close to quitting my job because I was spending 8 hours a day in agony, despite wrist supports, painkillers and an ergonomic chair. Today, I'm so much better that I can keep a blog without pause for thought.

The difference? A book I was referred to by an offchance comment ("I'm a physiotherapist, and it was a revelation to me!" is a high commendation in my book). I bought it for Lou, who has had severe shoulder pain for over a decade - I used to spend 15 minutes massaging it before it had relaxed enough to actually move under my fingers.

She started the excercises, and was nearly bedridden for a day - the rock-hard muscle that had been unremittingly tense for years letting go suddenly relaxed her entire body so much she could barely move. She advised me to try it myself, and the following Saturday, I started the excercises it advised for wrist RSI.

On the following Monday, I went to work and threw my wrist supports in the drawer. I've never used them since. I get an occasional twinge now & then, but chronic pain is a thing of the past. The reason? My posture was very bad, and leading to RSI. It's still not completely fixed, but it's getting there.

And (to return to my point) your entire posture affects, and is affected by, your feet. If your feet are badly placed, everything above them is thrown out of alignment to compensate.

Put shoes that don't offer the right support on the feet of somebody whose posture was so badly aligned it nearly disabled him, and trust me, he'll notice the problems PDQ. My old shoes were giving me headaches and serious foot pain. The only shoes that didn't were my jogging shoes. But they're very thin & lightweight, not what you want for cold, wet, muddy winter days. I wanted something more sturdy & protective. And comfortable.

So in to the shop we went & explained this. No need for all the foot- and posture-studiying this time, he took a glance at my jogging shoes and knew exactly what feet they would fit, so that saved a bit of time. They only had two shoes that fitted me that were of a winter type, so I tried those. First the blue in size 11 (my usual size), but they were too large.

So he got out the blue in 10.5 (my trainer size), but they were a tad too large still, and too lightweight for my taste

So I tried on the brown, which were more sturdy but only in a size 10, and they fit great. So I bought them.

The HHGttG states that there's a problem with shoeshops: As you get more of them, you need people to buy more shoes to support them. So shoes are made more fashionable & less sturdy so buyers need to replace them more. And the more they buy, the shoddier they become, so the more shoeshops are needed - a vicious cycle, that lasts until the Shoe Event Horizon is passed, and it's economically impossible to be anything other than a shoeshop.

I bought some brown shoes that are very good quality and utterly unfashionable, so I like to think I've done my bit to stave it off ;o)

Wikipedia? ME??

Browsing thru my access stats the last couple days, I've noticed a few people coming to LNW via Wikipedia. To be precise, via the page that tells you what a GUI is. Where I find that it's listed as a reference.

WTF?

Okay, there's a small amount of GUI consideration here and there in the article. But enough to be a link on a GUI definition? Not hardly - if I were a Wikipedia edity person, I'd remove the link to my page myself! I genuinely can't see the connection. . .

In unrelated news, my feet are apparently shrinking over time. More on this shortly. . .

Friday, November 11, 2005

Remembrance day

I rather liked this.

View in quicktime or WMV

Nostalgia & Barney the purple dinosaur

I've mentioned that writing is a hobby of mine. And you may have seen the link to writing.com over on the right.

Well, I was reminded of one of the stories I wrote a while back, and I thought it would bear a republish.

It was one of the many entries I made in the "Stake and Garlic" contest - a monthly vampire-story-writing competition. The prompt for this particular month was "Write a nonfiction article, essay, or list that posits evidence suggesting a famous person or well known character from a movie or book is a vampire."

My nominated celebrity was Barney, the Purple Dinosaur. Read on for why ;o)

I know, he seems an unlikely candidate. But that's the very thing that makes it likely! Vampires are hidden creatures, they don't walk around in evening dress with their hair swept back in a widows peak; they don't have a Transylvanian accent; they don't write their name backwards and expect it to go un-noticed; and they don't work for blood banks or hematology clinics. They do their utmost to be the last person you would ever suspect. So the first rule is, don't suspect anyone who is an obvious vampire.

Barney seems totally non-Vampiric, and therefore is a prime suspect.

However, there are still certain signs that point towards the fact. The thing you have to remember is, they're non-obvious signs. Vampires are clever creatures, they don't broadcast what they are. But they make decisions a certain way, and that way of thinking can be spotted.

For instance, Barney the Blood-Red Dinosaur would be an obvious clue. Barney is not red, because a Vampire easily spots such an obvious clue. Barney is Purple. And purple is a very popular colour amongst the "creatures of the night", whether they be Vampire or just Goth. Barney the Black Velvet Dinosaur would have been another giveaway, of course, so he settled on a gothic colour that isn't quite so commonly associated with Vampires, and can be considered cheerful in the right shade.

So that's the Purple - what about the "Dinosaur"?

The whole attraction of dinosaurs is that they were big, scary animals with spikes and fangs and so forth. The most popular dinosaur is the Tyrannosaurus Rex, whose distinguishing feature is an enormously large mouth with an impressive array of fangs. Why would anyone make a cute kids character from an animal kids like for being non-cute?

Answer: They wouldn't. Not if they were human. A vampire, on the other hand...

You see, Barney is NOT a dinosaur. That's just a cover. He's actually a Dragon! There are enough superficial similarities between dinosaurs (which are large reptiles) and dragons (which are large reptiles) that Barney can get away with it, but "What's in a name?". He might CALL himself a dinosaur, but he is actually a dragon.

Is this significant? Well, yes. It's not known to the population at large, but Vampires and Dragons are connected at many levels. A quick search on Google for "vampire dragon" will show you that: "Dragon" was once a name given to demons in general, and the devil as well. Vampires, being by definition evil spirits, are firmly connected with the Draconic tradition.

So that's the appearance of the character explained for you. His colour and nature are subtle, hidden clues to his bloodsucking nature.

But what about the man inside the suit?

Well, that's a difficult one, isn't it? Have you ever seen him? No. Of course not. You can recognise a vampire for what he is if you see him. Why do you think he designed a character that wears a suit? It hides him from two things - prying eyes of humans, and sunlight.

Of course, sunlight - Barney isn't a nocturnal dinosaur. He comes out in daylight. But when the vampire comes out in the sun, he's perfectly safe, because he's protected by the large, opaque suit that is Barney. How terribly convenient.

Almost as convenient is the way Barney always stays "non-controversial" - no politics, no world events, and NO RELIGION. When have you ever seen a crucifix on Barney's show? Has he ever been splashed in Holy Water?

No.

Now we move onto the important thing: Drinking blood.

Obviously, nobody has ever seen Barney leap on one of the children around him and messily devour them. That, after all, would be bad for ratings.

But vampires don't actually need blood. Blood is just salt water with little bags of red protein floating in it. What a vampire needs is life-force, the energy generated by living things. And he doesn't need to drink blood to get it - a touch, or even line of sight is sufficient. If you can see a vampire, he can drain the life out of you.

And that is why so many vampires work on television these days. All they need to do is appear on-camera, and they can drink from millions of viewers all over the world. Television was a huge boon to vampires. If you've ever watched Barney for any length of time, you may have noticed how mind-numbing it was. That's not just because of the insipid nature of the show, it's because Barney was draining you of life as you watched!

But worse still is the insidious cultural conditioning Barney poisons children's minds with.

Two attitudes Barney promotes specifically mark him as being vampiric.

Firstly, there's his discouraging of individuality. He tries to convince kids not to stand out, to be like all the other kids - to not think for themselves, but do things because everybody else does them. This is not because he wants children to try and fit in to society. It's a promotion of the vampire attitude that humans are nothing cattle - Vampires promote a herd mentality in humans at all opportunities; it's easier for them to deal with a flock of sheep than to have multiple independent humans to contend with.

And then there's his encouragement of suppressing negative emotions. "You've fallen and hurt yourself? Don't cry - be happy!" kind of thing. Not only do all psychiatrists recommend expressing emotions as being healthier than repressing them, it defies belief that you should happy about something bad happening.

Unless you're a vampire! Then it makes perfect sense - "Don't be sad when unpleasant things happen to you" is simply a way of saying "Being bitten by a vampire should make you happy" - once again demonstrating the promotion of a slave-mentality.

I entered this essay in the contest purely as a bit of fun. I actually won the contest with the more serious contender of Sherlock Holmes. But I still feel more proud of the Barney entry, somehow ;o)

Some updates

Firstly, my cold is mildly better - I'm still snotty, coughing, and feeling bleah, but at long last, I can make my ears pop. It requires silly facial contortions every time I blow my nose, but it's a small price to pay.

Secondly, I've taken the hint and made my titles clickable - this seems to be what people prefer.

Thirdly, expect a change in the number of posts for the next week - I've taken the week off to do some Xmas shopping and just to use up some of my enormous backlog of unused holidays (Jealous yet? ;o) That could mean I'll be home bored & posting furiously, or home having fun & barely posting at all, I just don't know yet.

Fourthly, there is no fourth point

Thursday, November 10, 2005

My desktop

A post on LQ calls for screenshots of desktops. Since I've got some uploaded anyway, here's some info about it. It's FVWM2.5, running on Xorg with Gentoo's patches, by the way.

Default screen opens up to look like this (click for full-sized image)


No idea where the Supergirl pic came from, I found it years ago & liked it. I added the sun to the image, but other than that it's not my own work. The border is both a nod to the original FVWM config (steelblue), and an easy way to make apps blend in. There's no taskbar, desktop icons, or other such paraphernalia. What there is, clockwise from top right:

  • A torsmo app - purely because I like the network summary.
  • A GKrellM - for all the other system monitoring. Uses the same fonts & colors as torsmo for a unified appearance. In order, it shows:
    • CPU usage
    • CPU temperature
    • Motherboard temperature
    • Disk usage
    • Network activity
    • Memory usage
    • Swap partition usage
    • Mountable media status (with mount/unmount/eject controls for each)
    • System partition status
    • Sound output
    • XMMS current song display & controls - looks like I was listening to Jewel!
  • FVWM buttons module, which has swallowed within it:
    • FVWM pager - shows my four virtual screens & the windows within each of them. Apparently, I had Firefox running on the next screen at the time of this shot
    • An Xterm - I'm a heavy CLI user, but it's not always worth the bother of starting up a new Xterm just for one quick command
    • An Xclock - for reasons unknown, it refuses utterly to be any color other than black.

That about summarises what I see at startup. Everything else is run from either the main menu, called via the left Windows-logo key or a left-click on the desktop; or from an Xterm, if there's no menu entry.

Next up, here's a few open windows & menus:


The inactive windows have a greyed-out titlebar. The currently-active window (Gaim) has a rainbow effect and coloured buttons.

The buttons, in order:

  • Tux - opens a menu that moves or resizes the window. Movements include to a different screen; sizes include default Xterm & 1024x768 sizes
  • Blue - toggles window to & from fullscreen
  • Green - minimizes window
  • Amber - closes window
  • Red - nukes window (killing all related processes as well)

The main menu shows my icon theme (marbles, obtained from kde-look.org), along with my distro's logo (Gentoo), and a continuation of the rainbow theme, in what I like to think is a tastefully subtle way :o)

The sub-menu, in this case the Media menu, shows what all my other menus look like - plain translucent white, with Tux in the bottom corner. All the FVWM fonts are Bitstream.

You can see that the CPU is working hard at this point, due to the two Xscreensaver hacks I've started from the Xterm - a new graphics card to replace my laughable MX400 would probably help here ;o)

You can also see that I've added a carriage-return to my bash prompt, so I get a blank line between each command - I find this invaluable in making an extended CLI use more readable.

One thing I can't show from here are all the special keyboard controls I've added, but you can read my web page about them if the subject interests you. You can also take a look at the config files should you desire.

Any questions or feedback can be left as a comment, of course!

First cold

Six years ago, when I started working in this place, I caught a cold. Followed closely by a cold, which was succeeded by a cold. I then came down with a cold.

After an unbroken six-month run of colds, my immune system was at such a low ebb I was hit with impetigo as well, an infection that produced ugly scabs on the backs of my hands that looked for all the world like somebody had stubbed out a cigarette on them.

After that, my immune system finally caught back up again. Following which, my immune system has been so hardened against colds I've barely been troubled with them in six years. I did have one about a year ago, but it was a mild irritation to me, whereas it laid up my gf in bed for a day or two.

This week, however, I've finally succumbed. It's not really a cold so much as a cough, which is probably how it got through. But man, is it getting on my nerves.

The coughing I can cope with. The sore throat is an irritation, but treatable. The runny nose I barely notice.

But my left ear. . . There's a pressure bubble in it that just will not pop. And I'm a scuba diver - we know a thing or two about equalizing ear pressure!

I'm not even bunged up, that's the silly thing - why are my ears blocked up when my nose & sinuses aren't? It's bloody daft! And it's been sitting there for two solid days.

Bloody viruses. . .

Wednesday, November 09, 2005

Would my readers do me a favour?

I've made a few changes to my template. It's introduced a niggle: Font size is inconsistent.

I've had the same issue before with FF, where it treated .php files differently to .htm. So I'm not sure if it's just me, or what.

So could I ask you, if you're reading this post, to compare the font in this post on my main page, to this version of it in the Novemember archive, and leave a comment telling me if the fonts match or are different?

Much obliged!

Google competes with MS?

A poster on Slashdot asks states that he doesn't believe Google, a search engine, threatens MS, an OS & desktop supplier, in any way, and doesn't believe MS are really worried about google.


I disagree.

Google don't seem to compete with Microsoft, in the same way as Netscape didn't - MS didn't have their own browser in Netscape's day, after all. MS still acted swiftly to destroy them utterly.

Google, like Netscape, are cross-platform, free, and significantly reduce the impact of what OS you run and what software you have installed. And MS are fanatical about protecting their OS from any such reductions, however indirect.

Not so many years ago, if I wanted to play a computer game, it had to be installed on my PC. If I wanted to plan a route to drive from A to B, I had to use software installed on my PC. Look at pictures?Software installed on my PC. Send & receive email? Software installed on my PC.

Today, I can do it all via Google - search for online game sites, Google Maps, Gmail. . . Instead of having to buy & install software, software that only ran on Windows, software that had cost me money and wouldn't work on any other OS. I can do it free with Google, and I can do it from Linux just as easily as from Windows.

Google might not provide an office suite online yet, but it's easy to forget just how many things you can do via a browser today that used to need locally-installed software to accomplish. And all that software I didn't have to buy & install is software that's no longer chaining me to Windows. It's one less reason to rely on Microsoft, and that scares them.

And more fundamentally, every cent that Google make is a cent that M$ aren't, as far as their world view goes. That's Microsoft's potential revenue being generated by Adsense - MS have a search engine, MS do ads, and yet cusomers still go to Google. I'd be willing to bet that there are a lot of exec's in MS who consider every penny earned by Google as a penny lost by MS.

Watery problems

It's cold this morning. As usual, all the windows in our flat were so heavy with condensation there were small puddles on the windowsill.

We get a lot of suffer from a lot of condensation, but we suffer a lot less than some of our fellow flat-dwellers. This is because most people go about getting rid of condensation the wrong way. So I thought I'd explain the right way here.

Firstly, the typical (and wrong) way of dealing with the situation: It gets colder in the winter, so we turn on the heating. But windows and some other surfaces tend to stay cold, and they get lots of water condensing onto them. To get rid of it, people turn up the heat, or point hot-air blowers at the windows, or whatever, to make the water evaporate away. And because they've spent a lot of time & money on heating the place up, they naturally keep doors &windows closed to keep all the warm air in.

The problem with this approach in that it involves keeping the air in the house, and keeping the water in the air. It will never eliminate the water that's causing the condensation issue.

The logical flaw is, of course, in equating evaporation with elimination: If water isn't solid or liquid, then it seems not to exist. But of course, evaporating water doesn't get rid of it, it just moves it temporarily into the air.

But the next time that humid, water-laden air meets a cold surface, the water condenses straight back out of the air, and the problem is returned.

We can't do much about water vapour. We need to grab our water while it's liquid. Never try and evaporate unwanted water, it'll just come back again. Learn instead to be glad to see liquid water: It's the only time you can grab it & throw it out, breaking the vicious cycle.

The easiest elimination is on windows that open - just grab a squeegee and scrape the water down the window to fall to the ground outside (check nobody's under it first). Other windows tend to need absorbent cloths.

The bathroom tends to be another place to get rid of water from: Showers spray water over the walls, shower curtains, and the like. The bathroom mirror may get fogged up. All of this water should be removed: Shake the curtain, squeegee the tiles, etc. Even though most of this water is scattered spray rather than condensation, it'll only evaporate and become condensation if you don't get it down the plughole first.

None of this will stop condensation happening: We add water all the time, from baths & showers, cooking, and even breathing. But by removing water from the system instead of simply moving it about, it can be drastically reduced. Our bedroom window tends to be saturated most mornings in winter, but our neighbours can have permanently wet curtains in their living room because their French windows are perpetually sopping wet.

Tuesday, November 08, 2005

More on boosting blog traffic

Courtesy of another link from the creative hedgehog blog, just a couple of comments on the HOW TO: Boost Your Blog Traffic post.

Won't be nearly as exhaustive as the earlier one, as I mostly agree with it. Just a couple of points:

Most web users are instantly turned off by tacky site designs or extreme neon colors

Ahh, how well I remember my first ever web page. . . it had a rippled-blue background, yellow text, vast numbers of cartoon images (Largely Calvin & Hobbes, IIRC), red balls alongside each link. . .

And when Netscape 2.0 came out in Beta! Wow, what a time that was. The exhilaration of putting animated gifs on the page, and having a scrolling Java message at the bottom of your browser. All-singing, all-dancing, and ye Gods did it make your eyes water when you tried to read anything.

Over time, my various pages evolved into much simpler formats, until they've arrived at today's plain black & white with the odd graphic.

Take this piece of advice to heart: Just because you can use some funky new feature/graphic/whatever, doesn't mean you should.

If you post guides or reviews on your blog that you think many people can benefit or learn from, I suggest posting a link on del.icio.us or Digg. If your page gets on the frontpage of Digg or on del.icio.us popular, you're set.

You know, I'd never heard of digg.com until last month. del.icio.us I knew, but not as something I was really interested in. I still don't actually visit either site as a regular - doesn't interest me, somehow.

However, last month, my Linux != Windows page was posted on digg.com, and it went to the front page. Following which, it also made it into del.icio.us/popular. If you wonder what sort of difference it really makes, having your page/blog reach such heady levels of success this graph may well answer you:



October was indeed a busy month - over ninety-two thousand hits from over fifteen thousand unique visitors. Quite a leap from September's 14,000 hits from 1700 visitors, eh?

Just some food for thought. . .

There & back again

I use Portable Firefox at work - runs off a USB2.0 HD. I noticed that a new version was available - the Deer Park 1.5


So obviously, I had to have a go. . .

Downloaded it, ran it. As expected, some of my extensions didn't work:

So, turned it off and went back to 1.0.7. I can cope without many extensions at a pinch, but mouse gestures is where I draw the line. If I can't use right-click&scroll-down to navigate back through my history list, I don't want to know.

Hey ho. I never was a great one for cutting edge stuff. I'll wait till 1.5 is widespread enough for the extensions to work. Firefox without extensions is like. . . like. . .

Well, like Interet Explorer, basically! :o)

The cheque's in the post

They say it's one of the classic lies. The second one is "We're from the government, and we're here to help you." I forget the third.

But hey, it's always nice to be told that there is a cheque in the post, especially when it's totally unexpected cheque.

I just got a letter in the internal mail here at work. Because I've been working here five years (Six actually, but as an external contractor to start with) I get a reward: A ÂŁ100 bonus in this month's paycheck, and an extra day's holiday a year from now on. If you're American, you might not want to read the next paragraph.

That means I now get 26 days holiday per year, plus up to 12 more days off each year if I earn them via flextime, plus all the bank holidays and I'm carrying 3 days over from this year's holiday allotment as well, so I could theoretically take more than 40 days off next year. Plus sick days if I get desperate ;o)

So my long-standing prejudice has been shown to be false at last: Just occasionally, it is worth reading the internal mail :o)

Monday, November 07, 2005

Linking to this blog

You should always make it as easy as possible for people to link to you (if you want to be linked to, anyway)

Obviously, if they just want text, they can just C&P the URL. But if they want something more colorful, it's nice to have a quick & simple alternative.

So, if you want to link to this blog, here's a bit of code to C&P for a graphical link:

<A HREF="http://linux.oneandoneis2.org/blog">
<IMG border=0 SRC="http://www.oneandoneis2.org/blogger.ico">
<IMG border=0 SRC="http://www.oneandoneis2.org/minicon.png">OneAndOneIs2</A>

It'll look like this on your web page:
OneAndOneIs2

Of course, it's only a suggestion: You can link however you like. But if you want a small & colorful link specific to this site, then I think this should do! :o)

Sucessful blogging

Well, since numerous other bloggers have commented on the blog-hints article, I figured I might as well join the trend. . .

Blogs can be a very marketable and very profitable tool if used correctly.

If I wanted to make money from writing, I'd be a journalist or author. A large amount of the point of most blogs is that they aren't written for the money. That's a large part of the point. If you worry about making money, you stop saying what you really think.

Profiting from blogs is just a matter of grabbing the attention of an audience and not doing any actual salesmen selling. In this article you will learn the 13 most essential steps to successful blogging.

Successful profitable blogging, maybe. But that's not what most blogs are for.

1) Where to start?

You should begin your blog with a free blog hosting service such as Journal Home.

Well. . . insofar as there's not much point in paying for something that you can get free, that's true. And it's a truism that "nothing dispels enthusiasm like a small admission fee." Fair enough, can't argue with this one. Unless there's a non-free host that offers you a feature you need or want. Or if you're enough of a geek to already have a website with unlimited subdomains. . . *ahem*

2) Niche

A niche is a targeted product, service, or topic. You should first decide on a product, service, or topic which interest you. Choose an area which you can enthusiastically write about on a daily basis.

Hmmm... a qualified agreement. I wrote a blog about my daily life a while ago, it wasn't much fun and I gave up after a while. In particular, it felt like I couldn't really spend much time on geeky Linux stuff on what was an otherwise non-geeky blog. Having a blog that's got Linux built into the URL makes it much easier - you don't like geeky stuff? Then you shouldn't have clicked the link, should you? :oP

But on the other hand, a blog is for writing whatever you feel like. Software, politics, or just the weather. That's a large part of the point.

So I'd say that it's more a case of "Decide on & make clear your biases". Don't feel constrained to stick to one subject, but do make it clear that "This is a blog devoted to. . . " - it stops you and/or your audience feeling that an article on a certain topic is a waste of time.

3) Update Daily (nothing less)

This step is a must and not a suggestion.

Completely disagree here, I'm afraid. Update as often as you have something to say. No more, no less. If you post when you've nothing to say, the blog becomes a chore and your quality takes a dive. When you're sitting at your keyboard and you have something to say, say it. When you have nothing to say, say it.

4) Traffic

It's no secret. You must have traffic to profit from blogs.

That's true, but see the start.

However, there's much more satisfaction in writing when you know people are reading. I've generally used the strategy of writing an article which I hope is a worthwhile read on a subject, and linking to it on forums & such when it's relevant. That gets people visiting, and also thinking of your pages as a place where useful & informative content is available. And that gets you word-of-mouth. And it also gets your search engine ranking higher.

Paid advertising is anathema to an unpaid blogging service.

5) Track Your Blog

How do you know if your blog has traffic?

I'll go along with this - I've always tracked all my web pages. It's interesting to see who's linking to you, and why - if somebody posts your link with "This is worth reading" or with "Get a load of this garbage", it can tell you a lot about the impact your writing is making. Not everybody will send you an email or leave a comment.

6) Listen to Your Audience

When using the proper page counter you should begin to see how others are finding your blog and if through search engines then which keywords are being used to find your blog. If constantly your blog is being found by 1 or more keywords then focus your blog around those keywords to make it even more powerful. When writing entry titles and entries use the keywords as often as possible while keeping the blog legible and interesting.

Nope, disagree here. A quicker way to have a monotonous and boring blog, I can't imagine. The two most popular web pages I ever wrote were a "linux vs. windows" on my linux site, and a "reasons why this is a lousy bit of dive gear" on my scuba site. Both are fine in their place, but constantly slagging something off will get old very fast. Variety is the spice of life.

7) Multiple blogs

Use multiple blogging accounts (free) to attract more people.

Hmm... mixed here. I do actually have another blog, it's actually entirely for my own use but online if anybody wants to read it. It's a record of my experiences in learning meditation. I'd say this depends on your biases (#2) - if you have wild differences, such as computing and meditating, then by all means split them so you don't bore geeks with meditation techniques or meditators with source code. But other than that, a blog is not a monologue.

In fact, maybe I'll create a new word (if somebody didn't think of it already): monoblog, noun; a blog devoted to only one specific topic. Synonym: yawn

;o)

8) Short & Concise

Aside from the lengthy article a week for syndication and publication your blog entries should be short & concise (if you can help it).

My bias has always been concise writing. I have to battle against it when writing fiction, as "The good guy fought the bad guy and won" doesn't make for much of a story ;o)

Concise or verbose, it depends on the subject. Sometime you need exhaustive detail. I'd say it's more a case of being aware of what you're writing, and make sure it's appropriate to the subject.

9) Digital Art

Try to include non-advertising graphics, pictures, photos, and art in your blog entries.

Why? Would an article about Linux really be embellished by adding superflous Tux images?

Include graphics when it enhances the article you're writing, certainly. I did that with, for instance, my post on the GP2X - a picture is worth a thousand words, and it made the description a lot clearer. But putting in pictures for the sake of it? That's a direct contradiction of his own point #8 to me

10) Keep it Personal

A blog is most successful when it is kept personal. Try to include personal experiences which relates to the topic of your blog entry.

Yeah. . . I wouldn't really rate it as hugely important, but it's not bad advice. Unless you're aiming at a professional-appearing blog, don't write like a journalist. Write as yourself. With the rider that that shouldn't mean writing "Hey guyz & girlz, did u have a w/end as bad as like I did?" - keep the slang & l33tspeak to IRC, a blog is a place where you should be concerned about spelling & grammar. Absence of either makes your writing as hard to read AS PUTTING THE WHOLE THING IN CAPITALS.

11) Interact With Your Visitors

You now have the traffic you deserve. You should begin interacting with your visitors. Create a regular theme such as: "Monday Money Tip" or "Picture of the Week" which entices your readers to look forward to each week.

The heading I can agree with. But the following paragraph. . . If I'm writing a blog, I expect my readers to look forward to my posts. I they don't, no number of "regular themes" is going to help, my blog is a failure.

Try your best to find exclusive information that not many have.

I suppose that can be construed to cover things like "Write a howto guide for Linux" once you've figured out an annoying problem, so I'll give him that.

12) Make Money

See the start. . .

By all means, shove in some ads - I did. But doing it with expectations of making a good profit? No. I don't advise it. Very few bloggers get that level of success. Heck, first thing I did on inserting google ads was explain how to block them if they annoyed you. . .

Apart from anything else, it can cut down on your ability to link to yourself. I've linked to some of my pages from LinuxQuestions, for instance, because they have content I feel is relevant. If I were making money from ads on those pages, I'd quickly go from being tagged "Bloke who posts informative links" to "Bloke who spams us with links to make money" - fair or unfair, it would happen, and that wouldn't be a good thing.

13) You're a Professional

Thanks, but when it comes to blogging, I'd like to stay an amateur. . .

Such simple things. . . (pt. 2)

I don't use a generic kernel. As part of getting LFS installed a while back, I worked out a kernel config for my specific needs. A custom kernel is much more efficient & speedy, so it's obviously a good thing to have if you can.

I was using a 2.6.11 kernel, it booted fine. But a 2.6.13 built from the same config didn't want to know - "unable to mount root filesystem" was all it would say.

But it's an EXT3 filesystem! There's no better-established filesystem in the entire *nix world! You MUST be able to mount it! I told it in despair. But no, it refused.

Getting a bit desperate, I wondered if the config itself had gotten fouled up, rather than the new kernel itself having a problem. So I tried compiling a new 2.6.11 kernel with the same config. And it failed in exactly the same way.

So, some progress made: The kernel sources are fine, it's my configuration that's broken. Time to troubleshoot, I reboot off my old, working kernel.

Or what HAD been a working kernel. And technically, it still was. The kernel booted fine. But none of the modules (except Nvidia) worked. Argh!

Fortunately, most of my kernel isn't modular. Only sound and lm_sensors. The Nvidia module was OK, and my network card is compiled in directly. So I could still use Firefox & Google to look for solutions.

Didn't find any.

I went back through my config with a fine tooth comb. But I still saw nothing wrong: Filesystem support was there, NVIDIA and Athlon support built in everywhere. What on Earth was the problem??

I gave up. I'd run out of ideas, and I'd been problem-solving for hours. I stuck a post on the Gentoo forum detailing the problems, and asking for help.

First post in reply came in about 20mins later. The error message was deceptive: It couldn't mount the filesystem because it couldn't talk to the disk. There was a hard-drive chipset support option that was no longer working, it appeared.

Fired with new enthusiasm, I went and looked at the SCSI and ATA sections (SATA is treated as SCSI). And there it was! Support for SATA in the ATA section was deprecated: I would need specific SATA support for my chipset in the SCSI section instead.

The MoBo manual stated I was reliant on Silicon Image for my SATA drives. So I checked the appropriate box, recompiled, and rebooted into 2.6.13 again.

And suddenly, everything worked. The root filesystem mounted, the modules loaded, sound & sensors are suddenly not returning nothing but errors. My custom config lived again!

In celebration, I restored my login prompt's clear-screen switch (which I had disabled to be able to see error messages earlier) and added the purple ASCII Gentoo logo I'd spotted whilst making the change.

After hours of trying, I had eliminated two minor problems. In both cases, I had actually broken the thing I was trying to fix, but in both cases I was still able to get a working system. And in both cases, as soon as I'd identified the problem, it was a literal 10-second fix.

Like so much in Linux, it's so simple, when you know how. . .

Such simple things. . .(pt. 1)

This was a lazy weekend, with nothing to do other than mooch around at home. So Lou got on with getting FreeBSD doing what she wanted, and so I wound up spending a while on my PC as well.

There were a few minor niggles that had been bugging me for a few weeks. Nothing major, just tiny little things that could easily be ignored. While I was on my computer anyway, I thought, I'd fix these slight issues. Should be easy enough, right?

The two issues were partially related: I couldn't get a new version of the kernel to boot, because it said I was passing an invalid root option; and I couldn't make any changes to my Grub configuration, which is where the root option is specified.

So, start with Grub. Grub was fouled up in a complex way. A while ago, I installed a SATA disk to replace my IDE HD. SATA is faster, you see. That left me with a new, unused hard drive, so I figured I'd install BSD on it for a play around.

Somewhere in the madness of adding disks & OSes, Grub got fouled up. And fouled up badly: It wouldn't give me a command prompt, it wouldn't let me repair it from a rescue CD, it just sat and error-messaged me. In the end, I wound up installing a new Linux from an install disk I had lurking, just so it would install a working Grub.

Having had such a nightmare, I determined to make sure it never happened again. I copied all my /boot files over from the SATA disk to the IDE, and installed Grub to the IDE MBR. This way, if my SATA Grub got fouled up, I'd still be able to use the IDE Grub, and vice-versa.

The problem was, when I tried to edit Grub's config on SATA, none of the changes worked. I had a suspicion that the IDE Grub was actually the one booting, instead of the SATA one. So I rebooted, went into the BIOS, and sure enough, it was set to boot HDD0 - the IDE disk.

Now, I wasn't sure if the SATA disk qualified as HDD2 or SCSI1, so I tried all the options one after another. HDD1 gave me FreeBSD's boot loader, so it was obviously my second IDE drive. HDD2 gave me HDD0's bootup. SCSI gave me a grub command prompt, but no menu.

Odd. I checked the grub config, and it was fine. But then I found that, although Grub referred to the SATA disk as hd2 from Linux or when booting from HDD0, it thought it was hd0 when booted off SATA. Obviously it was confused about disk numbers, and hence wouldn't load a config file.

So I copied SATA /boot to IDE /boot, set IDE /boot to mount in /etc/fstab, and rebooted off IDE. Grub no longer gave me a menu, just a command prompt.

Nghhhhh...

A bit more experimenting only made things worse: Mounting the IDE /boot in Grub and telling it to load the config file worked perfectly. The config file therefore MUST be valid. Why wouldn't it load it automatically??

Eventually, I found the problem. It was caused by Grub trying to be clever about /boot

You see, if you have /boot as just a directory in your root partition, then when mounted, grub's files live in /boot/grub. But if you have a /boot partition, then mounting the /boot partition will put grub's files in just /grub

This means that, any time you run setup from Grub, it looks for both /boot/grub and /grub. This guarantees an error message for one or the other, and nobody likes to see errors. I got around this by symlinking /boot/grub to /boot/boot/grub, so it would find its files in both locations.

But at some point, it seems to have over-written the symlinked /boot/boot with an actual directory. And /boot/boot/grub didn't have my grub.conf file - hence its refusal to load the config by itself.

I wiped /boot/boot, and rebooted. Grub menu popped up. Hurrah! I have a working Grub at last.

Time to fix the other problem: Can't boot a new kernel. I decided this would occur after a short break. . .

Saturday, November 05, 2005

Painful, but worth it

FreeBSD version 6.0 came out yesterday. I figured it was as good a time as any to upgrade, as it would reveal for us once & for all if the FreeBSD upgrade was better than the Ubuntu one.

Well. . .

Again, I was let down a bit by the documentation - it was a chore to find out exactly how to do the upgrade thing. But with a few false starts, we got through it: Downloading the 6.0 source, compiling it, and booting in afterwards.

Some of the false starts:

  • Using the current sysinstall to reinstall the base system, thereby re-installing the current 5.4 base system.
  • gf rebooting into single-user mode halfway thru & finding that /usr/src was empty. I took a look, found that ALL of /usr was empty, and checked mounted filesystems. Sure enough, there were none but root :o) So we mounted everything, and continued just fine
  • gf finding her account had vanished (probably over-wrote a file she shouldn't have), so we recreated her account thru the wonderful sysinstall, and all her files were still there - her /home was fine, it had obviously just lost /etc/password
So all in all, a successful upgrade. Just as slow as the Ubuntu one, but more successful, and mostly just due to compiling, not masses of pointless downloading.

So I think we're sticking with FreeBSD for now - it's easier maintenence.

Friday, November 04, 2005

I must master hibernation.

My Linux PC stays on 24/7 - it gets used mornings, lunchtimes, and evenings most every day, and I'm not going to sit thru a bootup every time I want a PC. Plus the HD gets fscked every 30 mounts, which also slows down bootup. It stays on the whole time, therefore, so it's instantly available whenever.

On the down side, that does mean I'm using power to keep my computer going even when it's not needed.

There are two potential workarounds for that.

Firstly, there's ACPI - used by laptops & stuff, this basically kills your computer except for a trickle of power in the RAM, keeping the information stored. Then you can restart it, and go back to a fully working system, no bootup needed.

Great idea, ideal in many ways, and supported by my MoBo. However, it's never that easy, and the one time I tried putting my PC into hibernation, it wouldn't wake up. Well, actually, it would: I heard everything start spinning again. But the display remained resolutely blank.

It appears that some devices need to be specifically stopped & started so they'll work properly with an ACPI hibernation. I keep meaning to getting around to trying to find out more about what is and isn’t working: Start up SSH access on my computer, and then log in remotely and try to figure out what is and isn't working, and how to fix it.

But I'm lazy, and haven't gotten around to it yet. And I gather that some devices just never work with ACPI, and it's not impossible mine are amongst them.

But there's another alternative to ACPI. It's software suspension: You install the software, and when you hibernate, the memory contents get saved to the swap partition. Then the machine shuts down completely, using no power.

Upon the next bootup, the swap partition is read back into RAM, and so you get back everything that was in memory before you shut down. Result: Bootup is much faster, and it also loads other stuff that was cached, saving time when you start it up again.

Either would be useful to get working, both would be ideal.

I'd like to get ACPI sorted. Because if I can get it working on my PC, I can get serious about another Linux PC I've been contemplating for a while. A DVD player.

I already have a DVD player, of course. But it has a drawback. It does what the manufacturers tell it to do, and not what I tell it to do.

I don't mind that, when it's showing me the opening blurb before the movie starts, or such. It's the recent ones that really hack me off. The ones that spend a couple minutes blasting me with "Downloading movies is theft" messages.

Now, I don't know what beancounting big-media employee came up with this particular anti-piracy stunt. But I do know he (or she) is a total prat.

Firstly, copying movies over the Net isn't theft. Theft implies deprivation, and I don't deprive the original DVD owner of his DVD if I download a copy. Downloading copied DVDs is copyright infringement. In fact, their accusations of theft mean I could probably sue for libel if I were that way inclined ;o)

Secondly, downloading is tedious, and unnecessary bumpf gets cropped out. Anybody who makes a movie available for downloading will strip out the irrelevant material. Such as the "Don't download movies" message.

In short, the only people who will ever see this message are the people who bought the DVD fairly in the first place, i.e. the ones who are already doing what the makers want. The people who the message is targeted at will never see it. So all they're doing is putting an annoying, can't-be-skipped bit of garbage in the way of every honest buyer, and accomplishing nothing but encouraging people to download the damn thing so they can skip all the accusations of theft just because they bought a DVD fairly.

And it's happening on more and more DVDs. And you can't buy players that will skip them. However, you can install a Linux DVD player, and because this is made by viewers rather than the media dinosaurs, you can start watching the DVD at any point, instead of putting up with all the deathly-dull messages you really couldn't care less about.

Of course, there's nothing stopping me from building a Linux PC with a DVD drive right now. But it'd be noisy and power-hungry, or take so long to boot up that I'd've saved no time over the annoying messages.

But with ACPI hibernation, it's different: It can be shut down for silence any time, but still come back at the drop of a hat. IR enabled, it can have a remote control, and an RC which is 100% programmable at that. A graphics card with TV out & a DVD drive, and I've got a great little DVD player. A decent sized hard drive, and I can rip every CD in the house to Ogg, and I've then got a good music player player. A network connection for streaming media & podcasts, and I've got a great all-around media center.

It's tempting. But not until I figure out ACPI.

I must master hibernation.

Thursday, November 03, 2005

The stress of high regard

It occurred to me, after a post at LQ I made on the BSD forum, that I might be seen by my remarks about FreeBSD thus far to be in some way anti-BSD. I haven, after all, not had much good to say about it: My own install attempt was so bad that I erased it from my hard drive, while all I've had to say about my gf's install is how rubbish the supporting documentation is.

So lest it be said that I'm an anti-BSD Linux zealot, I feel I should point out: It should say something about the high regard I hold BSD in that, even with my low opinion of the documentation and the rubbish experience I had installing it myself, I still pointed my gf to it as a solution to all her problems with both Windows and Linux; and continue to encourage her to persevere with it when she runs into problems.

Sysinstall, I've found to be a really helpful piece of software. Unlike many such projects I've encountered, it genuinely does make it easy to set up the things that it says it will set up. It truly does Just Work, and whoever coded it should feel immensely proud of it.

Ports, although not the easiest thing in the world to work out the use of (cvsup, portupgrade, pkgdb - just how many commands does it take to manage one system??), works really well - it's not every package manager that can go from a minimal text-only install to a working KDE with the issuing of a single command. Admittedly, sound still doesn't work, but in fairness, we haven't even tried to get it set up. Everything else is completely functional. That's an impressive feat.

The daemon mascot. . . is quite cute. And certainly better than the new, red-banana-toting logo ;o)

I hold FreeBSD in high regard. It's a great collection of software.

That's why I come across so negative when it's let down by something so simple & fundamental as the supporting documentation. It lets the whole project down. Documentation isn't an after-thought: It's an overwhelmingly important part of the whole project. It's how newcomers find out how to use the whole project.

So finding an install guide that says "Do A, do B, do C, only don't actually do C because we changed that a while ago and you do C later now, after you've done D and E" really does disappoint. And finding a trouble-shooting entry that tells you "Put X lines in Y file", only to find you actually need different lines in a different file. . .

C'mon, guys, it's too good an OS to be let down by something so trivial!

Online MS Office? WHERE??

Slashdot, Znet, and a few other places, have all been mentioning Microsoft's plan to make their Office suite available online, free and cross-platform. They even mention the preview of it, at www.live.com.

Where??

I looked. I saw a pathetically uninspird portal with RSS feeds and bookmark support. And nothing else. Not even an "Office coming soon" message.

Mind you, that was in Firefox. So I took a look with IE. Aside from the lack of a "Firefox support coming soon" message, no difference.

How is this a preview??

A cynic might say MS were desperate to get publicity for their new "portal with absolutely nothing innovative, or even interesting" so they thought they'd say "with Office support planned" to generate lots of headlines about something that would otherwise pass unnoticed.

But I'm not a cynic, of course, so I won't ;o)

But on the subject of MS. . .

There's also been a story about a lack of respect for OSS developers on Windows. Now, I use numerous OSS projects on Windows, such as Firefox, and am very grateful for them, so I was puzzled enough to read more.

And the difference is, he's talking about OSS that only runs on Windows. Apparently, they get no respect.

Well. . . At the risk of sounding cold-hearted: Really, what else do you expect?

If you're a Free or Open Source Software advocate, you'll use a free OS - BSD, Linux, or whatever. You won't use Windows, so why would you be interested in an open source Windows-only product? It's not like you can use it.

The only people such a project is any good for is Windows users. Who are self-evidently not interested in open source. Typical Windows users equate "free software" with "shareware" - essentially, software that's hobbled, limited, or just not worthwhile enough to pay money for.

Neither group is going to react to "Here is some free software for Windows" in a terribly positive way. No matter how good/worthwhile the software might be, the first impression is always going to be "So what?"

That's a handicap that such software was always going to have. OSS that runs on an OSS OS has a huge niche. Closed software that runs on Windows has a huge niche. OSS that runs on Windows is not going to interest either niche.

If this takes you by surprise, you really didn't think very hard about it before you started, did you?

Wednesday, November 02, 2005

How low can a daemon go?

Well, I thought when I wrote this post that my opinion of FreeBSD's documentation was about as low as it could get.

I was wrong.

It's one thing to be hard to find information. But when the information is downright WRONG - sorry, but that's not even shoddy any more, it's downright pathetic.

It all started with the mouse. She set it up during install so that the mouse would work in text-only mode (I believe GPM does this in Linux, butI hate it so don't use it or care what it's called). It worked fine.

We ran startx and X11 popped up, mouse still worked fine.

We set up X11 properly using xorgconfig, and the mouse stopped working. I realized it was almost certainly a conflict between the console mouse software and the X11 mouse software. Commenting out all the lines referring ot the mouse in xorg.conf made the mouse work again, but the scroll wheel wouldn't work. To make it work, you need some configuration in the X11 file. Catch-22.

So we go looking for the solution, as there must be one. The FreeBSD handbook specifically covers the situation, and says:

Then edit /etc/XF86Config and make sure you have the following lines.

Section Pointer
Protocol "SysMouse"
Device "/dev/sysmouse"


This is where my real gripe begins. Because this is utterly wrong. What it should say is:

Then edit /etc/X11/xorg.conf and make sure you have the following lines.

Section "InputDevice"
Option "Protocol" "SysMouse"
Option "Device" "/dev/sysmouse"

In other words, all we had to do is go into the xorg.conf file that xorgconfig generated and replace "PS/2" with "SysMouse". This makes X11 use the same mouse software as the console, and therefore removes the conflict.

After I worked this out, we made the tiny change, added the ZAxisMapping bit that sets up the scroll wheel, and re-started X11. Hey presto, a fully working mouse!

We also got Ubuntu-like sudo set up with the line "username ALL = (root) ALL" or something similar; got KDM as part of the default startup by a quick edit of /etc/ttys, and created a couple of simple shell scripts so she can update ports and update her software through it without having to remember all the command syntax to do it.

In other words, we've gotten her almost entirely up to the same level that she had with Ubuntu, only using FreeBSD and a lot of manual configuration.

I think she's enjoying it, actually - being a Windows user living with a longtime Linux fan, she was somewhat reliant on me doing it for her when Ubuntu didn't do what she wanted. Since I don't know FreeBSD, and it doesn't do the setting up for her, she's actually learning how to make it do what she wants, and isn't reliant on me for it any more - in fact, she knows more than me about some aspects.

So, I'm still optimistic that we'll get her set up on FreeBSD, and it'll all be worth it.

But I still think the documentation for it sucks, big time.

Improving the Linux GUI

Slashdot has yet another "What Linux must do to beat Windows" story running. Yawn. My own take, as most people probably know by now, is that Linux isn't trying to beat Windows and people really need to take that on board before they make these kind of posts.

However, a couple of the suggestions he made about improving the UI reminded me of what I'd like to see improved in Xorg's X11. And it's not one I've seen addressed anywhere else.

It's the clipboard.

Copy & paste in Linux is different from Windows. It's not Ctrl-C Ctrl-V (although many apps do support that these days). Instead, when you highlight something with the mouse, it's copied. Then you middle-click with the mouse, and it pastes.

It's actually much better than Windows in many ways, although it does get on your nerves occasionally when you go to paste some text and realize that you have to manually delete the current text because you can't highlight it without loosing your current copy.

It's also flawed by it's limitations: You can't, for instance, copy an image in Firefox, and then paste it into Gimp. You have to save it to disk and then open it.

Lastly, unlike the "traditional" C&P functionality in Linux, such as vi's, there's only one buffer to copy to. Sometimes, you want more than that.

So here's how I'd like copying & pasting to work on Linux:

You highlight the stuff you want to copy, be it text, images, files, or whatever. If that's all you do, it copies into buffer 0. However, if you press any of the number keys, from 1 to 9, before releasing the mouse button, then the highlighted material is copied into a different paste buffer.

You go to where you want to paste. Middle-click as usual if you want to paste from buffer 0. If you want any of the others, 1-9, then once again, you press the number before releasing the mouse button.

This simple modification allows for the same behaviour as currently exists, if that's all you want; but also means you can keep multiple things in the buffer. This means that if you come to paste somewhere but need to highlight something first, you don't loose what you currently have copied: Just put the new text into a different buffer.

An example:

I want to C&P a URL from an Xterm into Firefox. Currently, I would have to: Switch from the Xterm to Firefox. Clear the current URL. Go back to Xterm, highlight URL. Go back to FF. Middle-click

But with my idea: Highlight URL in Xterm. Switch to Firefox. Highlight current URL, press '1', release mouse. Press delete. Middle-click.

Nice & easy, you no longer have to clear the way before a C&P.

The next thing that would be different would probably call for existing apps to be modified: Make the clipboards ubiquitous and improve the 'intelligence' of them. The end goal allowing for behaviour along the lines of:

In a browser, you have a web page with text and images. You highlight part of the page, with both images and text in the selection.

  • A middle-click in OpenOffice pastes text and images, as you'd expect.

  • A middle-click in Gimp brings up a "Paste menu". Inside this menu, you have each of the images you highlighted that you can paste, either as a new image or as a new item. You also have the option of pasting the text in a text box inside an image, and of pasting the whole text-and-graphic string into an image, so it will look exactly like it would in OOo or FF.

  • A middle-click in an Xterm only pastes the text.

  • A middle-click in Vi with a .txt file open only pastes the text.

  • A middle-click in Vi with a .htm file open pastes the text, and also inserts HTML pointing to the images, so when the HTML is published, you can see the images.

And so on. The basic tenet being, you should always be able to paste everything that the application is capable of supporting.

With multiple clipboard buffers and a universal and configurable C&P, the Linux GUI would be a much better place, IMHO.

Tuesday, November 01, 2005

New FreeBSD logo

Well, they finally announced the winner.

hahahahahah

It's a ball with a red banana stuck in it.

ahahahahahah

Don't retire the daemon yet, guys!

:o)

(Yes, I know the daemon is a mascot and not a logo, but that's beside the point)

Feed the many

Blogger, which I use to publish this thing, offers RSS feeds. Of course - google's a big fan of Atom, after all.

But they've never worked. After discovering that somebody else had managed to get it working by total accident, this offended me too much, and I determined to fix it.

In case you don't know, RSS means "Really simple syndication". It's a wonderful invention that allows you to get information from all over the web, and aggregate it in one place. It mostly consists of a heading and a small amount of text - ideal for blog articles, really.

I first started using RSS feeds in Firefox's Live Bookmarks feature - this is dead handy, any page offering a feed, you just add that feed to your bookmarks, and you get a new bookmark folder with links to all the most recent stories.

But it had drawbacks, so I came up with a new & cunning plan: I put an aggregator on my web page, and it now shows me all the stories from all the web pages I visit, along with the first line of said story. Here's a sample:

This is my default page. Keeps me current with all my fave sites without me having to keep looking at them to see if anything new & interesting has been added.

So I found my problem (I had given the FTP client the full pathname, forgetting that my blog FTP settings start at the "blog/" subdirectory. Fixed that, and *boom*, working RSS feeds. I could now add my own site feed to my web page, but what would be the point of that?

Well. . . actually, I suppose it might look quite nice. . . :o)

If you want to subscribe to my feed, the link is http://linux.oneandoneis2.org/blog/atom.xml

Or just use the little icon in the bottom right corner of Firefox to add it to your live bookmarks, of course. .

The Rock, the Hard Place, and the Open Format

You may have heard about Massachusetts plan to switch over entirely to open document formats for all government documents. Those formats to include the OASIS-group's ODF (Open Document Format) but not Microsoft's new XML format.

If so, you may have heard that Microsoft has so far refused to even consider building support for ODF into Word, and is trying to get MA to change their mind and either include MS XML (because although it's patent-encumbered, it's 'open enough') or exclude ODF (because it's 'not mature/feature-rich enough' and 'untested in real business use'. They've also made a huge issue out of the fact that there are no ODF reads for the blind, which ignores the facts that (a) there easily can be, and (b) other open formats, such as PDF, can be used in most cases, for visually-impaired users, and lastly (c) MA has made it clear that documents can be transferred into MS Office format for the use of the visually-impaired).

If you haven't, then let me tell you: MA is planning to switch to open formats, and MS is both refusing to support that format, and trying to prevent that format being used.

If you've ever looked at how many formats Word supports in the "Save" window (22 on my XP machine, including the open formats TXT, RTF and HTML, and the format of competitor Word Perfect), you might wonder why MS are spending so much time slagging off ODF, a standard that they actually helped to create (MS are OASIS members), when they could just build support for ODF into Word.

So I thought I'd tell you.

There are other word processors on the market than Microsoft's. Possibly the most well-known at the moment is Sun's OpenOffice, a free and open-source office suite. There's also AbiWord, StarOffice, and various others. None are as feature-rich as Word (or if you're less kind, none are so hideously bloated as Word), but they all support, or will support, ODF.

They also have some support for Word's .doc format. But it isn't very good: You can never be sure that an OpenOffice .doc file will look the same as it does in Windows. A simple document will probably render fine, but when you start messing around with margins, headers, footers, and the like, all bets are off.

This is a problem if you have large numbers of large documents that use complex formatting saved in .doc format, and want to stop paying for MS Office and use the free OpenOffice alternative. You can't just automatically change the document formats over: The conversion just isn't good enough. There's only one piece of software in the world that can render .doc files properly. MS Word. Right now, that means that if you need access to .doc files, you have to buy & use MS Word.

Has the light dawned yet?

If MS Word had support for ODF built in, then it would be capable of "translating" .doc to .odf with 100% accuracy - unlike any other word processor out there right now. This would remove one of MS's most enduring customer binds: It would make it very easy to convert all your .doc documents to the non-proprietary ODF format.

And once you've converted everything to ODF, you can use any of the multitude of cheaper, or even free, office suites instead. You would only have to pay for Word if you wanted to.

Even worse, MS Office is one of the biggest reasons why customers have to use Windows. To use .doc, you need Word; to use Word, you need Windows. You must pay for both.

Without .doc, you can use another office suite on another OS. You can get both free.

That's why MS is so frightened by MA's decision to use ODF. MS are so used to people being forced to use their products, they're terrified by the idea of a level playing field where people can use whatever they want. (It says a lot about how good they think their products are when they think the only way to get people to use them is to make it impossible to use alternatives, doesn't it?)

If MS builds in ODF support, then people will be able to use any software they like. Result: More people migrate away from MS.

But if MS doesn't build in ODF support, then nobody will buy MS Office, because proprietary formats won't be allowed. Result: More people migrate away from MS.

From MS's perspective, MA is a "rock and a hard place" situation. They can't support ODF, and they can't not support ODF.

So what should we expect to happen?

MS will do absolutely everything in their power to get ODF struck off as a viable alternative, or to get their own XML format added as a viable alternative. When they finally fail, and fail they will, they'll implement ODF support so fast it'll make your head spin.

The ideal for MS is to keep Pandora's box closed and stop people being able to use anything but MS products. But if the box gets opened, then they have only two options: Compete fairly, or become extinct.

They'll take a decrease over an extinction any day.

Another night in

Last night, my GF tried to get FreeBSD set up to her satisfaction, while I edited my .Xdefaults file to make Xterms use an anti-aliased font. Not sure if I'll keep it - some of the characters are a little unclear at my usual Xterm size - but I'll give it a go. I considered changing the console font as well, but on closer inspection, I actually quite like it already.

FreeBSD, on the other hand. . .

The documentation for my distro, Gentoo, is superb. Just about any question I've ever had, I've been able to get answered quickly and easily, from a well-written and concise article.

Trying to find out a few things about FreeBSD, however. . . hundreds of overly-technical pages that assume you already know 9/10s of the subject, poorly structured. . . It's a mess. Sorry, FreeBSD fans, but it is. There are times when you just want to know "How do I do this one thing?" and you don't want to be given the answer "Read this handbook that tells you five hundred other things and you'll find how to do that one thing scattered through the guide."

If I were the one installing FreeBSD, my new goal in life would be to write some halfway decent guides myself. But I'm not, so I've just handed my gf a link to an O'Reilly page of links that are aimed at beginners, and hopefully she'll find what she needs from that. If not, she'll probably go back to Ubuntu, the new install CD of which I'm downloading at the moment. Or maybe I'll look into Suse or Mandriva and see what their upgrade path is like. . . If it's better than Ubuntu's, I may suggest she trial them, even tho I have a deep dislike of RPMs

Pity, really. Up until the upgrade, we were both impressed by Ubuntu. . .