...making Linux just a little more fun!

November 2005 (#120):

The Mailbag

HELP WANTED : Article Ideas
Submit comments about articles, or articles themselves (after reading our guidelines) to The Editors of Linux Gazette, and technical answers and tips about Linux to The Answer Gang.

AGP problem

Fri, 30 Sep 2005 07:37:55 -0700 (PDT)
Igor T. (tymarats from yahoo.com)

Hello, Gang!

I appologize in advance because I know this is going to be a long letter. The thing is, I've had this problem for more than a year now and I hope that you can help me solve it. Plus, I just have to tell somebody about it :)

The problem showed itself for the first time when I installed NVIDIA GLX drivers on my box. At the moment, I had a Riva TNT2 M64, and I wanted to see how far can I get with those drivers. Although most people hated NVIDIA drivers, I had no problem with them. Or, at least I thought so. Quake3 was fine, blender too, but as the time passed, I noticed that my box wasn't stable any more. Sometimes it happened that, out of no obvious reason, X hangs. I can move my mouse pointer, but computer doesn't respond to anything. Curiously enough, if I had xmms started, the songs would continue to play on normally, and everything seemed to work fine - except the fact that X is hung and I couldn't switch to console, either. Later, I found one way to reproduce the bug quickly, rather than to wait untill it happens (it was simply playing the "Virtual Machine" screensaver but, as you will shortly see, it seems that this wasn't of any importance) and I tried to log in from my laptop via telnet when the hang occurs. I succeeded, and everything seemed to work on the box side, I couldn't find ANY reason why X was hung, nor any indication that it actually happened. Furthermore, when I killed X (from telnet), box would have returned to console happily, and I was able to start X again! As soon as I returned to the original nv driver, system was steady as rock again. So, buggy NVIDIA driver/X version/kernel, I figured. But, as the time passed, I've changed a lot of those and so many combinations (XFree86, Xorg, kernel 2.4.x, 2.6.x, almost every NVIDIA driver...) that I finally had to admit that something was seriously wrong. Many nights without sleep and I finally found the way to workaround the problem -- setting "NvAGP" option to "0". As it shows, using either internal NVIDIA AGP support, or kernel agpgart hangs the X in a mentioned manner. I didn't know why, but now everything was accelerated, and system was stable again, so I forgot about the incident.

Since then, I've "upgraded" Riva to Radeon 9200. For a long time I was using only ati driver (FireGL drivers didn't support Xorg, and I didn't want to revert to XFree out of principle), but a month ago I had everything ready to actually try FireGL drivers. After some problems, I finally got it to work, and I was happy. But, after few hours -- same thing as with Riva. Hang of death. The old trick of reproducing the error doesn't work now, but I found another one -- dragging the mouse pointer rapidly while holding left mouse button (over empty KDE desktop). All other symptoms were exactly the same as with Riva (music plays, everything works...) except that now, when I kill the X from laptop, whole system hangs and nothing wors anymore (including networking -- telnet session terminates). So, it's almost certain that this is a hardware problem, but none of this happens under XP. So, I try to tweak various fgl parameters (disabling/enabling user page locking, internal/external AGPGART, ...), but the problem persists.

Is this a hardware problem (XP works fine, after all)? Do I have something misconfigured (I tried various AGP aperture sizes in BIOS, but it doesn't solve the problem)? Is there any way that I can "disable" usage of AGP as I did with NVIDIA driver? I don't have enough money to buy a new motherboard, so please don't tell me that it is the only solution :)

And, finally (finally!) techical stuff:

Box: 	AMD Duron 750
	384MB RAM
	Radeon 9200 64MB DDR

(at the moment:)
	Slackware 10.2
	kernel 2.6.11-9

$ /sbin/lspci | grep -i agp
00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365
[KT133/KM133 AGP]

I have via-agp module loaded before loading agpgart, because fglrx module doesn't work without it (fglrxinfo reports usage of Mesa, not ATI drivers, and 3D acceleration doesn't work). I appreciate your help!


FIASCO (Fractal Image and Sequencing Codec)

Wed, 5 Oct 2005 08:58:04 -0700
Jim Harvey (harveyj from entrenet.com
Answer by Rick Moen (LG Contributing Editor)

I am trying to get a copy of the Fractal Image and Sequencing Codec (FIASCO) that was announced in the Sept 2000 issue of your journal.

You've actually written to the mailing list of the Answer Gang, which is a group of volunteers who collectively write column in the magazine that researches and answers people's technical Linux problems. In that spirit, let's see what we can turn up.

The item you mention appears to be at http://linuxgazette.net/issue57/lg_bytes57.html#software . (I mention that because it'll help the other volunteers if they wish to lend a hand. It's always a good idea to make it easy for others to assist you, if you're hoping for help. Thus, URLs in this case are useful.)

The kit's maintainer, Dr. Ullrich Hafner, also had a January 2001 Linux Journal article on the subject: http://www.linuxjournal.com/article/4367

All of the links returned by various search engines appear broke.

Some amount of googling later, I found that the FIASCO toolkit appears to have become unmaintained and is not found mirrored downstream in any of the usual places. That's unfortunately all too common among open source inventions that were precariously hosted only in one single location and never quite caught on. Ours is a rather carelessly Darwinian software ecology.

Depending on what you're looking for, you might find equivalents of particular tools (cjpeg, djpeg, etc.) in the libjpeg source (currently jpegsrc.v6b.tar.gz) published by the Independent JPEG Group at ftp://ftp.uu.net/graphics/jpeg

NNetpbm (http://netpbm.sourceforge.net) does include pnmtofiasco, which compresses the named pbm, pgm, or ppm image files, or Standard Input if no file is named, and produces a FIASCO file on Standard Output. "

Anyhow, back to Hafner's reference implementation of the FIASCO CODEC -- Internet Archive to the rescue: http://web.archive.org/web/20000829071003/ulli.linuxave.net/fiasco (the last mirrored version of Hafner's page) has mostly broken links -- but the source code RPM package, fiasco-1.1-1.src.rpm, is still retrievable. I have done so, pulled apart the RPM, and extracted its tarball for the benefit of you and posterity. You'll now find it at:


There is also a copy of the RPM SPEC file for that source tarball. I hope that helps!

Hi Rick:

Thanks for all the help. I fully understood that your groups mandate was to answer Linux technical problems. However, from past experience volunteer groups are by definition enthusiastic, challenge-oriented people. You have just confirmed this observation.

Thanks again.


I usually leave out sig quotes, but this delightfully silly and apropos item was attached to Rick Moen's signoff... -- Heather

Mark Moraes: "Usenet is not a right."
Edward Vielmetti: "Usenet is a right, a left, a jab,
and a sharp uppercut to the jaw.
The postman hits!  You have new mail."

(!) [Heather] The real "wanted" for this item - if you happen to be the creator of a nice little project that only lives in one place, see that a few copies are stashed elsewhere. If it has even a tiny following, encourage your pals to keep an extra of it. Otherwise whenever you need to move on, this is likely to be its fate... someone who desperately needs it, will feel terribly lucky if he manages to find it.
If open source is the way to protect some app's future, leaving that futire in only one cabinet won't do the job.

Fw: Vote for Rocard/Mueller for the "European of the Year"

Fri, 14 Oct 2005 23:12:58 +0200
Forwarded by Karl-Heinz Herrmann (The Answer Gang)
(!) [Heather] Normally this would go in News Bytes, but it's a timebound announcement, which warrants its inclusion in Help Wanted.

Hi TAGs,

something for the news maybe?

information missing in the blurb below: The poll opened on 22 September 2005 and will close on 11 November 2005. It is located on the Internet at http://www.ev50.com/poll


Begin forwarded message:

Date: Fri, 14 Oct 2005 19:14:55 +0200
From: Henrion Benjamin <bh from udev.org>
Subject: Vote for Rocard/Mueller for the "European of the Year" award

Dear Supporter of Noepatents.eu.org,

Let me thank you for your participation in our web demonstration in the spring. As you know, our efforts ultimately led to the rejection of the proposed software patent directive by the European Parliament.

We now have the next opportunity to demonstrate the unpopularity of software patents, and to draw attention to our cause. For the most prestigious awards in EU politics, the "EV50 Europeans of the Year Awards" by the European Voice (an EU-focused weekly newspaper), the jury has nominated two software patent critics, Michel Rocard MEP and NoSoftwarePatents.com founder Florian Mueller.

With the power of the Internet, we would like to ensure that our candidates win, and nominees who are in favor of software patents (such as EU commissioner McCreevy) lose. Please participate in the public Internet poll, and you can find voting recommendations and further instructions here: http://www.nosoftwarepatents.com/en/m/ev50/vote.html

Please display a banner on your website:

There is a convenient way to inform your friends by email:

Those materials are available in 12 languages. The language can be chosen from a pull-down menu at the top of the page, or in the list of languages at the bottom of each page.

Thank you for your continued support,

-- Henrion Benjamin <bh@udev.org> Noepatents.eu.org

Problems with accessing FTP site using windows pc on lan to a

Thu, 6 Oct 2005 15:39:23 +1000
Michael Harvey (cyberzork from gmail.com)

Hi There, Recently a Linux guy (Now moved away) setup a Linux Redhat Firewall server connected to a Cable Modem for our Windows PC's to share Internet etc.

Now the Browsing is ok and Email is ok, but we are having problems with FTP.

We can connect ok to the IP Address and the username/password verifies ok, but then we get a message saying eg:-

500 I won't open a connection to <> (only to <>)
! Failed "port":
! Retrieve of folder listing failed (0)

Note:- I am on the Windows pc getting the IP Address<>;.

Now i tried passive mode using the same ftp port 21 and same problem. The linux guy said we have to mod the IP Tables somewhere, but he is not exactly sure where to do it to allow us to FTP from local windows pc's.? I have included the full error message ftp log below. I found the IPTables File on the Linux box, but have no idea what to do there. Any help would be greatly appreciated. (Full FTP Log Error).

See attached ftp-errorlog.txt

Sun retiring the SISSL

Sat, 03 Sep 2005 12:08:57 +0100
Jimmy O'Regan (The LG Answer Gang)


Specifically, this means that OpenOffice.org is now LGPL only. They are also asking OSI to not recommend its use.

(!) [Heather] If your project uses SISSL currently, he also asks that you consider a different license for your next revision or release, so the sweep to remove this license from general use can happen quickly. That makes this a Help Wanted to project maintainers. Thanks!

MIT open sources LispM

Tue, 04 Oct 2005 09:36:29 +0100
Forwarded by Jimmy O'Regan (The LG Answer Gang)

As in, Lisp Machine: http://bc.tech.coop/blog/051002.html Code here: http://www.heeltoe.com/retro/mit/mit_cadr_lmss.html

RMS'll probably be happy about this: before he started GNU, he reproduced Symbolics' extensions to the Lisp Machine (http://www.gnu.org/gnu/rms-lisp.html). Much of that work is in this release.

(!) [Heather] It'd be fun to get an article from someone on the stresses of preparing a big project to become open source after many years under an odd or proprietary license.


[Fwd: Great Article!]

Tue, 04 Oct 2005 09:20:48 +0100
Jimmy O'Regan (The LG Answer Gang)

Wahey! Positive feedback (so far I've also gotten an angry mail on behalf of winlibre, a correction, and some additional information).

Date: Mon, 03 Oct 2005 14:59:56 -0700
From: Chris DiBona <cdibona from google.com>
Subject: Great Article!
To: jimregan@o2.ie

See subject. Well done. Makes me wantto throw you into our interview system :-)

Chris --

Open Source Program Manager, Google Inc.
Google's Open Source program can be found at http://code.google.com
Personal Weblog: http://dibona.com

Usually I leave sig blocks out, but I think if anyone thought it was to change Google's mind about "doing cool stuff" this would be the man who'd know.

You article about Google Summer of Code.

Tue, 04 Oct 2005 08:56:05 +0100
Noemi Tozjan (gjr from stcable.co.yu)
Answered by Jimmy O'Regan


I find your article very offending, and I think you should modify it in order to reflect the reality, and here is why:

Before I even look at the rest, allow me to apologise in advance: the article has been published, and will not be changed.

Can I have your permission to forward your mail for publication next month?

Only if I have permission to publish your e-mail aswell.

Of course.

1) multiple people working on the installer/updater

Yes, it is true that WinLibre had more than just one people working

on that. But! If you look at the project listings from other mentoring organizations, you can see that the same thing is present in the following mentoring organizations too: Python, Nmap, Internet 2, Drupal and possibly more... Why does it bothers you only at the winlibre project?

The impression I got is that these were separate implementations of the same thing. With the other projects you mentioned, it was clear that these students were working on different aspects of the same project.

Well, it's partially true for the both cases. As for WinLibre, we had 2 students working on separate implementations of the same thing, while the others were working on different aspects. As for the others, I know (source SoC students themselves) that in some cases 2 or more students were working on separate implementations of the same thing aswell. The reason why it is ok, is that the mentoring organizations had no way to know if a student will finish his/her project or not. The number of finished projects is less than 90%, and even this percentage is way above the expectations (66.67%) on the beginning of SoC. So it was fairly reasonable for some mentoring organizations to have 2 students working on the different implementations of the same thing in case the thing was high priority for the mentoring organization.

If this installer is really a single installer with several people working on different aspects, as with the other projects, then please accept my unreserved apologies, and my promise that a correction will be published next month.

To compleatly clear it out, here is the correct list of the WinLibre projects:

Finished projects:

- installer (2 students) - updater (1 student) - control centre (1 student) - MacLibre (1 student) - 3 -original- games (3 students, 1 per game) - Final Touch /or Image Manipulation Tool/ (1 student)

Failed projects: - CDRoast GUI (1 student)

2) Michael Rybak's "Sneaky Snakes" Your text about this project is a complete missinformation. First: please take a look at it before you call it a "snake clone", because it has a totally unique concept, and it is not even similar to the snake game in any aspect. Also, you've used the words: "One project that has been singled out as a waste of funding". Ok, yes it was singled out, but by -one- single person, Uros Trebec, while all the other people on that thread in summer-discuss (which is undoubtable your source) supported the project. Also you should check out Uros's previous posts on summer-discuss, and you will find out that your only source is a person that was planning to cheat in SoC, but got rejected.

I will admit that that message was a source for that opinion, I will also admit the possibility that it was the source for the other places I saw that opinion voiced, but it was not the only source of that or similar opinions.

Can you -please- point out the other sources?

Hmm. Can't find anything at the moment, and I'm starting to suspect that there was only one other source, and it was in comments on Slashdot.

I'll get back to you if I find anything.

Have you actually downloaded it?


Snake clone:

- you have one (or in some cases 2 or more) snake that collects pieces

on the playground and gets larger for each collected piece, if the snake touches itself (or the other snakes), the player loses.

Sneaky Snakes:

- 2 snakes are fighting each other by shooting their parts, they don't

collects pieces and if the snakes touches themselves or the other snake they don't lose.

That said, thank you for correcting me about the game: to my eyes, it looked like a snake clone -- a more modern snake clone, but a snake clone none the less.

Also, because it seems to have been unclear, I did not share that opinion. I thought that my contrasting the game with the installers made that clear, I'm sorry if it didn't.

It wasn't clear.

I would also like to inform you that every single SoC student I've

talked with finds your article very disappointing partially because of the lack of objectivity and because some of the projects were left out from the lists.

As for objectivity, well, the magazine is called Linux Gazette. I can't and won't apologise for giving a better write up to the projects I personally had interest in: the article simply would not have been written otherwise.

Hmm... Especially because it's -Linux- Gazette... You want Linux to be

more popular, or not? Do you want to see the Average Joe using Linux or not? Well, if you do, here is an interesting fact: The Average Joe uses Windows. If you want to attract him to opensource, you must show him that it's good. How can you show him that? You give him opensource for Windows as step one, as a step two, he'll be more openminded about Linux...

I was coming from the PoV that if you show people the cool things they can do with Linux that they can't do with Windows, they'll be more likely to switch. The truth, I suspect, is somewhere between these views.

Projects were only omitted simply because I could find no information about them. Please feel free to tell people to pass on information I missed, either to me personally, or to tag@lists.linuxgazette.net (from which we at Linux Gazette can publish them).

(!) [Heather] The irony that Jimmy had trouble finding some projects sponsored by Google! while others were easy to read about was not lost on us in the back room, but it was his article to write.
Our nature as a magazine is to be by and for ordinary people; this means that some things will be subjective by nature, while others will go to the other extreme and try to cover a subject broadly to avoid attaching themselves to one preference as if it's the only thing that exists - a laudable objective, as well as being objective.

I have already received mail from one of the LiveJournal participants, who provided me with information about several of those projects as well as his own. I am interested in providing a complete list of projects, without the article part. If you would like to help me to complete it, well, thanks. If you would like to complete it yourself, the article is under the terms of the OPL 1.0 -- you may freely modify it, etc. and make your own list.

Well, here is what people wrote on our internal SoC mailing list:

Pradeep Padala: Finally a list of projects http://linuxgazette.net/119/oregan.html

Anil Ramnanan: He missed my project, an Eclipse plugin for Apche Forrest. :(

Sorry about that. Apache was one of the most difficult organisations to find any information about.

Ivan Barrera A.: Mine too, but i didn't like his writting. I also think he was offensive without the need.

What was this project?

Lev Olkhovich: Codehaus also has 12 applicants with only two projects. It is especially strange because the link in the article points to a page with times more projects.

I tried to provide a link to the proposed projects for each mentoring organisation, but only to list the projects that were accepted. The projects listed were the only ones I could find information about.

Pradeep Padala: I actually didn't look at the article closely. It was forward to me by a friend. Looking closely, it shows SoC in a bad light, I agree.

Kai Blin: Also, I think the author didn't really do his homework. I can only talk about the wine projects, but he missed a couple of details there.

I realise that Kai's project has been added to CVS since I submitted the article, but beyond that I don't see what details I missed.

Pradeep Padala: However, I must say, not everything he said is not wrong either.

Best wishes, Noemi Tojzan

Thanks for writing, Jimmy O'Regan

Re: Your article about Google Summer of Code.

Wed, 05 Oct 2005 09:28:36 +0100


I've forwarded your replies to the Google Summer of Code internal mailinglist, so I guess people will contact you with their projects if they want to. The attitude of most of them about the article is pretty negative tough, so don't expect miracle.

Well, I guess that must have something to do with the way in which it was presented, because the other mail I've received has been positive.

I'm not representing WinLibre in this issue, I'm writing only my toughts, but I think it would be fair from your side if you'd publicly apologize both to WinLibre and Google because of the unneeded negative criticism presented in your article, especially because you stated that the actual reason of this attack was the fact that the WinLibre is providing OSS for the Windows platform. (note: we do it for MacOS too now, and the 3 games are cross platform)

Erm... no, I don't see how you've come to that conclusion. That WinLibre is (was) a Windows-specific project is the reason I didn't take a very close look at the projects: hence, why I termed 'Sneaky Snakes' a snake clone. I admit that was inaccurate; I should also admit that I have very little interest in games in general: it's most likely that I would have come to the same conclusion no matter how hard I looked at it, simply for lack of a better comparison.

The criticism was aimed at the duplication of effort in the installers. That I called it a "waste of effort" was an error in tact -- I had intended on changing that sentence to read "unnecessary duplication of effort", but it slipped my mind. Even that, though less so, is still going to be offensive to some.

I apologise wholly and unreservedly for the unnecessarily offensive wording of that phrase; however, I will not apologise for having and expressing a negative opinion of the duplication of effort.

As a personal note: I don't understand why is it needed to have a negative attitude about Google Summer of Code in any aspect, when Google invested 2.000.000 USD in opensource. The entire OSS community should be thankfull for this, no matter if there were glitches or not. The only thing you can achieve by this attitude is to stop Google and potentially other companies to make programs like SoC in future. Is really that what you want?

I think you're overreacting here. I made two critical comments of my own in that article (the other was towards criticism made by an Ubuntu representative), the rest was merely a reflection of the criticisms made elsewhere: it would have been a bold-faced lie to say that everyone was entirely happy about how SoC went.

As for Google discontinuing SoC because of some criticism? You must realise how far-fetched that idea is. If Google was that thin-skinned as a company, they wouldn't have survived long enough to have the first.

Noemi Tojzan

Take care, Jimmy

Correction for your Summer of Code article

Tue, 04 Oct 2005 10:06:58 +0100
Meredith L. Patterson (mlp from thesmartpolitenerd.com)
Forwarded by Jimmy O'Regan
Mirrors who poll least often, take note. -Heather

OK, I sent the actual correction to the editor gang already, but just in case:

<li><a href="http://austin.cs.uiowa.edu/charun">Charun</a>: more "natural" queries in PostgreSQL (<a href="http://archives.free.net.ph/message/20050601.205033.7e74a30c.en.html">details</a> ;)</li> </ul>

should be:

<li><a href="http://pgfoundry.org/projects/qbe">Query by Example</a>: more "natural" queries in PostgreSQL (<a href="http://archives.free.net.ph/message/20050601.205033.7e74a30c.en.html">details</a> ;)</li> </ul>

Subject: Re: Correction for your Summer of Code article
Date: Tue, 04 Oct 2005 09:27:41 +0100

Meredith L. Patterson wrote:

Hi Jimmy,

Just read your Linux Gazette article on the Summer of Code, and I'd like to submit a correction if at all possible. I was one of the students who worked for Google, and you've got my project listed as Charun, which isn't quite right. Charun was sort of a stunted proof-of-concept that I put together for my qualifying exams, and while it's certainly the intellectual ancestor of Query by Example (my actual project), QBE is (1) far more robust, and (2) actually integrated into PostgreSQL (as in, it modifies the SQL language itself, rather than being an after-the-fact add-on).

You can find QBE at http://pgfoundry.org/projects/qbe, with source code and (sparse) documentation. If it's possible to correct the link in the article, I'd really appreciate it.

I'll pass this on to my editor, who gets final say on what does and does not get corrected.

Can I also have your permission to pass this on to our mailbag for publication next month? (Some of our mirrors are slow to update, and the correction will go unnoticed by anyone who has already read the article).

Absolutely. Thanks very much!

Cheers, Meredith

[Ben] Done and repubbed.


Time to drop the Site Map?

Tue, 4 Oct 2005 10:58:50 -0700 (PDT)
Mike Orr (LG Contributing Editor)

We (LG's editors) are thinking about deleting or changing the Site Map page, and would like to get readers' input on it. The Site Map is basically a concatenation of the monthly TOCs, a kind of poor man's search engine. It was really useful when it was made, but now has become so huge (309 KB) that it's inconvenient to use, and will only get bigger. Also, our search engine at the time alternated between being broken, anemic, and nonexistent. Now we have a Google-powered search, and author pages linking to all articles by each author. So the only other use for the Site Map seems to be offline searching, for people who don't have immediate access to the Internet. Are people using the Site Map page? Does it have any other uses we've missed?

-- Mike Orr

[Ben] Slight correction, at least from my perspective: I'd like to get TAG's input on it. Readers, well... there's no way to get a reasonable-sized sample.
[Heather] The most obvious mechanism to get a reply on this from the readers and NOT the answer gang is to post a query to the readers at large in The Mailbag and/or encourage commentary back about it in the TAG blurb. At least then we know that any responses come from people who actually read the current issue without having the special interest of being contributors and staff.
(!) [Heather] At this point I snip a bit to leave out the collective of opinions so far, but point out the ideas that came of the thread...
[someone among the Gang] As for the Site Map, if we need to keep it (and I'd rather keep it as-is than repackage it into year-chunks or a dynamic page), how about moving the Site Map link off the main menu and changing the home page to:
Earlier issues are in the Archives. Or see the Index of All Issues.
[Ben] I'm curious - not for or against, but simply curious - about the reason that you don't like the idea of a dynamic page. For me, it has the benefit of de-bloating the tarball. Am I missing some way in which it would be a detriment?
[Mike] Whenever I use the site map, I use the version that came on Linux Format's DVD, rather than run up my phone bill... I'm sure we have a quite few off-line readers.
[Thomas] It wouldn't be a detriment --- if the reason you're doing this is to reduce the size of the tarball, then that's fine. I welcome it, as there's probably still a lot of people on dial-up trying to get each issue.
Thinking about it some more, I missed the reason (if there even was one) why the current Debian maintainer doesn't ship the sitemap for each LG deb (this to me was always a grave mistake on his part -- plenty of other debs have much larger amounts of crap in them).
[Heather] Probably the same philosophy that had him leaving out TWDT.
[Thomas] If we came up with a script that would do this for us (perl, awk, whatever -- a language that was certainly common on almost all Linux installations) then it would be a trivial matter to have it called as part of the post-install scripts. A similar process applies for RPMs. Distributing it as part of lg-base.tgz (as I had mentioned in the past) for those that download the raw tarballs from our FTP site would mean they too get the benefit.
That's how I see things. It's a good balance, because:
* You don't need any quantitative measures as to whether a certain amount of people want to keep or remove the TOC.
* It reduces the size of the tarball considerably.
* It means that it can be generated as and when, for those that want it.
Just my thoughts.
[Heather] ... a "limited fare" meta-TOC [only covering issues you have present] would not serve a purpose of spotting a specific past issue to glom. Though the KB does mention the right issue in the hotlink, since our hotlinks mention issue numbers.
[Thomas] Are we going to publish the thread in LG for next month and wait for reader's responses before a plan of action is made?
[Ben] AFAIC, it's a dead letter already. There was never an overwhelming reason for getting rid of it, nobody's adduced one, and I've seen several people jump in fairly quickly to say that they do indeed use it; ergo, it stays.
(!) [Heather] There you have it; we've thought about it, but we're not doing much to it, unless something sways us more solidly that some effort on this would make us a more appreciated 'zine.
Dear readers, if you've something to say, please let us know; mailing gazette@ (LG Editors) linuxgazette.net to reach us directly or tag@ (The Answer Gang) lists.linuxgazette.net to reach the Answer Gang as a whole (yes, we're a list, just a very open one) will be equally accepted. And thanks for keeping up with the Gazette :)

[Linux Gazette 118]Missing file?

Fri, 9 Sep 2005 20:27:04 +0000
Predrag Ivanovic (predivan from ptt.yu)
Here's what we were doing among the editor gang on 9/11 this year...
Offline mirrors take note :) -- Heather

Hello,Gang. I am reading Mailbag from current Gazette,and it seems that a file is missing from lg-118 tarball.It's lg/current/misc/wanted/philip_obrien.grub.conf.txt.



"....If Windows XP were the size of the Empire State Building, then the little barking Beagle virus - the size of a small dog - can come in through the front door, lift its leg, deliver its payload, and somehow cause the entire building to come crumbling down." -- theregister.co.uk


[Jimmy] Well, I have the file, ready and waiting to go into SVN, but 'svn up' isn't doing anything.
[Ben] OK, file's been added.

This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

Published in Issue 120 of Linux Gazette, November 2005

The Answer Gang

(?) (!)
By Jim Dennis, Jason Creighton, Chris G, Karl-Heinz, and... (meet the Gang) ... the Editors of Linux Gazette... and You!

We have guidelines for asking and answering questions. Linux questions only, please.
We make no guarantees about answers, but you can be anonymous on request.
See also: The Answer Gang's Knowledge Base and the LG Search Engine


¶: Greetings From Heather Stern

(¶) Greetings from Heather Stern

Greetings everyone, and welcome once more to the wonderful world of the Answer Gang.

Those of you who follow the Mailbag may recall that I visited our Weekend Mechanic, Thomas, as well as the country he lives in. England was nice. Rick, our resident Viking, took special care that I should have a maximum amount of the very best information so I shouldn't get too wretchedly ripped off. I didn't follow all of his advice, but I think we managed to get less burnt for his care, at least.

Sights I did get to see: foreign skies. My favorite. But then with a name like 'starshine' for my domain you probably expected me to be fascinated with that. Great countryside - not just from above (keep your eyes open as you pass sunset at the terminator - "wow" isn't enough to describe) - but you rush past pasture and forest as much as an occasional industrial blip on the trains. Fascinating paintings on some underpass walkways - to my great pleasure, there are walking/biking paths everywhere. The motorways are full of mildly crazy people but you don't have to have a car.

You could take the train just about everywhere for city-to-city travel - but it's not all that cheap, even though it's not exactly "may as well go for two weeks as a half day" kind of expensive. I enjoyed a ferry over to the Isle of Wight. It was nice enough, with a curious church, a plaza with plaques thanking those who prevented them being bombed completely back to the stone age (instead of about halfway), the charter of the original colony of Maryland...

2c tips for travellers:

I'm sure I'll make my way back there sometime. It was as much fun to go to Thomas' local LUG and speak about X windowing (one of my favorite topics) and meet people I'd only ever known online. Having entertained a very few of them when they visited here made my arrival so much more pleasant.

In other adventures - Thomas has found online, the one, the only, the xteddy teddybear. Per his author's homepage, he's a Gund "tender teddy". Well, he's Gund Tender Teddy model 2123, a nice brown with a cheery red bow, born 1983, and Thomas found him vacationing in Hawaii. There's a ticket booked for him to the UK and xteddy will soon grace Thomas' desk directly. :)

Winter's here, but I hope it's not too chill to you - in whatever way you need to hear that. Time for the hot choccy, I think; settle into a warm chair, pore over a few techie manuals, and enjoy our current feast for thought. See you next month!

This page edited and maintained by the Editors of Linux Gazette
Copyright © its authors, 2005
Published in issue 118 of Linux Gazette September 2005
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

Published in Issue 120 of Linux Gazette, November 2005

Experiments with an iPod

By Awasthi Nirendra

What is this iPod?

An iPod is a brand of portable digital audio player designed by Apple Computer. The first three generations of iPod use two ARM 7TDMI-derived CPUs running at 90 MHz, while later models have variable speed chips with a peak speed of 80 MHz to save battery life.

This article is intended for those who want to either use their iPod with Linux, or use Linux on their iPod.

Connecting and Locating your iPod

The first step is to connect the iPod to your USB port, then determine what Linux device the iPod is connected as:

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: Apple Model: iPod Rev: 1.50
Type: Direct-Access ANSI SCSI revision: 02
scsi0 means that iPod is connected to /dev/sda, scsi1 means that iPod is connected to /dev/sdb, and so on. In this article, I'll use /dev/sda as the default assumption; obviously, you'll need to change it if your iPod uses a different device.

Mounting and Unmounting Your iPod

Now we can explore the iPod. For this, we need to mount it:

# mkdir /mnt/myIpodSongs
# mount -t vfat /dev/sda2 /mnt/myIpodSongs
After mounting, the contents of the iPod can be browsed as a normal file system.

When we are done exploring, we need to unmount the iPod:

# umount /dev/sda2

Copying and playing music

Ok, this was neat, but what about playing some music? On Linux, gtkpod can be used to copy and organize your music into playlists. After installing gtkpod, the mount point of the iPod can be specified from "Edit->Edit Preferences". Once the mount point is added, gtkpod lets you create and modify playlists, add or remove songs, and even export your Thunderbird or Evolution data to the iPod.


Podcasts are radio-style shows for the iPod. Unlike streaming audio, which requires you to listen in real time, podcasting lets you control how and when you hear your favorite shows. Some of the podcasting clients available on Linux are amaroK and BashPodder, a command line utility to download podcasts.

Installing Linux on the iPod

Now that we know how to use iPod on Linux, it's time to use Linux on an iPod. Why bother to install Linux on an iPod? Because it includes loads of new games, a movie player, a voice recorder, and the freedom to create new applications. For those who are brave enough to explore this exciting option, iPodLinux has a distribution you can use; the first, second, and third generations of iPod are officially supported.

After playing with the installer for a bit, I was able to install iPodLinux on my 60GB Photo iPod. The port uses uClinux, a Linux flavor designed for devices that lack a memory management unit (MMU). While the iPod has some MMU-type capabilities, they are not sufficient to support the Linux kernel.

Before installing Linux, it's a good idea to make a backup of the iPod boot loader and OS, so they can be restored if something goes wrong:

# dd if=/dev/sda of=ipod_boot_sector_backup count=1
# dd if=/dev/sda1 of=ipod_os_partition_backup
After the backup is done, the next step is to create a new partition on the iPod to hold the root file system for Linux.

A partition can be created by using the following command:

# fdisk /dev/sda
I created the following partitions on my 60GB iPod:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1 8001 0 Empty
/dev/sda2 * 6 7296 58564957+ b W95 FAT32
/dev/sda3 2 5 32130 83 Linux

Once the partitioning is done, create a filesystem with an ext3 journal:

# mke2fs -j /dev/sda3
and set the maximal mount count between two filesystem checks to zero to prevent fsck being run on it:
# tune2fs -c 0 /dev/sda3

To install the Linux kernel and the boot loader, download either the Official Boot loader (for the 1st, 2nd, and 3rd generation iPod) or the 4th generation photo iPod version. Also, download the latest kernel from the nightly build. Extract the kernel and boot loader into a directory of their own. Next, extract the Apple image from the boot loader and create a new image including Linux and Apple OS (here, the kernel is named uclinux-2.4.24-ipod2.bin):

# ./make_fw -3 -o apple_os.bin -e 0 ipod_os_partition_backup
# ./make_fw -3 -o my_sw.bin -i apple_os.bin -l uclinux-2.4.24-ipod2.bin loader.bin
NOTE: -3 is required in make_fw only for 4th generation iPods.

Once this is done, we can copy the new image and kernel modules to the iPod:

# dd if=my_sw.bin of=/dev/sda1
# mkdir /mnt/ipod
# mount -t ext3 /dev/sda3 /mnt/ipod
# cp -r lib /mnt/ipod
# umount /mnt/ipod

For userland installation, I downloaded the iPodLinux FS and performed the following steps to install the filesystem:

Mount the iPod root partition:
# mount -t ext3 /dev/sda3 /mnt/ipod
Extract the filesystem:
# mkdir /mnt/linuxos
# mount -o loop floydzilla-2005-08-28-ipod+iboy+doom.img /mnt/linuxos
# cp /mnt/linuxos /mnt/ipod
and finally, unmount the iPod partition:
# umount /mnt/ipod
# umount /mnt/linuxos
# eject /dev/sda
And we are done! But before you start playing Doom on iPod, it needs to be rebooted.

To reboot, disconnect your iPod from the USB port. If the iPod did not automatically reboot, hold down the menu and the play buttons for 3 seconds to reboot it. After rebooting, keep the back button pressed to boot Linux, otherwise the default interface will load.

Floydzilla Movie player

Programming your iPod

The first thing required to compile "hello world" on an iPod would, of course, be a new compiler. But why a new compiler? because iPod has ARM processors and a cross-compiler is required to compile programs for this architecture. Download the compiler for uclinux from http://www.uclinux.org/pub/uClinux/arm-elf-tools/.

After the cross compiler is installed, the next thing to do would be to write a 'hello iPod' program (save the following code as hello.c):

#include <stdio.h>
int main(void){ puts("Hello, iPod!"); return(0); }

Once done, compile the program:

# arm-elf-gcc -o hello hello.c -elf2flt
copy the program to the iPod:
# mount -t vfat /dev/sda2 /mnt/myIpodSongs
# mkdir /mnt/myIpodSongs/myprogs
# cp hello /mnt/myIpodSongs/myprogs
and reboot the iPod after unmounting the partition:
# cd $HOME
# eject /dev/sda
After booting into floydzilla, goto "File browser->/mnt/myprogs" and click on the "hello" to see output of the program on iPod. Hello iPod


I am currently working for Induslogic, India. I have a Bachelor's degree in Computer Science.

I am a strong supporter of Free Software. In my free time, I write programs or read books. My areas of interest includes Device drivers, P2P and operating systems. I maintain my blog at http://www.nirendra.net.

Copyright © 2005, Awasthi Nirendra. Released under the Open Publication license unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 120 of Linux Gazette, November 2005

Life With Unix

By Mike Orr (Sluggo)


This article started percolating when Thomas asked:

I'd really love to see an article of how Unix was used in the past. Now, with PCs so cheap and popular, it's all the same method. You don't often hear of people saying they're using a dumb-terminal (unless they have an XDMCP server running.)

Yes, the terminfo database actually meant something back then. On the other hand, the multiplicity of keyboard layouts led to the infamous backspace problem in Linux. (But it's not just a Linux problem.) Anyway, here's how I found Unix, Linux, and Linux Gazette. There's also a bit on the development of internationalization (non-English support), and muse a bit on the importance of history.

The 1980s and alphabet soup

I started computing in junior high school, taking a BASIC class on Apple II's (1980). A fellow student's father had one at his office, so we met there on Saturdays and wrote our first game, a shoot-the-bird thing. Soon afterward my dad borrowed a TRS-80 Model 1 Level 2 for me to play with. 16 KB RAM. A cassette interface that never worked so I couldn't save programs. 1 Instead I left the computer on and put different programs in different number ranges. (BASIC programs had mandatory line numbers.) I immediately saw the computer's potential as a word processor, but neither model had lowercase letters. The TRS-80's manual said there was a "hole" in the video memory where the lower-case ASCII bit would have been. I didn't understand why they left out something so fundamental. Every month, Creative Computing magazine had sample programs and programming contests. (Echoing later DRM controversies, the first issue discussed a plot by the US Postal Service to regulate email. 2) Every microcomputer was incompatible; they all had tradeoffs in their graphic capabilities and BASIC features. (They were called microcomputers then. "PC" came from the later IBM PC trademark.) I never saw a PET; I saw the Atari 400, Atari 800, Amiga, and an early palmtop (TRS-80 Pocket Computer) only in stores.

People couldn't afford computers so they played video games in arcades. Space Invaders, Pac-Man, Defender/Stargate. I didn't because I vowed, "One day I will have my own computer and I won't have to put quarters into it." Then I got a computer and had so much serious stuff I wanted to use it for that I didn't have the patience to learn games. But I have to say, the best game was Defender/Stargate because the spaceships would explode to the edges of the screen, then later unexplode at the start of a new round.

In high school (1982) I convinced my dad to get an MTU (Micro Technology Unlimited) computer after a rave review in a magazine. [Picture] It cost around $3500, and had 64 KB RAM. The operating system was CODOS ("Channel-Oriented Disk Operating System"). By "channels" it meant file descriptors, borrowed from Unix. It had programmable fonts, sideways text in the graphics API, and GRIN ("GRaphic INput", meaning you specified a pixel by moving a screen-wide crosshair with the arrow keys). Neat toys, but ultimately not useful for much. Eventually my dad sold it to his girlfriend, who did PR at Microsoft in the early days. She loved the MTU and its word processor, especially the function-key legends at the bottom of the screen.

Then the IBM PC came out. Its BASIC had many more features than any of the others. I'd go to the computer store and read the manuals and imagine programming it. Then the Macintosh came out in 1984 and blew our socks off. A word processor that actually showed you the fonts live onscreen. Cute little icons, draggable folders. In college I borrowed time on my friends' Macs to write my papers. My dad bought an IBM XT for work, but I didn't use it much until later.

In 1987, my second year of college, I took two programming classesi, both using Modula-2 on VAX/VMS mainframes. We wrote programs on h19 terminals using an editor called h19. The boring terminals were hardwired to one mainframe; the interesting terminals had a text menu of computers you could log into. Dialing in from home you also got the menu. I soon discovered email and phone (a split-screen chat program). Those blew my mind; I immediately saw the power of networking and databases. I could write to somebody in Iran and get a reply in a few minutes. For the next several years I tried to convince my dad to get an email account for his business, but he never saw the point. Online services consisted of dozens of local bulletin boards, CompuServe and a few others, and the BITNET the universities used. There were Internet gateways between the mail networks by that point, but CompuServe charged 10c/message for foreign email. There was one Unix computer (blake) on the campus network, but nobody I knew used it. Unix was just one more thing in the alphabet soup of systems.

In 1989 I graduated (in Speech Communication) and inherited my dad's XT. He was selling medical insurance plans (or what are now called medical savings accounts) to companies, and had me test the proposal/administration program his programmer was writing (in BASIC). He wanted to give away stacks of floppies with the proposal program at banks as a way to recruit customers. The program gave a rate quote for the client's company size and employee profile (e.g., how many with children). Later he wanted it to compare our rates with plans from the various insurance companies, to give the public greater knowledge and choice. It would have been a perfect application for the Web, but the Web didn't exist yet.

The 1990s and Unix

In 1990 the Mac Classic came out, the first cheap Macintosh at $1090. My six-year dream of owning a Macintosh became a reality. But the following summer I bought a huge book on AT&T Unix and thought it was the bomb. Everything that DOS did badly, Unix did well. To practice Unix, I got a dialup shell at a bulletin board running XENIX. It had Usenet via UUCP. In Usenet messages I heard about this wonderful thing called FTP that was download heaven, but you had to be directly on the Internet to use it. Only universities and a few large companies had Internet access. So I connived to get a job at the university, where I could use the labs and get paid too, rather than me having to pay tuition. I got a filing job at one company, which lead to a data entry job (using a horrible IBM mainframe program that looked so primitive). Then a data entry job opened up at the university, or rather at the large hospital it's affiliated with.

I got a second book about Unix called Life With Unix (1989: Prentice Hall, out of print). It was a humorous look at the Unix culture and philosophy, with lots of interesting trivia. I'd recommend it if you can find it. This article is titled "Life With Unix" in its honor.

I started that job in November 1991, and a week later learned about Linux in a Usenet message. Talk about a Christmas present. Linux was at version 0.6. There was a boot disk and a root disk, but no user accounts. I wanted to run Linux so badly but I didn't have a 386. My friend installed it, said you couldn't do much with it, and erased it. The next year I sold my Mac for $150 and bought a 486/66 for $2000.

Meanwhile at the university, there was now a general student computer, a Sequent/DYNIX (milton). Unix denizens used the cooler DEC/Ultrix (hardy), a BSD variant, especially for CPU-intensive compilation. There was also an AIX computer. The VAXen were still online for the engineers. The h19 terminals had been replaced with NCD X-terminals. I thought their high-resolution color screens were a ridiculous waste of money. The terminals came with a built-in window manager (Motif) and a menu to telnet into the frequently-used hosts, each in an xterm window. This was the University of Washington, so Pine was encouraged. Everybody read their mail via telnet/Pine. But you could do xdm login to one of the Unix machines and get a graphical login screen and twm. That's what the cool people did. The tradeoff was it took more CPU time on the host, so after eight hours you got nice'd and things slowed way down. Most of what is now blogs and chatting and eBay was done on Usenet. "The Net" meant the Usenet community. I'd go down Friday evening to "read news" and get home Saturday afternoon. We didn't really use the GUI at all except to set the background image and run a clock. A few people played MUDs.

I put Linux on my shiny new PeeCee in 1992, first the MCC Interim distribution, then Slackware. xfree86 wasn't stable yet and I despaired it ever would be. I almost bought BSDI Unix which did have an X-server, but the $1000 cost daunted me.

My hospital job went from data entry to database (FoxPro), and then workstation support (Windoze). In 1995 I got a better PC which I tried to put the new version of Slackware on, but it kept segfaulting at random moments. I cursed Slackware and asked a colleague which distribution was most reliable. He said, "Red Hat, because they actually test their distribution." Red Hat had just come out; it was the first commercial distribution. But I switched to Debian instead because of its community development process; I planned to become a developer. Later when I tried to compile a kernel, the segfaults came back, and I finally traced them to bad memory. So it wasn't Slackware's fault after all, but I had already switched.

I dreamed of getting a job using Linux. For years that was unrealistic; everybody wanted Windows. By 1996 it was starting to seem possible, then in 1997 it happened. I got a sysadmin/tech support job at a small ISP, and installed Slackware on 386s to function as wireless routers. The computers came from the Boeing surplus store for $50 each. The ISP owner made a deal with "friends in high places", giving them a free T-1 equivalent in exchange for putting a microwave antenna on their roof and a router in their attic. The other servers were a mixture of BSD (dns), HP-Apollo (mail), and NT (ppp). I left after a couple months and returned a year later (1998), and the 386's were still being used. But there were some dozen dead ones. My job was to move parts around to get some of them working. Some had pre-IDE drives, a protocol called RLL, but Linux detected them just fine. :) Yet only two or three computers were usable. So one glorious day I put ten 386's in the dumpster. The next day, the owner went to the Boeing surplus and got ten more $50 computers. This time they were 486's with more recent peripherals. Good for me; it meant they were more reliable.

I learned at that company there's such a thing as being too cheap. We sysadmins couldn't get the equipment we needed. The owner was determined to squeeze the last bit of life out of the ancient HP-Apollos with their esoteric Unix interface. The network was practically held together by duct tape. My co-sysadmin said, "I can hear the servers groaning at night and I'm worried." The dialin server was NT. I wasn't sure I wanted to work for a company I couldn't recommend to my friends, so I quit.

My programming hobby had gone from BASIC to C to Perl to Access BASIC. Then Java appeared in 1997 and I believed the hype. But Sun wouldn't release a JDK for Linux, and the third-party Blackdown clone looked like it would always be a year behind Sun's version. I learned about Python in a Java newsgroup, jumped ship and never looked back. The more I used Python, the more I liked it, similar to how I'd found Linux.

In 1999 I got a job at Linux Journal (SSC) as webmaster. Marjorie Richardson was editing Linux Gazette, and it was taking every last weekend of the month -- difficult when you have a family. She gladly turned it over to me so she could "have her weekends back". I knew about LG but had never read it much, preferring to have my information indexed (everything in its place) rather than random (as the 2-Cent Tips are). There was no Answer Gang, just Jim the Answer Guy and Heather the Editor Gal. We formed The Answer Gang to share the load, and later made the TAG Knowledge Base and improved the LG search engine.

I started using KDE at SSC, since it was the office standard. For work it's better to have everything you might need under the menus, rather than scrounging around to find and install a program. Eventually I switched from FVWM to KDE at home too.

The 2000s

By 2000 the Linux bandwagon was in full swing and I heard all about it as LG editor and overhearing the LJ editorial staff. If you look at the News Bytes column in LG around 1998-2000, it was full of press releases from companies. This was necessary in the early years to promote Linux and help struggling companies, but eventually I got tired of the marketroid hype. How can every company be "the leading" one in its field? Then Dmitry Sklyarov got jailed for writing a decryptor for Adobe's eBook format, and I started putting political analysis in News Bytes (first article) and cutting out the press releases. Then Mick Conry took over News Bytes and kept the focus on analysis and nonprofit activities, also bringing a European perspective.

Seeing the press releases and LinuxWorld conferences burned me out on the Linux advocacy role. Others were doing it; I didn't need to anymore. Linux became just the environment I compute in, not a crusade.

In March 2001 there was an article in the newspaper about Microsoft not meeting its stock expectations. I considered it minor; stock prices move up and down all the time. But incredibly, it precipitated a selloff that became the dot-com crash. "Are these investors idiots?" I thought. "First they buy stock way above the companies' asset value, then they dump it on minor news."

In 2003 I was laid off from SSC. I wanted to get out of sysadmin and take a break from programming. I thought about technical writing. But then one Python job came up and then another, and I couldn't turn those down since they're so fun.

Last summer I switched from Debian to Gentoo, which is what my computer is running now.


Internationalization was held back mainly by hardware. ASCII (1967) predated microcomputers, but it took years to become fully implemented on them. The Apple II had the most complete set, including []|, which it flaunted in the computer's name (Apple ][) and command prompt (]). But it did not have lowercase letters.

The TRS-80 had four arrows instead of []|. It also had no Ctrl key, so you couldn't type control characters from the keyboard. You had to use the CHR$(n) function to display them. A few characters could be displayed only by POKE'ing them into video memory. The high-bit characters were block graphics (a 2x3 grid with every combination of "pixels" lit). The PSET command lit a certain pseudo-pixel by mapping its x,y coordinate and its five neighbors to a Tetris-like character. This trick allowed you to mix text and graphics, which the Apple II didn't do except as a split screen. The TRS-80 model II had a second character set, Japanese kana.

The Apple II used the high bit for inverse video. Keyboard input came in via a reserved memory location, and the high bit indicated there was a new character waiting. So the high bit was "wasted", not usable for distinct characters. (The Apple II also used reserved memory locations for many other purposes. For instance if you PEEK a certain address, it would switch video modes. Addresses were signed 16-bit integers, so many reserved addresses were negative. More trivia about Applesoft BASIC is in the FAQ.)

The IBM PC put western European characters in the high-bit space, hooray! But to input them you had to hold down ALT and type the numeric code, which meant you had to memorize them or carry a chart around. As if! The characters chosen were a seeming hodgepodge: OK for Spanish and German, lacking capitals for some accented letters, and who uses a y-umlaut? This character set conformed to no standard, making it useless for data interchange or archiving except with other DOS PCs. When IBM and Microsoft started marketing DOS in non-English speaking countries, they created character sets ("code pages") for the local languages, Macintosh had its own character sets, Russian had its own homegrown KOI-8 character set, and there was also the international standard (ISO-8859-n). So it was quite a mess.

But all these 8-bit character sets had a fatal flaw: you could use only one language family in a document. Since all character sets inherited ASCII you could mix English and French, or English and Russian. But you couldn't mix Russian and French unless you ASCII'fied one of them. Don't even think of making a Russian-Arabic dictionary. And depending on hardware limitations, you could only display one character set on the screen at a time anyway.

Unicode attempted to fix all these flaws by making a combined character set covering all the world's alphabets. But software and libraries had to be rewritten to recognize multi-byte characters. This took years under Linux and is still not complete. You needed Unicode fonts, libraries to encode data to UTF-8 (the ASCII-friendly interchange format), standard labels for the encodings, sorting algorithms, and Unicode-aware text editors. The latter was the hardest part, especially if you had an affection for an existing editor. The switch from console mode to X-windows was also necessary, because the PC text console cannot use multibyte character sets.

Conclusion: the value of history

It's always good to look back and see, not just what people did but what their assumptions and goals were. I was born in 1966, and grew up thinking the 1950s were the pinnacle of suburban achievement, as homogeneous as Leave It to Beaver. Then I read Philip K Dick, a postmodern author who belonged in the 60s revolt but he was writing in the 50s. So the cracks in the American dream were already apparent; people were just in massive denial. Then you look at the physical layout of 50s houses. People were so proud of their suburban houses with the latest convenience appliances. But the houses were tiny: I visited a 2-bedroom house a family grew up in, and it wasn't much bigger than my studio apartment. One-car garages. Two electric outlets per room. (What do you need to plug in besides a lamp?) Five TV channels, all black and white. Phonograph records. Two radio dials: volume and tuning. Yet a lot of people were very happy with all that; they thought it was much better than before.

In the early 90s, Linux World Domination was just a farfetched dream. We fretted about whether xfree86 would even run. Instead of the Web there was the phone book. Life was slower. You mailed in a resume (all nicely formatted on thick cream-color paper), got a call on your answering machine, called back the next day. Now you e-mail a text resume and if you don't answer your cell phone immediately, the job goes to somebody else. These things happen so gradually we don't realize how much we've changed, and we can't even remember what we used to think.

The dot-com bubble was similarly seen as the pinnacle of the technological boom. People read about Linux in the newspapers. You had to have a .com after your name or you were nobody, even if you were a hair salon or supermarket. Neighborhoods gentrified and became boutiques. Then the crash came and things pulled back. Domains expired. Apartments became affordable again (sort of). The Linux hype vanished.

But Thomas Fridman argues in The World is Flat that the greatest leap of computerization and globalization actually happened after the crash. In spite of the disillusion with online pet-food shopping. In spite of the antiglobalization protests. Linux is no longer hyped, but it has become commonplace. Companies know what Linux is, and they're more willing to accept it if it gets things done. Linux has become deeply rooted in governments, schools, and software engineers outside the US. Much to the chagrin of SCO and Sun, Linux has become the standard against which other Unixes are measured. If a company ports software to Unix, it ports it to Linux first. That is, if it didn't develop it in Linux in the first place. So there is a lot happening behind the scenes now, it's just quieter.



David Keil's TRS-80 emulator for DOS comes complete with a virtual cassette device. Its manual page is a total hoot. "Because the virtual cassette works exactly like a real cassette it takes the same amount of time to CSAVE a file in the emulator as it does on a real TRS-80. So now, not only can you run cassette based programs with the emulator you can also experience the incredible speed of cassette based I/O." Tapes are stored as *.CAS files. The emulator has a baud-rate control and motor on/off switch. To provide a more realistic experience, the emulator does not force these to correct values; instead it will happily read gibberish if you set the baud rate wrong, or overwrite the next program if you forget to turn the motor off. You can also connect a real tape recorder to your sound card. And if you don't have a sound card, don't worry. You can save the program to a WAV file, and load WAV-programs created by regular sound utilities! I wonder what Barry Manilow's "Copacabana" would do to a TRS-80?


"Two main views were heard [at the Electronic Mail & Message Conference], though there are several more. One was the idea that electronic mail is in some sense a simple replacement of paper mail, which the Post Office speakers seemed to think. The other view sees 'electronic mail' as just one fact of the coming world of transmissive computing in which a lucky few already live.... A surprising political issue surfaced at the conference: the role demanded by the U.S. Postal Service in a new world they claim to understand but may not. What the Postal Service wants to do might narrow and restrict what you can do in the future with your computer. [Original article]

picture Mike is a Contributing Editor at Linux Gazette. He has been a Linux enthusiast since 1991, a Debian user since 1995, and now Gentoo. His favorite tool for programming is Python. Non-computer interests include martial arts, wrestling, ska and oi! and ambient music, and the international language Esperanto. He's been known to listen to Dvorak, Schubert, Mendelssohn, and Khachaturian too.

Copyright © 2005, Mike Orr (Sluggo). Released under the Open Publication license unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 120 of Linux Gazette, November 2005

A $10 Linux Answering Machine

By Bob Smith

A Linux telephone answering machine

Architecture of a Linux Telephone Interface
Install Drivers and Libraries
Select and Install the Softmodem
Next Steps ...


This article describes how to build a Linux-based telephone answering machine using a low cost winmodem (softmodem) for the telephone interface. We describe how to install the drivers and libraries, and how to select and install the proper modem card. Our answering machine program is a couple of hundred lines of C code in a single file. If you've ever used a telephone you should have no trouble understanding the code.

The requirements for the project are:
- An Intel 537-based modem (softmodem)
- A PCI slot that does not share interrupts

Intel 537-based modems are readily available for less than $10. The driver we are going to use requires the Intel chip, so be sure you have the right modem before starting.

Architecture of a Linux Telephone Interface

Architecture of a Linux Telephone Application Our answering machine uses drivers and libraries which are a part of the Asterisk open-source PBX. Asterisk can work as an answering machine, but Asterisk is huge and has a steep learning curve for installation and configuration. The uncompressed Asterisk package is over 16 megabytes, well in excess of our 5 kilobyte source file. The overall architecture of our answering machine is shown in the attached diagram.

The driver for the modem card is the wcfxo module. This interfaces to a higher-level driver called "zaptel". The division of the driver into two pieces helps the Asterisk developers minimize how much code they need to write for new types of PC telephony interface cards. The zaptel driver delivers a 64 Kbps stream of mu-law samples to the user space application. Zaptel also has IO control routines (IOCTLs) to go on-hook, off-hook, and to indicate that the phone line is ringing.

The Zapata library (libzap) processes the 64 Kbps stream of data to extract caller ID and DTMF signals. The competence of libzap is why our answering machine application is so simple.

Our answering machine is pretty minimal as telephony applications go. It extracts and displays the caller ID information for incoming calls. If the phone rings more than four times, it answers the phone and plays a greeting. The greeting message asks the caller to press '1' to leave a message. Having the caller press a button eliminates messages from so called "bulk dialers". Voice mail is left as mu-law-encoded data in a file with the date and time encoded into the file name.

Install Drivers and Libraries

Our answering machine requires the zaptel drivers and the Zapata library, both of which are available from the Asterisk web site.

Installing the Drivers

Two drivers, wcfxo and zaptel, are required. Both are in the zaptel package. You can get to the package from the Downloads link on the Asterisk home page or you can get it directly from Digium which hosts the download site.


Untar the file, do a 'make linux26' and a 'make install' (as root). If you are using udev, be sure to follow the directions in README.udev. Specifically, you need to add the following lines to your /etc/udev/rules.d/50-udev.rules file:

KERNEL="zapctl",     NAME="zap/ctl"
KERNEL="zaptimer",   NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo",  NAME="zap/pseudo"
KERNEL="zap[0-9]*",  NAME="zap/%n"

I run the answering machine as myself so I've added the following line to the udev permissions file (/etc/udev/permissions.d/00-udev.permissions):


The final piece of zaptel configuration is to tell it that we have one interface to the telephone "central office". Edit /etc/zaptel.conf and add the following line to the end:


If you don't live in the US, you should should make one other change to zaptel.conf. You need to uncomment the line with your country code and make that country code the defaultzone.

Installing the Zapata Library

The Zapata library is no longer used by Asterisk, so it has been relegated to the 'old' directory on the download site.


Untar the file, do a 'make' and a 'make install' (as root). The Zapata library does not need any configuration.

Select and Install the Intel Modem

As mentioned above, you need to be sure to get an Intel 537-compatible modem. These modems should be easy to find and should be relatively inexpensive.

To call it a "modem" is not quite correct. It is really more of a "phone line interface". Its 64Kbps stream is 8000 bytes per second, which the wcfxo/zaptel driver delivers in 8 byte chunks. This means a thousand interrupts per second! It is the interrupt load that makes installing the modem card a little tricky. You need to install it in a PCI slot with an interrupt that is not shared by any other device. Check the documentation for your motherboard to find which interrupts are used for which slots and how those interrupts are used by the internal peripherals. If you are very unlucky, you may find that the interrupt for every slot on your motherboard is shared and used. You can try disabling internal peripherals but wcfxo just won't work on some motherboards.

The other, less common problem is that the wcfxo driver does not recognize your modem. To fix this you need to edit the wcfxo_pci_tbl table near the bottom of wcfxo.c in the zaptel build directory. Use 'lspci -nv' to get the needed vendor ID, product ID, and subsystem ID. The following vendor, product, and subsystem IDs are already recognized by wcfxo:

 - e159:0001 8085
 - e159:0001 8086
 - e159:0001 8087

System Check-out

If you've completed the hardware and software installation, you can verify your system with a few commands. Install the modules and examine the resulting syslog output.

#modprobe zaptel
#modprobe wcfxo
#tail /var/log/messages
Sep 18 23:30:41 kernel: Zapata Telephony Interface Registered on major 196
Sep 18 23:30:51 kernel: PCI: Found IRQ 5 for device 0000:00:0b.0
Sep 18 23:30:51 kernel: PCI: Sharing IRQ 5 with 0000:00:07.5
Sep 18 23:30:51 kernel: wcfxo: DAA mode is 'FCC'
Sep 18 23:30:51 kernel: Found a Wildcard FXO: Generic Clone
Sep 18 23:30:51 kernel: Registered tone zone 0 (United States / North America)

Don't worry about the "Sharing IRQ 5" log message. This reports that the IRQ can be shared but does not imply that another Linux device is using it. An lsmod should show the following three modules:

# lsmod
Module                  Size  Used by
wcfxo                  10848  0 
zaptel                185572  3 wcfxo
crc-ccitt               1664  1 zaptel

Verify that the wcfxo driver is generating a thousand interrupts per second and that it is not shared with any other devices:

cat /proc/interrupts; sleep 10; cat /proc/interrupts

The wcfxo entry in /proc/interrupts should be on a line by itself, and the interrupt count should have gone up by ten thousand during the above 10 second sleep. If wcfxo is not on a line by itself, you need to move the modem to another PCI slot. Specifically, you want something like this:

5:   3003856        XT-PIC  wcfxo
not something like this:
9:         0        XT-PIC  uhci_hcd, uhci_hcd, wcfxo

The zaptel driver includes a utility to view the driver configuration. Use it to verify that it has one interface. If this fails, check the fxsks=1 line in the configuration file.

# ztcfg -v

Zaptel Configuration

1 channels configured.

Installation and Use of the Answering Machine

The code for the answering machine is in a single C file which is available here. Compile the program with the command:

gcc -lzap -o answering_machine answering_machine.c

Run the program with the command:


The program expects to find an 8 KHz mu-law-encoded greeting message called "leave_a_msg.ul" in the working directory. You can record the greeting using any tool you like and then convert the WAV file to mu-law using sox. The command is:

sox leave_a_msg.wav leave_a_msg.ul

Sox interprets files with the .ul extension as mu-law-encoded audio at 8 KHz. You can hear your voice mail by using the play command. For example:

play 2005_09_22_13_30_22.ul

Code Review of the Answering Machine

The hard work in the answering machine is done by the Zapata library. It does the caller ID, DTMF tone detection, and reads and writes mu-law audio files. Here is the skeleton of the code in the answering machine:

  zp = zap_open("/dev/zap/1", 0);

  while (1) {
    /* Wait for a ring and get caller ID info */
    zap_clid(zp, cidnumber, cidname);
    { Display caller ID to user.  Do logs or black list checking here. }

    /* Wait for an additional RINGS-1 rings before answering */
    zap_waitcall(zp, (RINGS - 1), ZAP_OFFHOOK, TM_OUT/1000);

    /* Tell Zapata that we want DTMF digits */
    zap_digitmode(zp, ZAP_DTMF) && zap_clrdtmf(zp);

    /* Play our outgoing message.  Abort on DTMF or hang-up. */
    zap_playf(zp, "leave_a_msg.ul", ZAP_DTMFINT | ZAP_HOOKEXIT);
    { Continue if caller hung up }

    /* Wait up to TM_OUT ms for the caller to enter a DTMF digit */
    zap_getdtmf(zp, 1, (char *)0, 0, 0, TM_OUT, ZAP_HOOKEXIT);
    { Hang-up/continue if time-out and no DTMF digit. }

    /* Get the DTMF digit the caller entered.  Hang-up if wrong digit */
    pDigits = zap_dtmfbuf(zp);
    { Hang-up/continue if caller entered wrong digit }

    /* Save voice mail to 'date_time' file. */
    zap_recf(zp, date_time, 0, ZAP_BEEPTONE | ZAP_SILENCEINT);

    /* Done with message.  Hang-up and wait for next call. */
    zap_sethook(zp, ZAP_ONHOOK);

The above code should give you a feel for how to write telephony applications using the Zapata library. The library also has routines that you can use to make outgoing calls and to help make conference calls.

Next Steps...

For a simple answering machine, this program works surprisingly well. Its simplicity is its best feature.

If we were to add features to the answering machine, we would probably add:

The Zapata library uses blocking IO, making it a little difficult to use a select() loop to manage a user interface while waiting for incoming calls. Perhaps a threaded application could step around this problem.


Bob is an electronics hobbyist and Linux programmer. He is one of the authors of "Linux Appliance Design" to be published by No Starch Press.

Copyright © 2005, Bob Smith. Released under the Open Publication license unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 120 of Linux Gazette, November 2005

Using the GNU Compiler Collection

By Vinayak Hegde

Introduction to GCC

The GNU C compiler is an integral part of the GNU system and was initially written by Richard Stallman. At first it only compiled C code. Later a group of volunteers started maintaining it and GCC gained the ability to support different languages such a C++, Fortran, Ada and Java. It was then renamed to GNU Compiler Collection to signify this change. In this article we shall look at mainly the C language compiler.

GCC is not only available on Linux but also on other Unix-like systems such as FreeBSD, NetBSD,OpenBSD as well as on Windows via Cygwin, MingW32 and Microsoft Services for Unix. It supports a wide variety of platforms such as the Intel x86 Architecture, AMD x86-64 ,Alpha and SPARC architectures. Due to this versatility of GCC, it is often used for cross compiling code for different architectures. Since the GCC source code is available and modular, it can easily be modified to emit binaries for obscure or new platforms, such as those used in embedded systems.

Basic compilation options

If GCC is available on your system, you can give the following command to see with what options it has been compiled with.

Command 1 - GCC specification and supported functionality
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr \
--with-local-prefix=/usr/local --infodir=/usr/share/info \
--mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada \
--disable-checking --libdir=/usr/lib --enable-libgcj \
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib \
--with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.3 (SuSE Linux)

This gives a lot of information about GCC. You can see that the POSIX threading model is supported by this version so you can compile multi-threaded applications with it. It can also compile code written in C,C++,Fortran-77, Objective C, Java and Ada. Notice that the C++ include path is also specified, and that Java code can be compiled to native binaries with libgcj.

Let us write a small C program with a header file to see the various compilation options GCC supports.

// helloworld.h
#define COUNT 2

static char hello[] = "hello world";
// helloworld.c
#include <stdio.h>
#include "helloworld.h"
int main()
    int i;
    for(i = 0;i <= COUNT; i++)
        printf("%s - %d\n",hello,i);
    return 0;

To compile the helloworld program to an object file we can give the command

Command 2 - Creating an Object File
$ gcc -v -c helloworld.c
...[output snipped]
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 \
-D__GNUC_PATCHLEVEL__=3 helloworld.c -quiet -dumpbase helloworld.c -auxbase helloworld \
-version -o /tmp/ccHmbDAJ.s
GNU C version 3.3.3 (SuSE Linux) (i586-suse-linux)
        compiled by GNU C version 3.3.3 (SuSE Linux).
GGC heuristics: --param ggc-min-expand=42 --param ggc-min-heapsize=23825
#include "..." search starts here:
#include <...> search starts here:
End of search list.
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/as -V -Qy \
-o helloworld.o /tmp/ccHmbDAJ.s
GNU assembler version (i586-suse-linux) using BFD version
20040303 (SuSE Linux)
Command 3 - Creating an Executable File
$ gcc -v -o helloworld helloworld.c
...[output snipped]
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker \
/lib/ld-linux.so.2 -o helloworld /usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../crt1.o \
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../crti.o \
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/crtbegin.o -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3 \
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/lib \
-L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../.. /tmp/ccUyu9EA.o -lgcc \
-lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i586-suse-linux/3.3.3/crtend.o \

From the above output, we can see that gcc calls cc1 which is the actual C compiler to generate a assembler file called ccHmbDAJ.s. This is a randomly chosen name and this file is deleted after compilation is over. You can also see in what order the different include file paths are searched. We can modify the search paths for the include files by using the -I option and the library search paths by using the -L option. See the info ($ info gcc) pages for more information on these options. The temporary assembler file created is then passed onto the GNU assembler (as) which processes the file and generates binary code for that particular platform. The process stops here for the object file (command 1).

When creating a executable file an extra step is involved - Linking. From the output of command 2 we can see that file is dynamically linked with the libraries (note the usage of -L option here as well). collect2 is a utility which sets up the initialization routines and eventually calls ld to perform the linking to create the executable.

The role of the Preprocessor

The preprocessor is an important part of the C compiler. All the preprocessor directives start with a '#' (hash) sign. It processes the different preprocessor directives such as #define, #include, #ifdef, #pragma and #undef. As the name suggests, the preprocessor runs before the compilation of the program begins and processes the various directives to produce code ready to be compiled by the C compiler. It is possible to define fairly complex macros using the directives which can make the code more readable and reduce complexity. But sometimes it is possible that the complex macros are not getting expanded as we think they are. Also if some of the include files have the same name, it is possible that the wrong include file is getting picked up and causing compilation errors or causing odd behavior in the executable. The -E option can be used in such cases so that we can get the preprocessed output as the compiler sees it. we can reuse the example above to see the preprocessed output that the compiler produces.

Command 4 - Preprocessed output
$ gcc -E helloworld.c > helloworld.c.preprocess
Command 5 - Expanded Macros (#define)
$ gcc -E helloworld.c -dM | sort | less

Command 4 will produce a large preprocessed file with all the included files and all the expanded macros. You can open the file in your favorite editor and take a look at it. This the C source the C compiler looks at. When I ran the above command on my desktop machine it produced 455 lines of output excluding whitespace. Command 5 shows all the #define'd macros after sorting them. It is also possible to define macros on the compilation command line. For example see the output of Command 2 where __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ are all defined as 3 as the GCC version used for compilation is GCC 3.3.3

Generating output in Assembly language

GCC converts the C code into assembly language before converting into binary code. In some instances you might want to look at the code generated or tweak it for performance reasons before finally converting into binary code. You can do it using the following command.

$ gcc -S helloworld.c

The output generated is as follows:

        .file   "helloworld.c"
        .type   hello, @object
        .size   hello, 12
        .string "hello world"
        .section        .rodata
        .string "%s - %d\n"
.globl main
        .type   main, @function
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        andl    $-16, %esp
        movl    $0, %eax
        subl    %eax, %esp
        movl    $0, -4(%ebp)
        cmpl    $2, -4(%ebp)
        jle     .L5
        jmp     .L3
        subl    $4, %esp
        pushl   -4(%ebp)
        pushl   $hello
        pushl   $.LC0
        call    printf
        addl    $16, %esp
        leal    -4(%ebp), %eax
        incl    (%eax)
        jmp     .L2
        movl    $0, %eax
        .size   main, .-main
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.3.3 (SuSE Linux)"

From the output above, we can see that hello is defined as the string "hello world". It is read-only data as we have defined it as static. main is the only global function. The .LC0 section show the parameters for printf. These are then pushed onto the stack before printf is called in the main loop (.L5). The .L2 section has the code for checking the conditions for the for loop. The .L3 section contains the cleanup routines after the function has exited. The generated humanly-readable assembly language output can be changed before being compiled into binary code by using as (the GNU Assembler) and then linking it with the libraries.

Conformance and warning options

GCC has it's own extensions to the C standard. These extensions are used by many GNU programs as well as other software including the Linux kernel. These extensions may not be available with other compilers on other platforms. So if you want to write portable code, you might want to use the -ansi option. Using this option along with -pedantic option will ensure that any code that in no conforming to the ISO C standard will be flagged with a warning. Also it is possible for us to specify what standard we want to adhere to using the -std= option. Standards supported by this option include the ISO C89 standard (-std=c89), the more recent ISO C99 standard (-std=c99) and the ISO C++98 standard (-std=c++98).

Also it is always a good idea to turn some common warnings on, using -Wall option. But -Wall does not turn all warnings on. So it is a misnomer. Some of the other useful and common warnings which you might want to enable are -Wstrict-prototypes and -Wmissing-prototypes (warning if prototypes are not defined or defined improperly), -Werror (which turns all warning into errors) and -Wunreachable-code (if the compiler finds that a block of code will never execute).

Generating Makefile dependencies

make is automated building tool which is used for building large number of files in a C project. It will be covered in a later article in this series. If you have (say) 1000 files in a project, and you change just 1 or 2 files to fix a bug, you need not build the whole project again. You can specify what files are effected by the change by specifying dependencies and only those files will be recompiled. You can use GCC to generate these dependency lines. Take a look at the example below.

$ gcc -M helloworld.c
helloworld.o: helloworld.c /usr/include/stdio.h /usr/include/features.h \
  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stddef.h \
  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
  /usr/include/bits/typesizes.h /usr/include/libio.h \
  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
  /usr/include/gconv.h \
  /usr/lib/gcc-lib/i586-suse-linux/3.3.3/include/stdarg.h \
  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \

This nifty little trick can save a lot of time when you are working against a stiff deadline.

Using library code

If you are developing a library for use by other programmers you need to use the -fpic option to generate Position Independent Code (PIC). When an executable is created certain offsets of functions and data are hardcoded into it. For a library, this is clearly not an option since library code has to be independent of hardcoded location offsets - the library code will eventually be linked into the executable (dynamically or statically). Also if you have a component which needs to be linked with multiple executables, you need to use the -shared option of gcc. This option is used mostly along with -fpic option to create shared libraries.

On most systems, the default behavior of gcc is to link dynamically. This can create problems if you do not want to distribute the shared library along with the executable. Also you might be in a situation where the shared library you have used on your system is not readily available. In such situation we can statically link the executable so that the library code need not be separately provided. But use this option with care as it will increase the size of the executable by quite a bit. The command option to statically link the output in gcc is (predictably) -static.


In this article we have seen a small overview of how gcc can be used to generate binaries and the various stages the C code goes through before being converted into binary code. In the next part in this series we will look at how the code generated can be optimized for a particular platform as well as options to generate debug binaries for use with gdb.

[BIO] Vinayak Hegde is currently working for Akamai Technologies Inc. He first stumbled upon Linux in 1997 and has never looked back since. He is interested in large-scale computer networks, distributed computing systems and programming languages. In his non-existent free time he likes trekking, listening to music and reading books. He also maintains an intermittently updated blog.

Copyright © 2005, Vinayak Hegde. Released under the Open Publication license unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 120 of Linux Gazette, November 2005


By Javier Malonda

The Ecol comic strip is written for escomposlinux.org (ECOL), the web site that supports es.comp.os.linux, the Spanish USENET newsgroup for Linux. The strips are drawn in Spanish and then translated to English by the author.

These images are scaled down to minimize horizontal scrolling. To see a panel in all its clarity, click on it.

All Ecol cartoons are at tira.escomposlinux.org (Spanish), comic.escomposlinux.org (English) and http://tira.puntbarra.com/ (Catalan). The Catalan version is translated by the people who run the site; only a few episodes are currently available.

These cartoons are copyright Javier Malonda. They may be copied, linked or distributed by any means. However, you may not distribute modifications. If you link to a cartoon, please notify Javier, who would appreciate hearing from you.

Copyright © 2005, Javier Malonda. Released under the Open Publication license unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 120 of Linux Gazette, November 2005

The Linux Launderette


(?)Short Launderette this month...
(?)Inside the minds of 419 scammers
(?)English lesson of the day: affect/effect
(?)Paranoia on the net
(?)Broadcast flag
(?)CSS humor
(?)No way (#2)
(?)Interview with the author of "Just Say No To Microsoft"
(?)(forw) Pascal's Wager and me

(?) Short Launderette this month...

From Jimmy O'Regan

Not because of a shortage of items, but the opposite -- there simply wasn't enough time to mark all of them up!
There is a long thread from last month and a long thread from this month though.

(?) Inside the minds of 419 scammers

From Jimmy O'Regan


(?) Frappr

From Benjamin A. Okopnik

Oh, this is fun.


It would be a rather nifty thing if you folks wanted to participate; I find myself travelling a lot, but often forgetting who's where (I was just in Chicago last week, and remembered, too late and with much chagrin, that Chris G. lives there.) A visual reminder just might be a handy thing for any of us who can't recall all the written info ("say, wasn't there a pin somewhere around here?")

Anyway, I've got my pic in there... TAG, you're it! :)

(!) [Thomas] I'm added. Note that in order for me to become visible on that map, I had to add something into the "Shoutout" box...

(?) Odd. Well, they did mention that it's beta software. Opening that API is one of the nicest (and smartest) things Google ever did.

(!) [Pete] <aol>Me too!</aol>
Where's your photo then Adam?
(!) [Thomas] I dunno, Jewel [1]. But if you look at the authors page for me, you'll see me.
(!) [Pete] Surely that's going to be half the fun, seeing if people look like how we've imagined them (apart from article contributors, where a photo was provided). :)
(!) [Thomas] Reluctantly, there is one for me.
[1] I am sure you meant "Thomas" -- but I thought I'd continue in the spirit of using your surname. :)
(!) [Pete] Lol - yep, it's been a long weekend. Cutting a long story short, I've been going through all our possessions working out who's is whose, or rather, who is keeping what. Tiring in so many ways.
Oh, and it's Jewell <--- it always amazes me how attached I am to that extra L. :)
(!) [Pete] I wish konq would work with Google Maps - it's about the only thing I have to use firefox for these days.
(!) [Jimmy] Salve! (I saw this on the Nova Roma list too[1] :)

(?) Heh. I kinda figured you'd poke your nose in there eventually - what with the Academia and all. Salve, amice, et Caius Minucius Scaevola salutem multam dicit!

(!) [Jimmy] Hmm. I was looking at this stuff earlier... Marcus Caio Minucio Scaevolae salutem plurimam dicit!

(?) [long whistle] Well *done*! 'Cept 'Marcus' isn't distinctive; the cognomen (or even the nomen, but that's sorta like saying "the McGregor") works better in private conversation.

(!) [Jimmy] Yeah, but like I said, I can't remember what I chose in the end :)
(!) [Jimmy] Damned thing doesn't understand my surname... grr!

(?) Waitaminit. Which Damned Thing? If it's a Nova Roma damned thing, then I - as the recently-invested Magister Aranearium need to know about it. If it's a Frappr damned Thing, well, fake it till you make it. :)

(!) [Jimmy] Frappr. It doesn't understand the apostrophe.
(!) [Jimmy] [1] Application still pending. There was an issue with my choice of cognomen.

(?) If you've been reading the Main List, you definitely know why. I suppose I'm lucky: all my nomina can be conjugated in proper fashion, so I'm not affected - but, oh, the tempest in the teapot...

(!) [Jimmy] Yeah... that all happened seemed to happen after I sent in my application. I can't remember what I chose in the end, and I'm not too worried either (I didn't have much input into my existing name :)

(?) That's what I've been chuckling about from the start of this. The Censores and the Latinists have taken on a hell of a load - essentially, they'll be either qualifying or picking (in most cases, IMO, and perhaps several times over) the names for every single person who joins NR. I'd offer to write something that could do basic vetting, but I've got better things to do. :)

(!) [Jimmy] I do remember that I got the thumbs up for whatever I picked second time around, just not what it was.
(!) [Sluggo] Um, if I add an entry, can I change or delete it later? It doesn't seem to have a password or any kind of "Change" button.
(!) [Jimmy] The FAQ says "Contact your Frappr admin". That would be Ben.

(?) Ah, I was wondering. The phrasing on the site was ambiguous. In any case, feel free to let me know if you want any of'em changed or deleted.

(!) [Jimmy] ...but you can change your photo by adding another "shoutout".
(!) [Brian] and lurking next to Ben I find (due to text wrapping in fun places) Jay Ashworth Saint, with Saint in gray, so it reads like
Jay Ashworth, Saint.
This presumptuous bloke is from someplace called Petersburg. Hey, wait a minnit....
Maybe I'd better worship him anyway, just in case...
(!) [Jimmy] sigh A common misconception among non-Catholics: you don't worship saints, you pray to them for their intercession on your behalf before God. Big difference :)
(I'm currently going to Church every Sunday, but only because my son is making his First Communion next Summer. If I'm gonna encourage him to celebrate Samhain...)
(!) [Breen] But if he's from a Russian city (and prolly wearing sunglasses) worship is probably only prudent...
(!) [Sluggo] And (at least in the Orthodox tradition), asking a saint to pray for you is no different than asking anybody else to pray for you. They are merely peers whose devotion to God is widely recognized, and venerating them is a traditional form of honor/respect. As to how can the dead pray for you, they are "conscious" and awaiting the judgement (viz. Revelation under the throne, "How long must we wait?"). You can pray for them as easily as they pray for you, although it's not traditionally done.
As for "Who is a saint?", it's basically the people who knew them treating them as such, and lobbying the officialdom to recognize it.
(!) [Rick] http://linuxmafia.com/~rick says: ICBM: 122.19781°W, 37.43162°N, 27.4 metreslevation (When you care enough to send the very best!)
Feed that into xearth, and lo!
(!) [Jimmy] Hmm.

See attached frappr.pl.txt

Pipe "lynx -source http://www.frappr.com/linuxgazette|frappr.pl" into xearth, and see if it works (I don't have a copy to try it myself)
(!) [Jimmy]
>                 print "$long $lat \"$name\"\n";
Damn. Should be
print "$lat $long \"$name\"\n;
and you might want to use sort and uniq on the pipeline if you're running it against other frappr maps.

(?) Didn't work for me, not sure why. I suspect that the long regex failed somewhere.

#!/usr/bin/perl -wn
# Created by Ben Okopnik on Mon Oct 31 11:03:20 MST 2005

if (/openMarker/) {
	printf "Lat: %12s Long: %12s  ", $1, $2;
exit if /marker_status/
ben@Fenrir:/tmp$ lynx -source http://www.frappr.com/linuxgazette|./frappr
Lat:   -81.299917 Long:    29.865078   Ben Okopnik, Editor-in-Chief Saint Augustine (FL)
Lat:   -1.4157985 Long:   50.9169545  Thomas Adam Southampton, England (United Kingdom)
Lat:    -0.974663 Long:    51.455809   Pete Jewell Reading, England (United Kingdom)
Lat:     11.57346 Long:    50.936322   Karl-Heinz Herrmann Jena, Thuringia (Germany)
Lat:   -7.8210065 Long:   52.6826165   Jimmy O Regan Thurles, Tipperary North Riding (Ireland)
Lat:   -82.736602 Long:    27.821921   Jay R. Ashworth Saint Petersburg (FL)
Lat:  -76.7774515 Long:   38.9807345   Brian Bilbrey Bowie (MD)
Lat:   -0.2179705 Long:   51.9105095   Neil Youngman Stevenage, England (United Kingdom)

(?) xearth -pos 'fixed 37.43162 -122.19781' -mag 10

"And lo, San Fran and the vicinity were dark with the passage of the Terminator, and the despair of inadequate resolution was upon all who viewed it."

Too bad "xearth" doesn't show any reasonable level of detail... sucks that it doesn't allow you to plug in a better database.

(?) English lesson of the day: affect/effect

From Sluggo

I had to look up affect/effect to figure out which one to use here:

"There are exercises with light weights that have the same affect|effect as calisthenics."

The meanings sounded just barely different so I looked them up.

The answer is "effect". Something that affects or effects causes an effect. Affect (noun) is a specialized term in psychology. #3 says this confusion goes back at least to the 1400s, and has an interactive quiz.

(#2 fails to note that effect (verb) is formalese. "The temperature reversal effected a major slowdown in the bacterial growth rate." Normal people would say "caused" instead. "The temperature reversal caused a hurricane.")

(!) [Ben] The distinction for me is that "effect" means "cause or accomplish", whereas "affect" is "act upon or pretend". As well, "affect" as used by psychologists isn't very different from one of the common meanings of the word: "to affect an uncaring air" is to create an external impression of an internal state. The major difference, as I see it, is that the former is involuntary while the latter is consciously created; otherwise, the meanings are similar.
(!) [Thomas] This is one of my pet-hates with English. A lot of people confuse the two, and it annoys the hell out of me.
(!) [Ben] Oh, come - there's a LOT more to hate about English than just _that._ Stupid pronunciations that have no relation to how the words are written, that's my pet peeve. "Recipe"? "Queue"? "Though the tough cough and hiccough plough him through"? Sheesh. Then there are the words that are made to be mispeled: "wierd", "tounge", "beleive", and so on - and words that damn near no one (noone?) can spell without staring at a dictionary for a while (Mississippi, miscellaneous, Cincinnati, extraordinary). And is it councillor or counselor or councilor? (The answer is, of course, "yes".) Just insane. But for those of us who like to play in the stuff, it's home. :)



Queue -- four vowels together.

Eighth -- four consonants together.

I have some friends that work at an industrial/goth club called The Vogue, and one day a promoter distributed some fliers that misspelled it The Vouge. We wondered how to pronounce that, then started calling it "The Voozh" as a joke.

(!) [Jimmy] Polish is infamous for having words with lengthy blocks of consonants: Grzegorz Brzęczyszczykiewicz[1] though 'y' is a vowel in Polish, that's still pretty scary.
[1] Yep, it's a tongue-twister. More here: http://www.alphadictionary.com/fun/tongue-twisters/index.html My favourite is the Tagalog tongue twister: Bababa ba? Bababa.

(?) Paranoia on the net

From Jason Creighton

...modern cyberspace is not the friendly, open, trusting, safe place it
was back in February. Modern cyberspace is a deadly, festering swamp,
teeming with dangerous programs such as "viruses", "worms", "Trojan
Horses" and "licensed Microsoft software" that can take over your
computer and render it useless.
                -- Dave Barry
Recently, I began using my box to connect directly (okay, it's dailup, but as opposed to being behind NAT) to the internet. So, naturally, I set up iptables to do NAT for the rest of the LAN and be fairly strict about what it accepts. (Anything going out is okay, anything coming in has to be ESTABLISHED or RELATED or else it's logged and dropped).
So when I started seeing weird UDP packets being dropped, I thought I must have my DNS set up wrong or something, because it's highly unlikely anybody's trying to get in to my system, right? Well, ulogd and tcpdump tell this story: (IP addresses censored to protect the innocent)
10:59:04.381707 IP XXX.XXX.XXX.XXX.32774 > XXX.XXX.XXX.XXX.1026: UDP, length: 469
	0x0000:  4500 01f1 0000 4000 2f11 531c ddd0 d002  E.....@./.S.....
	0x0010:  ceb7 7a55 8006 0402 01dd b0c0 0400 2800  ..zU..........(.
	0x0020:  1000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0030:  0000 0000 f891 7b5a 00ff d011 a9b2 00c0  ......{Z........
	0x0040:  4fb6 e6fc 488a 7a85 6220 f0c2 99aa 852b  O...H.z.b......+
	0x0050:  63e8 0095 0000 0000 0100 0000 0000 0000  c...............
	0x0060:  0000 ffff ffff 8501 0000 0000 1000 0000  ................
	0x0070:  0000 0000 1000 0000 4652 4f4d 0000 0000  ........FROM....
	0x0080:  0000 0000 0000 0000 1000 0000 0000 0000  ................
	0x0090:  1000 0000 544f 0000 0000 0000 0000 0000  ....TO..........
	0x00a0:  0000 0000 4101 0000 0000 0000 4101 0000  ....A.......A...
	0x00b0:  5354 4f50 2120 5749 4e44 4f57 5320 5245  STOP!.WINDOWS.RE
	0x00c0:  5155 4952 4553 2049 4d4d 4544 4941 5445  QUIRES.IMMEDIATE
	0x00d0:  2041 5454 454e 5449 4f4e 2e0a 0a57 696e  .ATTENTION...Win
	0x00e0:  646f 7773 2068 6173 2066 6f75 6e64 2035  dows.has.found.5
	0x00f0:  3520 4372 6974 6963 616c 2053 7973 7465  5.Critical.Syste
	0x0100:  6d20 4572 726f 7273 2e0a 0a54 6f20 6669  m.Errors...To.fi
	0x0110:  7820 7468 6520 6572 726f 7273 2070 6c65  x.the.errors.ple
	0x0120:  6173 6520 646f 2074 6865 2066 6f6c 6c6f  ase.do.the.follo
	0x0130:  7769 6e67 3a0a 0a31 2e20 446f 776e 6c6f  wing:..1..Downlo
	0x0140:  6164 2052 6570 6169 7220 5265 6769 7374  ad.Repair.Regist
	0x0150:  7279 2050 726f 2066 726f 6d3a 2077 7777  ry.Pro.from:.www
	0x0160:  2e72 6567 6669 7875 702e 636f 6d0a 322e  .regfixup.com.2.
	0x0170:  2049 6e73 7461 6c6c 2052 6570 6169 7220  .Install.Repair.
	0x0180:  5265 6769 7374 7279 2050 726f 0a33 2e20  Registry.Pro.3..
	0x0190:  5275 6e20 5265 7061 6972 2052 6567 6973  Run.Repair.Regis
	0x01a0:  7472 7920 5072 6f0a 342e 2052 6562 6f6f  try.Pro.4..Reboo
	0x01b0:  7420 796f 7572 2063 6f6d 7075 7465 720a  t.your.computer.
	0x01c0:  0a46 4149 4c55 5245 2054 4f20 4143 5420  .FAILURE.TO.ACT.
	0x01d0:  4e4f 5720 4d41 5920 4c45 4144 2054 4f20  NOW.MAY.LEAD.TO.
	0x01e0:  5359 5354 454d 2046 4149 4c55 5245 210a  SYSTEM.FAILURE!.
	0x01f0:  00                                       .
Looks like Windows Messenger[1] (not MSN Messenger) spam. I can only wonder what "Repair Registry Pro" does. I would guess that some of it involves send out lots of (probably spoofed) UDP packets...
[1] http://grc.com/stm/shootthemessenger.htm
(!) [Pete Savage] I myself used to pick up very similar logs, and recently a family friend of mine's boxen, got loaded with mail spoofing software. I had an email from the ISP, (I setup the account) asking if I was aware of this activity. 678 MALCIOUS objects later, and the machine was clean. Phew
Makes you wonder just how much is out there

(?) Broadcast flag

From Mike Orr

[For News Bytes]
http://lwn.net/Articles/154288 LWN writes about the broadcast flag's return from the dead (coming soon to a legislator near you), and a similar initiative in Europe (Content Protection and Copy Management: CPCM). The new proposal would give the FCC the authority to enforce the broadcast flag in TV-receiving devices and on "digital networks". This isn't quite the FCC "regulating the Internet", but it's a step in that direction that could be exploited by those who see the Internet as "one giant copying machine".

(?) CSS humor

From Deirdre Saoirse Moen

The comments are even funnier than the original post.
"Relatively positioning an elephant is easy. Good luck getting one to float though."

(?) No way (#2)

From Mike Orr

' When I took Latin in high school, we translated "amat" as you love and "amatis" as y'all love. Mind you, this was in Niceville, Florida (http://en.wikipedia.org/wiki/Niceville%2C_Florida).'
From http://en.wikipedia.org/wiki/Talk:English_grammar
(!) [Jimmy] Both my French and German teachers used 'ye' for the second person plural :)

(?) Interview with the author of "Just Say No To Microsoft"

From Jimmy O'Regan

"What lessons should the open source community learn from Microsoft's success?
Open source developers should ignore Microsoft's so-called "success" which is based on predatory business practices. They should not be afraid to take on Microsoft. This is the lesson they should learn, not from Microsoft, but from OpenOffice.org, the Linux vendors, and Google.
What would you say desktop Linux has to work on before it will have mass appeal?
Linux will gain in mass appeal as Web applications (such as Ajax-style apps) and custom applications lighten the burden of needing any traditional desktop applications that are compatible with Microsoft Office and Windows. A bit more marketing would help as well!"

(?) (forw) Pascal's Wager and me

From Rick Moen

It was just a chance, throwaway remark on Usenet, and it was eight years ago. Yet I still keep coming across people quoting it. Watch out; you might end up being famous for something freaky like that, too.

Footnote #3 is to an elaborate and very funny parody piece ("alt.Shrugged"), in which the author imagines all the regulars of the referenced newsgroup, including yr. humble correspondent, enacting roughly the plot outline of Ayn Rand's Atlas Shrugged . It should be amusing even if you don't get the plentiful in-jokes like my being infamous for dropping foreign phrases into the conversation.

(!) [Jimmy] Yeah, you get two of the funniest bits:
'Rick Moen spread his hands regretfully. "Sodomy non sapiens, dear."'
        "Andrea?"  He didn't try to put a hand on her shoulder; he knew
better than that.  "Just remember:  Nolite te bastardes carborundorum."
        She looked up in exasperation, fighting back tears.  "Rick,
_will_ you speak English for once?"
        He smiled in genuine amusement.  "Don't let the bastards grind
you down."
(!) [Jay] I've always heard that as "illegitimi non carborundum" (or, for the pedants, "illegitimati"), though of course neither is "real" Latin.
(!) [Jimmy] Hmm. On third inspection, that doesn't seem to hold up[1]: I'm pretty sure there should be an 'if' in there ('si'?). And isn't 'sapiens' think (homo sapiens = 'thinking man')? I thought 'Science' came from the Latin 'to know'.
'Learn some Latin' is one of those things that's been on the TODO list for way too long. The last time I started, I got derailed at the 'pronunciation' section[3]. I think I'll start with "Talkin' Like the Ancient Romans" (http://www.byzantinecommunications.com/adamhoward/latin.html), just because of the tagline: "Latin: Because You Never Know When You'll Find Yourself In Ancient Rome."
(!) [Ben] If you want an excellent education in Latin, Nova Roma's "Academia Thules" just started another year (the praeceptor, Avitus, is an incredibly knowledgeable Latinist, perhaps one of the top Latinists in the world.) It's free,
(!) [Jimmy] Woohoo!
(!) [Ben] although some minimal expenditure for books is required;
(!) [Jimmy] I would have expected that, given how much I've spent on Polish books so far.
(!) [Ben] I'm also given to understand that you're significantly better off if you speak French, since one of the best language references for Latin is published in that language.
(!) [Jimmy] And, um, because it's a Romance language? :)
I can't remember how to speak French beyond the basic survival stuff, but I can still read it.
(!) [Ben] Sign up at http://www.academiathules.org .
(!) [Jimmy] [1] You know: first glance = "Eh?", second glance = double take & laugh[2] (& c 'n' p), third glance = my copy of my mail.
[2] There was a Polish college student working with me this summer. I took delight in throwing in Polish words and phrases into conversation every now and again to see that reaction.
[3] See question 8 of the 'Occasionally Asked Questions' here (http://www.math.ohio-state.edu/~econrad/lang/latin.html):
"Q: My teacher says Caesar is pronounced "Kai'-sar", my priest says "Chay'-sar" and my parents say "See'-zer". Who's correct? A: It depends. If you want a good approximation of ancient Roman pronunciation, then your teacher is correct. For liturgical purposes, your priest is correct. If you're talking about Caesar in English, then your parents are correct." [4]
[4] And of course, question 9: "Q: Why do academic types always answer a simple question with "It depends."? A: It depends."


Date: Thu, 29 Sep 2005 19:16:53 -0700
Subject: Pascal's Wager and me

At the top of article <pwgVe.7612$e96.5058@trndny09>, which you crossposted
across alt.fan.bob-larson / alt.true-crime / misc.legal [1], you wrote:

   > That's very nice, but what do you presume to say to God when you
   > stand before Him at the Final Judgement?

   I will adopt Rick Moen's Strategy: "In the unlikely event of losing
   Pascal's Wager, I intend to saunter into Judgement Day with a bookshelf
   full of grievances, a flaming sword of my own devising, and a serious
   attitude problem." I'm guessing Ken will have a similar strategy.

I'm delighted to have given people ammunition in the eternal war against idiocy.

But the astonishing thing is that it was absolutely an offhand remark that I made one day in 1997 in -- of all places -- the Robert Jordan SF/fantasy newsgroup (rec.arts.sf.written.robert-jordan).[2]

That newsgroup was and almost certainly still is an amazingly literate and funny group of slightly cranky people[3], who use Robert Jordan's logorrhoeic epic fantasy series as an excuse to shoot the breeze on almost everything. Almost. We had the misfortune to suffer an invasion of "witness-bearing" envoys from the Jesus Christ Church of Latter-Day Saints -- who had somehow taken it upon themselves to straighten us out about the Book of Mormon and their church's creative approach to American paleo-history.

Their entrance and quest were entertaining for about five minutes, but then they became repetitious, tedious, and insulting to everyone's intelligence. The regulars proceeded to have a field day taking apart their archeology, their logical consistency, and their theology .

I happened to be mopping them up over religious ethics, when I dropped the quoted sentence as an afterthought. (Mind you: I have no problem with people basing their ethics on religious principle. I object only when the outcome of that process is illogical, and especially if it is both that and morally reprehensible.)

And, to my amazement, that sentence was immediately quoted... well... just about everywhere, became the thing I was best known for, for at least the following five years -- and keeps showing up. Go figure.

[1] http://groups.google.com/group/alt.fan.bob-larson/msg/194cc645875445da "Crossposts from hell, #295 in a series."

[2] http://groups.google.com/group/rec.arts.sf.written.robert-jordan/msg/934608fa971abdc7

Published in Issue 120 of Linux Gazette, November 2005