...making Linux just a little more fun!

May 2004 (#102):


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.


Firewalls for dummies, with fun examples

Wed, 28 Apr 2004 02:15:10 -0700
Heather Stern (The Answer Gang's Editor Gal)

Some of The Answer Gang have seen complaints on open forums that there is documentation for iptables and netfilter, but it is all scary and hard to read. Looking at them myself, can't blame folks for thinking this.

So, we'd like to see an article on this topic - aimed at practical examples, doing some ordinary basic types of things - but with the orindary Joe Linuxer in mind, not people who wanted to learn yet another scripting language (tm) just to know their dialup outbound won't get invaded by blue meanies seeking to "sploit" the systems on their inner network. (Other examples welcome too.)

If you think you can make putting up the defense shields "Just A Little More Fun" - check out our article submission guidelines, and then mail articles@lists.linuxgazette.net, we'd love to hear from you.


GAZETTE MATTERS


Editor retirement

Thu, 29 Apr 2004 21:15:10 -0700
Ben Okopnik, Thomas Adam, Heather Stern (The Linux Gazette Editor Gang)
Question by Mike Orr (mso from oz.net)

This is my last issue editing Linux Gazette. Ben Okopnik has agreed to take over producing LG starting in May.

[Thomas] Great! Out with the young, in with the.....

So you're all gonna DIE!!! DOOM IS AT HAND!!!

[Heather] Mike's taking some well earned time off to play computer games.
[Ben] Weren't you supposed to wait until the tranquilizers kicked in? Boy, just look at all those capitals and exclamation points; a sure sign of somebody who wears his pants on his head, according to Terry Pratchett.
(I don't care if it's an accurate reflection of reality; they still shouldn't let you out on the streets like this and scare the innocent passerby.)

Fortunately, Heather Stern and Thomas Adam have agreed to step in and "handle" Ben whenever he starts reaching for those dark sunglasses

[Heather] "Handle" hehehe. Ben keeps leaving his sunglasses in the TAG lounge whenever he's split one too many ginger beers with us in the lounge. We make sure to sneak them back into his shirt pocket when he's not looking.

and that slingshot he bought from a pirate in the Caribbean last year when his helicopter.... Oh, that's another topic.

[Ben] He certainly was a pirate. I mean, jeez - $2.00 for for a single Slingshot when a whole bottle of Cruzan rum was going for $1.70??? Robbery pure and simple, I tell ya.
   Slingshot
    3 oz. Peach Schnapps
    3 oz. Gin
    3 oz. sour mix
    dash of Grenadine

   Open a coconut, pour off all but a couple of oz. of the water. Add
   ingredients, mix, and serve.
Anyway, if you see me reaching for one, join in.

Anyway, Ben will be reading your articles and putting together the zine, and Heather and Thomas will be helping out as necessary besides continuing their jobs as TAG Editors.

[Thomas] I know I've been saying it for months, there will be articles from me. :) It's this thing called 'real life' that annoys me.

I came back to LG in October to help recreate the production infrastructure at its new webhost and to make sure it was done right. Now linuxgazette.net is established and is humming along nicely. At the same time, other priorities in my life have intruded.

[Thomas] That's to be expected. You've been doing this for a good number of years.

Python is proving to be a greater interest to me than Linux, and it has somehow become a good intersection for my work,

[Thomas] I know what you mean there - I am finding Ruby is engulfing me.

volunteer, and personal interests. I need time to study more Python packages for work, I want to play with Twisted (a versatile Internet services framework), and we're organizing a Northwest Python Sprint in Seattle in June. Plus there are some personal Python projects I've been wanting to do. Linux has become more of an environment I'm in rather than something to focus on. My next Linux project will be installing Gentoo , which two coworkers are using and recommend. It looks like it has come a long way since I looked at it last year.

I've also been reprioritizing some other things in my life. I've given up wrestling -- with my joint inflexibility I'm just not going to be able to be serious about it, and I think after two years I've gained about as much from it as I can. Now I want to get into boxing. Not really seriously, but just for fun. But first I gotta get in shape for it, and first I have to spend a month or two earning $$ like mad to get over my current cash-flow problem. So I'll have plenty to do. I'm also taking yoga more to help with the flexibility.

[Thomas] I never was one for contact sports such as boxing and wrestling. Heck, I am not even a sports fan. :) But I always did have a certain amount of admiration for people who can box.

It has been a great inspiration working with the staff and contributors to LG over the years. The amount of dedication and goodwill people put into LG is astounding.

[Heather] Awww shux. :D
[Thomas] Likewise, Mike. It has been a pleasure and indeed an honour to have worked with you. It has been a pleasure both in terms of Linux, but also getting to know more about yourself, and the culture that surrounds you. I only hope that we continue our discussions - I find them most enlightening.

When I started editing LG in 1999, I was afraid every month that not enough articles would come in. But somehow they always did. Eventually I learned to just expect it.

[Ben] [wry grin] I guess I'll just have to take that attitude over and carry on with it. It's sure seemed like an edgy proposition at times.
[Heather] For which we are all very grateful to you dear readers who decide to take up the pen... or electrons... and put your new spin on things into the shared world of Linux Gazette :)

I'm grateful to The Answer Gang, to Mick for doing News Bytes, to Javier and Shane and Jon for contributing their cartoons, and to many authors of high-quality technical articles who keep sending stuff to LG again and again. You've all shown what volunteers can do if they work together.

[Ben] Hey, it's a labor of love. We may all have our own reasons for being here, but in the end it comes down to us putting out a quality 'zine that benefits a large community; that's not small potatoes. It sure gives me a good feeling to know that our efforts help people, that LG is acting as a force multiplier for our advice, tips, and so on.
[Thomas] More importantly, we're still showing that. :) I hope you won't be leaving permenently. I hope you will still be TAG member, contributing when you can. You're always welcome. :) I read your Python article in the LJ (I actually ordered it in from America) - very impressive. I'll still stick to Ruby though. :D

Now I'll go to the TAG lounge and open a cold bubbly ginger-beer. Then I'm going home to make my favorite dish, pho and earl green tea. (That's green, not gray.)

PS. I wrote an LJ article about the Python conference in DC last month if you'd like to read it.

[Ben] Mike, it's certainly been a hell of an experience working with you all these years. We've had fun and we've been through some edgy times together, a bunch of sweet and only a little of the sour, and I'll always think of you as a friend (despite the fact that you're giving away all my secret plans, ya ratfink.)
Wherever your life takes you, you have my best wishes for the future.
[Thomas] Best of luck to you, Michael. As I say, keep in touch, and most of all, thank you. :) If you ever find yourself in England (or indeed, if I am ever likely to be in America anytime soon) be sure to let me know.
[Heather] Hee hee, if you're about to be in America sometime Thomas, you'd better let us know, we'll have a TAG meetpoint and a party.
We will miss ya, Sluggo. Hopefully not too much though - thanks for agreeing to stay on as a contributing editor, and maybe we'll see an article from you once in a while. Mike, it's been a grand time working with you, so don't be a strange... oh, alright, be as strange as you need to be, but like Thomas says, do keep in touch :D

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 102 of Linux Gazette, May 2004

More 2-Cent Tips!

See also: The Answer Gang's Knowledge Base and the LG Search Engine


Variables in Shell Scripts

Jim Dennis (the LG Answer Guy)
Question by Guy Milliron (anonymous)

Anyhow, I know it's simple, but I can't figure it out for the life of me. I use tcsh for my shell. How would I alias a command to do a CD to a directory of choice, and then automagically do an ls.

Long Hand:

# cd [directory]
# ls -lag
[JimD]
alias foo 'cd \!*; ls -lag'
... works for me. If you give it one argument that's where you are chdir()'d to. No argument and you cd ~ and get a listing of your home directory. More args and you get an error from cd; just like you'd expect from the cd command.
Note that aliases are subject to history expansion. That's why I'm using \!* --- which expands into foo's argument list whenever the foo alias is used.
Note that bash aliases DO NOT perform history expansion. Thus you'd use a shell function instead:
function foo () { cd $1; ls -lag; }
(Where either the word function or the () are hints that this is a function definition --- but both can be used, too).


Linux-kernel OS radio....

Thomas Adam (The LG Weekend Mechanic)

Hi, all.

Stumbled across this[1] and I have to say it is weird but knowing people here someone (like me!) will find it interesting, if not amusing.

-- Thomas Adam

[1] http://radioqualia.va.com.au/freeradiolinux

[laugh] Man, that is seriously whacky. I like it. Let's see, where can we slide it into LG?...
The problem is, of course, the time factor. I mean, if anybody was to listen to them and type it all in, they'd be almost two years out of date by the time they finished! - not to mention seriously sore fingers and a sleep debt the size of the US national one. -- Ben


GUIs don't fill up the whole screen

Kapil Hari Paranjape (The LG Answer Gang)
Question by JKC (anonymous)

KDE and GNOME on Linux (Topologilinux3.1.0)doesn't take up the whole display of my Toshiba 2400 laptop. Linux in text mode does take up the whole screen. How do I get the GUIs to do the same? With thanks, JKC.

[Please don't give deatils of my email address or full name but otherwise I'm very happy for this rather lame question to be posted. Thanks. JKC]

As a gentle reminder, yes gentle readers, if you want to be anonymous either as someone asking a question or offering good answers, we're fine by that - just let us know! -- Heather
[Kapil] Have a look at: http://www.thorstenhaas.de/toshiba2410
While this is for Toshiba 2410, it should also work for 2400.

Thank you Kapil.

[Kapil] You're welcome. However, ...
Please send your replies to the list rather than the person who responded to your question so that other people with similar questions can benefit from your experience.

I've had a look at the site and it has some good ideas.

[Kapil] Thorsten Hass has created this very useful site for Toshiba Laptop (Satellite) info for Linux --- perhaps this should be in LG Tips.
Ok, so we took a while getting it into the mix, but done! -- Heather

I did, however, find that the XF86Config-vesa worked (renamed to XF86Config). Seems the Toshiba 2400 likes this Vesa configuration. This config doesn't seem to have any other unwanted side effects; I copied it from the default and there doesn't seem to be any localisation issues - we'll see.

[Kapil] It is nice that "vesa" does what you want. However, note that the "vesa" configuration is not "accelerated" which means that window movement/mapping and animations will seem sluggish. Perhaps you could try one of the other XF86config files at the site and tell us (on this list) what happened.
The problem may also be with the "nv" driver and you could try out the drivers from nVidia as explained at the site.
In any case, now that XFree86 supports generic "vesa" it is certainly much easier to get a basic working GUI under Linux than it used to be---at least for newer machines.
Regards.


Equivalents

Valery V. Kachurov (xoid26 from linux-online.ru)
This refers back to the article idea in issue 93's mailbag. -- Heather

The section should specifically address the typical daily activities of the Windows user and how to configure Linux to operate like Windows.

I have a little and uncompleted table (but this is the most completed list of that kind in Internet...), with nearly the same purpose :). First column - the activity, second column - Windows way, third column - Linux way :D.

URL: http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml Descripton: The table of equivalents / replacements / analogs of Windows software in Linux.

P.S. What do you think about this project? Can anyone help to convert this page from HTML to MySQL (to put all information from table to DB)? Thanks :).


create new lilo boot loader - on 2nd drive

Hans van Buitenen (jvbuiten from wanadoo.nl)
This offers help to Geraldine Koh from LG 93, help wanted #8 -- Heather
Hi, you don't really describe how you boot from the second disk. Do you switch this in the bios?
I will just give you two hints.
In my case I use to power down and use the removable drive switch to disable the disk in the primary bay. Then the secondary starts up. I can imagine that this dous not work in all systems.
If you use lilo on the first disk to startup lilo in the mbr of the second disk then you might consider putting lilo in hdb1 and not in hdb.
Kind greetings.


How to run chat with several phone numbers

David B. Sarraf (david.sarraf from paonline.com)
In reference to LG 93, Help Wanted #5 by Joao Coelho, where I asked any ppp/chat script experts to please chime in. -- Heather

Heather:

I agree with you on this question. Use a front end. My personal favorite is diald. The documentation has an example of how to use a pool of numbers. You may not need the control that diald offers however it does solve the reader's problem.

Dave Sarraf


The Dao of Knoppix for Rescue

Heather Stern (The Answer Gang's Editor Gal)

I know that this stumps people from time to time, Knoppix itself is cool but using it for a rescue environment is a little sneakier.

First and foremost unless your idea of rescue is "find a file and ftp or scp it to somewhere else" kill the darn automounter. Run: /etc/init.d/autofs stop

Wait a few moments then make sure to use 'ps was' or 'ps fax' and make sure it is good and properly dead. Use 'kill -9' on the automounter if you have to.

Next thing is, you can use ctrl-alt-f1 or even ctrl-alt-F2 to get a prompt; over on tty1 just press ENTER and it's there already. When I'm really deep into thoughts of rescue the whole gorgeous GUI thing just gets in my way. If you'd rather stay in the GUI though, you'll have to launch konsole (or an xterm) and run 'sudo su -' ... and it won't ask a password. (That's also a warning to those of you who use Knoppix just because it makes Linux easy to show to your pals...)

Then I cd /mnt and see a gazillion (that's a technical term) hd* and sd* entries. I use e2label religiously to label my volumes, or create them with -L options so they have them; RH distros make the volumes with labels; other distros might too. So you've a pretty good chance of getting some useful answer out of this:

cd /mnt
for i in hd* sd* ; do echo -n "$i: " ; e2label /dev/$i ; done

Yeah, yeah, I know, if you use reiser or somehting that won't help, but the heartening thing is knoppix supports extra journaling fs' too, including XFS (Klaus merges SGI's XFS patches into his kernels).

I also mkdir my own mountpoint - my favorite /mnt/pt (mount point, get it?) or /mnt/t (for target) and mount my poor benighted root fs there, then read its etc/fstab for what else to mount. Then you can safely chroot in and tweak lilo, or install that important package. If you are installing packages, some need /proc mounted to behave well... and then you'll need to recall to umount /proc in there too. Don't forget to umount all this stuff yourself before you reboot.

Last but not least, if you use knoppix to do a local install, get rid of or at least properly configure that annoying little MTA smail. Almost nobody will relay newuser@knoppix and that's what your outbound mail will look like it's from if you don't do something about it. Compared to that, fending off vestiges of German configuration is more charming than troublesome :)


New version of WinMD5 for Windoze available

Ken Dodge (k.dodge from comcast.net)

Hi all,

Back around mid-April 2003 I posted a reply to a querant about md5sum's, and mentioned that I often use Ed Olson's WinMD5 on one or another of my Win boxes when downloading and burning Linux distro .iso's (got to get that Linux system up for doing that sort of thing!) Ed sent me the following message regarding my original posting, and announcing the availability of his latest version of WinMD5 (v2.0), so I thought I would pass it on. I've been using v1.1 of his program for awhile now, with no problems at all.

BTW his v2.0 requires M$ .NET Framework (preferably v1.1 or newer) installed to run. It's available via Windoze Update on Win98/2K/XT systems.

HTH - Ken Dodge

It's still the current version, it's still a nice little app, and I'm sure those of you downloading a Linux ISO to the beast of Redmond before burning your shiny new CD would kind of like to know you aren't making a coaster. So here it is. -- Heather

...............

Subject: WinMD5
Date: Mon, 18 Aug 2003 14:41:30 -0400
From: Edwin Olson <eolson@MIT.EDU>

Howdy,

I'm the author of WinMD5. I noticed a whole bunch of hits against my website referred by a posting to linux-list from April, and found your name. (The link in your email http://www.ssc.com/pipermail/linux-list/2003-April/055560.html contains a spurious period, so my server was getting a lot of 404s).

FYI, The best web page to point people to is:

http://www.blisstonia.com/software/WinMD5

There's also a much nicer version 2.0 available now (still free, of course :) I would appreciate any feedback you might have.

Thanks for recommending my utility. It's nice to know folks are using it!

-Ed

...............


telnet connection problem

Karl-Heinz Herrmann (k.-h.herrmann from fz-juelich.de)
Question by gho boo (lovelearninggtmhh from 37.com)

i am trying to use telnet to learn more about internet protocols but every time i try to make a connention through the telnet i get a refuse message says couldnot make a connection to the web site. what i do is fisrt make a connection to the internet then i put in the host name the following address "whois.internic.com" and leave the term type and every thing else as it was but i also fail

[K.-H.] Well --- learning more about internet protocols is certainly worthwhile especiall since you've no clue. On the other hand this mailinglist you sent your question to is called *linux-questions-only*. Why would you guess somebody has a funny E-Mail adress like that? Because we are network and internet protocol specialists?
For further asking question at this place consider reading:
http://www.linuxgazette.com/tag/ask-the-gang.html
AND recommended places to find information like search linuxgazette, google or the Linux documentation project www.tldp.org which incidentially has a network administrator guide which explains many basics:
http://www.tldp.org/LDP/nag2/index.html

i tried another addresses but invain i tried google.com,yahoo.com but no connection was there maybe the proxy setting affect the telnet connection??????????/

[K.-H.] Certainly -- proxy is for the http (maybe ftp) protocol. This protocol definition includes a port number, usually 80. telnet on the other hand is a service usually not available to everybody and usually connecting to port 23 -- which is not covered by standard proxy services.
Since you wanted to study network protocols you probably wanted to telnet to the webserver on any of the machines you tried.
That could be done by: telnet www.whatever.com 80
the 80 specifies that you do not want to connect to the regular telnet port (which should not be available on any big webserver as its a gaping security hole) but to the http-server which is listening on port 80.
Maybe this gets you started in the right direction (i.e. start reading documentation).

please help me to answer this question as i read in the website you have a fabulous information about this things thanks very much...............

You're welcome. To others reading this - the trick works for any purely text based protocol, as long as it only needs one port, and you have your hceat card at hand. I use it to test my mailservers for clients before taking them out of the lab, using telnet to port 25 and using raw SMTP or ESMTP commands. -- Heather


networking problems(configuring a wi-fi card)

Karl-Heinz Herrmann (k.-h.herrmann from fz-juelich.de)
Question by Ben Vargas (Ben from Vargasent.com)

as of yesterday i fugured out my PCMCIA problem and have now configured my wi-fi card and everthiing seemed to be going well untill i launched the browser and i dont seem to be passing the IP adress to the browser, if i have an ip address at all. and my real question is, is there a ip configuration utility for red hat 9 where i can see if i indeed have a ip address that was DHCP to my machine and if so where can i find this program.

thanks for your time

Benjamin Vargas

[K.-H.] That question is completely confused. Read http://www.linuxgazette.com/tag/ask-the-gang.html to get an idea how to ask a good question. It would help to tell what netscape is doing/not doing. proxy setting in netscape. output of /sbin/route -n (one of the tools you ask for) would also help in finding out whats the problem.
Generally:
Your computer has an IP-adress attached to each of its interfaces. It is 127.0.0.1 on interface lo (loop back), it might have ethernet connections like eth0 with local IP-adresses (e.g. 10.10.10.1) and once you've dialed out via modem/ISDN you've a [i]ppp0 interface which got a dynamic IP adress assigned. That might be any IP-adress.
The IP-traffic is directed by routing, thats's the roadmap which tells the kernel where to send each IP packet depending on the IP. A packet to 127.0.0.1 will be passed to interface lo, while with appropriate netmask/broadcast setting any packet to 10.x.x.x will be passed to eth0. To direct all unknown (outside) IP-adresses to [i]ppp0 you would set a default route (shows up as 0.0.0.0 in route outpute) specifying where to send all the traffic.
If your netscape doesn't see the outside, it's because the packets go wrong (or the interface is not up and running).
interfaces are checked with ifconfig, routes with route [-n].
WLAN is no different, looks like an ethernet but has some special tools for the interface and status: iwconfig, iwspy, iwlist, iwpriv,... route is the same.
http://www.oreillynet.com/pub/a/wireless/2001/03/06/recipe.html has a Linux-setup for 802.11b cards. There are links to the wireless-tools which will help diagnose and set WLAN specific things.
K.-H.

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 102 of Linux Gazette, May 2004

The Answer Gang

Linux Gazette 102: The Answer Gang (TWDT) The Answer Gang 102:
LINUX GAZETTE
...making Linux just a little more fun!
(?) The Answer Gang (!)
By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, 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



Contents:

¶: Greetings From Heather Stern
(?)Redhat + scsi RAID = Excedrin headache #459
(?)howto
(?)Wireless networking

(¶) Greetings from Heather Stern

Greetings dear readers, and welcome once more to the wild and whacky world of The Answer Gang. Sorry the workshop's a mess. Even sorrier we took so long to clear out the sawdust and get these bits to you. However, I hope you find the threads a little more readable; my apologies to everyone who got nipped by my confused battle with the stylesheet last month. The bandaids are off now and the scratches are healing nicely...

Which brings me to thoughts of the next battle ahead. Upgradability has always been something I care about; thence my careful management of my distros, whichever they are, and a particular fondness for Debian's apt-get feature. (I look forward to trying yum when I have Copious Free Time^tm to try Fedore, and recommend urpmi to Mandrake fans.) Still, the main thing that gives any distro is the policies its maintainers apply. RPM based distros are unique because of how the dependencies are laid out - if they're good, installs of new software - even source based softare, are easy, and if not, then upgrades are just hellish. In other words, these maintainers... they are your sysadmin, until you take the reins in your hands to do it yourself - and even then, the tools they make handiest to help you with that also apply policy, at least about where the control files go.

As Linux is increasingly being taken up by people who care about what they're going to do with it, rather than folks who really care what their OS is at all under the hood - this is getting more important. The paper zines have been muttering under their breath for years "not ready for the enterprise" - what they mean is we dunno, as in Ghostbusters, "who ya gonna call?"

Nobody claims that's the problem anymore, all the big names are well known and pretty much Joe User have now heard of mailing lists and blogs. Still they resist, so the next chain to yank is "it's too hard to switch" - oops, GUI and web admin interfaces abound. Can't lean on that one too much anymore. What else? Well, change manaegement is the real problem - a problem about people, not about technology - and that's about policy.

But what about when your fought-for-and-won distro of choice changes its policies? What if you don't like them anymore? Whoops. Of course the mswin folk have dealt with the changing winds from Redmond every other season, but we've grown rather fond of having a choice... and it upsets our applecart when the spirit of a distro changes. I've watched it over the years. Slackware was one of the earliest distros at all - only had 3 or 4 competitors and you may not have even heard of them if you're new to the game - and being a distro proper made life easy. Slackware has its loyal followers everywhere - but you won't find them saying it's because they wanted to have their hand held, no way. Red Hat put together the system for the ordinary guy, the average Joe... and around the time those Caldera people were looking good for a good standing in the business world, decided that was their new definition of Joe. Their trend toward the business world has gone so far they will barely accept money from Joe's buddy out here on the street anymore. What? and have to answer his phone calls?? They run and hide. Much more fun to accept money by the industrial size barrel for the occasional call now and then from a corporate contact. The community that had grown to be fond of them takes this two ways:

  1. a personal challenge, after all the whole point of the GPL and other free licenses is for projects to continue when the original folk bail on it;
  2. vote with their feet, especially if any other policies of basic set up are annoying them. There's a lot more distros to pick from now, maybe it's time to go shopping.

That's where the Fedora plan came in. Of course, I've ggot my clients, and I heard diddly squat from them about the Fedora Legacy project - to keep RH consumer distros in security patches at least; lots more about considering the offers of Progeny or other consulting vendors to keep them in good health. Fedore's lifeblood will be the people who took the challenge seriously and though their first burst of energy was a painful birth, I think the kid's coming along nicely.

Mind you, the Linux users of the tinkering spirit, with their off brand distros and literally a pile of Debian derivitives, are not safe from the winds of change - they need to learn to set their sails too. The Debian project just went through a vote that changed some minor wording in their core document, the Debian Social Contract... and oh, the flame wars that have arisen if one interprets the new word they chose a bit more broadly. It's not that bad folks, it just isn't - but people who thought they were standing on solid ground got mildly dizzy when the bandwagon shifted even a little bit. The purists who want to know that "free means free" will feel a bit happier setting sail this way. Those qho quail that it may vastly slow down the Sarge release are probably wrong; yeah, it's slow but what I have learned to view as signs of impending release with the next few months - breakage for brief times now and then of core dependencies and thence the install of core packages - have been happening of late, and I've just learned to keep an ear flapping in the wind for the howling of their Bug Tracking System entries. The really painful ones get FAQ status in freenode's #debian channel by being listed in the topic you read as you enter. Luckily they also get dealt with rather quickly, but I wouldn't exactly update via cronjob these days; I like to keep a closer eye on things.

That's just a couple of examples. Now that the word "Linux" gets a few less glassy stares I also hear the hiss of people zipping their hand back with burnt fingers everywhere. The good news is there are at least as many varieties of burn cream as there are hot stoves to touch or hot sidewalks to stroll along. The bad news - good news in disguise - is there are so many choices!

That's the way it is in the Open Source world, though, folks. For anything big enough - the world is their beta tester. If we aren't - then the result will not be up to a world of users. Take your choice when to take a plunge - but Summer is here. Enjoy your time at poolside, soak in some rays or lay the Sunblock 2000 as thick as you feel you need to in all its designer colors - but the time will come to dive in. Serves millions. Enjoy.


(?) Redhat + scsi RAID = Excedrin headache #459

From Faber Fedor

Answered By: Faber Fedor, Benjamin A. Okopnik, Kapil Hari Paranjape, Jim Dennis

Hey Gang,

I've got a problem that I've fixed three other times in different enviroments, but this time it's driving me nuts.

The short of it is this: I've got a newly upgraded RedHat 9 on a PII 400 MHz box running RAID 5 using LSI Logic MegaRAID 500 SCSI. When the system boots, I get the following panic:

    creating boot device
    creating root device
    mounting root filesystem
    mount: error 6 mounting ext3
    pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
    umount /initrd/proc failed: 2
    Freeing unused kernel memory: 132K freed
    Kernel panic: No init found.  Try passing init= option to kernel

Yes, the scsi drive is recognized and the appropriate drivers are loaded (I did a mkinitrd --preload scsi_mod --preload sd_mod initrd.scsi <kernel image> and verified that the modules were included in the initrd by mounting it). I also verified that the root filesystem is indeed ext3 (btw, how does the system know if the filesystem is of a particular type before it gets to /etc/fstab? I haven't figured that out yet) and it was clean.

(!) [Ben] Presumably by reading the partition table and doing a little string comparison, just as "file" does.

(?) From what I was able to google, one person said that the journal might have been trashed (fixed with fsck) and another said that there was no corresponding device in the initrd, which is true. But do I need to create a device for the /dev/sda in the initrd and if so, how?

(!) [Ben] I've found that a lot of headaches can be avoided by simply deleting the journal when there's a related problem. There can be much darkness of the spirit and wailing and rending of clothes otherwise.
(!) [Faber] Yes, it's a bash script called linuxrc. It looks pretty straightforward:
#!/bin/bash

echo "Loading scsi_mod.o module"
insmod /lib/scsi_mod.o
echo "Loading sd_mod.o module"
insmod /lib/sd_mod.o
echo "Loading ncr53c8xx.o module"
insmod /lib/ncr53c8xx.o
echo "Loading jbd.o module"
insmod /lib/jbd.o
echo "Loading ext3.o module"
insmod /lib/ext3.o
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Creating block devices
mkdevices /dev
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
So straight forward that they're not even using 'modprobe'! -- Thomas Adam
(!) [Ben] Saaay... that looks interesting. What's that "mkdevices" bit, and how does it know which devices to "mk"? That's assuming that the lack of an appropriate device is the problem. I'd also add a "-v" to all those "insmod" invocations, just for grins - and maybe kill those "echo" lines.

(?) Any other suggestion for fixing this are welcome. As I've said, I've fixed three other Red Hat/SCSI problems within the past few weeks ( 1. boot off of an IDE and mount the scsi, 2. upgrade to Red Hat 9, or 3. preload modules in initrd) but short of reinstalling the OS, I can't figure out what to try next.

(!) [Ben] "pivotroot", IIRC, is only necessary if you want to do an "initrd"-type boot, where you fire up a RAMdisk, boot off that, then mount your partition on '/' as ext3, and away you go. Mind you, this is all from memory - it's been a long time since I did this myself, and the only reason for doing it was that I wanted to try a Debian-precompiled kernel. These days, I just make an ext3 partition from the start. However, you're talking SCSI, so it looks like you're stuck with doing it that way - unless you stick a small IDE HD in there just for booting.
What I'd run into previously is, "mkinitrd" actually uses "/etc/fstab" when building the image. I ended up having to tweak "/etc/fstab" to make it fit the machine I was building it for - as opposed to the one on which it was being built - and then untweak it after running "mkinitrd".

(?) I've tried that as well. :-(

(!) [Ben] Argh. Well... let's peel it back as much as we can. It's been a mort of years since I've dealt with SCSI HDs, so I don't know how helpful this will be, though.
First off, I'd go ahead and pop in a Knoppix CD, boot with it, and see if I can detect/mount/read the SCSI - and I would watch carefully to see just how different the SCSI-related messages are during the process (i.e., do you need to try a different module?) Then, I'd make sure that the "/etc/lilo.conf" on the SCSI is trying to do The Right Thing (you are using LILO, right?) - no IDE-specific stuff in there, "root", "boot", etc. are set to the correct values (not an "hdX" in the place...) and re-run "lilo -v" just to see what the output is and make sure that it's properly set. I'd walk through the "initrd" setup to make sure that there's nothing odd in there, and particularly check that ROOT in "/etc/mkinitrd/mkinitrd.conf" is explicitly set (I just remembered having a problem with that default "probe" setting at one point; my current one says 'ROOT="/dev/hda1 ext3"'.) Also, take a look at "/etc/mkinitrd/modules".
Nothing else comes to mind at the moment.

(?) The partition table holds filesystem information? I didn't see anything in the list of types in fdisk.

(!) [Ben] Sorry, I should have expanded that. The kernel would read the partition table, jump to the location indicated by it, and do a string comparison on the info it finds there - mind you, I don't know that that's what it does, but it would seem like a simple way to do it. However, "mkinitrd" also reads "/etc/fstab", so that might me how it's done.
(!) [Faber] It seems RH doesn't have an /etc/mkinitrd directory or files.
What I'm looking at is the
echo 0x0100 > /proc/sys/kernel/real-root-dev
If I read this right, it's saying the real-root-dev is device major number 01 and minor 00 which is ram0 (so maybe Kapil was right about Red Hat using two ramdisks? but I see only one pivot_root. :-?) I'm going to change it to read
echo 0x802 > /proc/sys/kernel/real-root-dev
(!) [Ben] I assume you mean something like
disk = /dev/sda
  bios = 0x80
disk = /dev/hda
  bios = 0x81
(!) [Ben] That would be pretty standard stuff. You could get really wild and describe the geometry of "/dev/sda" (see the LILO manual), but I don't know that it would be helpful.
(!) [Kapil] I had a look at RedHat's mkinitrd script also. RedHat's procedure seems to be pretty straightforward (no jumping through hoops here :)). The key to understanding the above script is "man nash".
Both mkdevices and mkrootdev are builtin commands for nash. Quoting from the man page:

...............

       mkdevices path
                     Creates device files for all of the block devices
		     listed in /proc/partitions in the directory  spec-
		     fied by path.

       mkrootdev path
                     Makes  path  a  block inode for the device which
		     should be mounted as root. To determine this device
                     nash uses the device suggested by the root= kernel
		     command line  argument (if  root=LABEL  is  used
		     devices  are  probed to find one with that label).
		     If no root= argument is available, /proc/sys/ker-
	             nel/real-root-dev provides the device number.

...............

Note that the line after the mkrootdev business is setting a "dummy" "real-root-dev" so just replacing "0x100" by "0x810" or some such is not likely to work.
By the way, I always thought that the way to invoke pivot_root was
cd new_root pivot_root . old_root exec chroot next_command But RedHat's script seems to bypass the "change directory" step...
Hope this helps
(!) [Ben] That smells like it is talking about some sort of RAM based file system (CRAMFS perhaps?) which is certainly unlikely to be an ext3 filesystem.
In other words your problem may not be with the SCSI disk and its ext3 file system at all! I don't know RH's boot procedure but some of these distro boot images have some intermediate "RAM disk" in addition to the initrd and do two pivot_roots!
If you want to stick with the distro's boot procedure, your best bet is to examine this procedure in detail.
0. Check the boot command line.
1. Open up the initrd image and look at linuxrc.
Having looked at 0 and 1 for a number of distro's I have come to the conclusion that either the guys who produce these distro boot images do too many drugs or they are taking care of some really unusual eventualities or both :-)
I seem to remember that it's either CRAMFS or something like that; I'm sure Heather knows more about it than I do. It's a "pull yourself up by your bootstraps" kind of thing: you boot a RAM-based ext2 mini-"partition" (which mounts as "/"), which then loads the appropriate ext3 modules, mounts your actual partition, and "pivots" "/" to it.
The usual reason is to avoid having to recompile the kernel - it makes more sense for RH, etc. to make ext3, jfs, jffs, reiserfs, etc. modules and let you choose which one you want to use, but the price is having to mess with the "initrd"/"pivot_root" stuff. I just compile ext3 right in, and never have to mess with it. SCSI, of course, is a different sort of animal altogether.
(!) [Faber] Well, you can have alook at this one. :-) The relevant parts are:
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
I don't see anything there that would screw up because of a SCSI disk, but then again, I don't know what /proc/sys/kernel/real-root-dev is for, so I'm off to find out...
(!) [Ben] Anybody have an idea how 0x0100 would relate to device numbers, or whatever else "/proc/sys/kernel/real-root-dev" is supposed to hold? I suspect that the above is the RAMdisk, though, and that whatever is defined as the device for "pivot_root" to "pivot" to is what matters.
(!) [JimD]
/proc/sys/kernel/real-root-dev is documented in .../src/linux/Documentation/initrd.txt
Quoting therefrom:

...............

It works by mounting the "real" root device (i.e. the one set with rdev in the kernel image or with root=... at the boot command line) as the root file system when linuxrc exits. The initrd file system is then unmounted, or, if it is still busy, moved to a directory /initrd, if such a directory exists on the new root file system.
In order to use this mechanism, you do not have to specify the boot command options root, init, or rw. (If specified, they will affect the real root file system, not the initrd environment.)
If /proc is mounted, the "real" root device can be changed from within linuxrc by writing the number of the new root FS device to the special file /proc/sys/kernel/real-root-dev, e.g.
# echo 0x301 >/proc/sys/kernel/real-root-dev
Note that the mechanism is incompatible with NFS and similar file systems.
This old, deprecated mechanism is commonly called "change_root", while the new, supported mechanism is called "pivot_root".

...............

As Ben suggests this look like /dev/ram0 (The ramdisk) which seems wrong. I'd look back through the /linuxrc to figure out what logic it's using to arrive at this point. I'm guessing that it's not loading or detecting the intended rootfs (hardware) and this value is the result of a default that wasn't over-written by any more appropriate case.

Faber cheerfully reported back.... -- Thomas Adam

(?) Here's what I think is happening:

(the relevant parts of initrd/linuxrc)

echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /proc/initrd

create the root device attach the (ram0) ram disk to it mount the ram disk to /sysroot change the system root from the initrd to the ram0 disk umount initrd

Now, that jives with the initrd on my local )non-scsi) box. The question is: is this correct behaviour for a scsi box? If so, why is the failure occuring at mounting the ramdisk? The mount error, IIRC, is "no such device".

I was never able to fix my client's system to boot off of the SCSI drive no matter how I mucked with initrd. It was a lot of fun however and I learned more about initrd than is probably necessary. :-)

In the end, we reinstalled RH9 from scratch. We took advantage of the new install to reconfigure some partitions and stuff, so all was not a total waste.

Interesting side note(s): the RH installer would not let us use LILO and the SCSI MBR. I could use the MBR of hda or sda1, but not the way I wanted it. So I went with GRUB.

After playing with GRUB, I must say I like it, but it has one really weird feature. All of the documentation says that GRUB refers to the first IDE drive as (hd0,0) and the fist SCSI drive as (sd0,0). Not on this system! It took me two hours (for shame!) to figure out that the SCSI drive is (hd0,0) and the first IDE drive is (hd1,0). If anyone knows why, I'd love to hear it.

Now all I have to do is recreate two years worth of customizations on this box. Good thing I have a very understanding client. :-)


(?) howto

From Guy Milliron

Answered By: Benjamin A. Okopnik, Jim Dennis

I've googled for an answer to my question, just it's too obscure for me to figure out I guess...

I'm attempting to install a new software on my RHL box. Anyhow, it's calling a program called fping (Which is pretty interesting itself, a round-robin style ping http://www.fping.com ). It says it needs to run as root (which I won't allow the calling program to run as, or needs to be "setuid".

As Ricki Ricardo would say "Splain Lucy Splain!"

(!) [Ben] For that, see "perldoc splain" for more info. :) Although it's not quite smart enough to help you this time...
ben@Fenrir:~$ ls -l `which ping`
-rwsr-xr-x    1 root     root        15244 2001-11-18 17:29 /bin/ping
(!) [Ben] "ping" has always been SUID; it needs to be in order to use ICMP - which is what "ping" does. It's a weird security model ("ICMP can be dangerous, so we'll lock it away under root privilege... but then we'll make the ICMP generator SUID so everybody can use it.") Some old, hoary, scarred and scared sysadmins remove the SUID bit from "ping" so you have to "su" in order to use it... but note that the users will complain. My guess is, user complaints are the reason that the situation exists. Of course, they could have made "ping" use TCP instead of ICMP, but then we'd be violating <Tevye the Milkman mode>TRADITION!</TtMm>.
There actually are some valid reasons for sticking with ICMP, but they're not unique to it, and are mostly doable with TCP. TCP "ping", IMO, would be a Good Thing and support a better security model.
# Net::Ping uses TCP by default
perl -MNet::Ping -wle'print"Host is ",Net::Ping->new()->ping(shift)?"up":"down"' localhost
<shrug>
(!) [Jim] "setuid" is a special bit in the UNIX permissions. You can make your program SUID with a command like (as root):
chown root.bin `which fping` && chmod u+s `which fping`
... assuming fping in own your PATH.
You can be a little safer using commands like:
chmod root.$TRUSTEDGROUP `which fping`; chmod 4550 `which fping`
... where you create a group (such as 'staff' or 'trusted') which which will be allowed to execute this program. Then you associate this program with that group and mark it so that the owner and members of the associated group are permitted to read and execute the SUID program.
Thus if there is an exploitable bug in the program (a way to "trick" it into doing things it's not intended to do with it's root privileges) then only the owner (who's already root) and the members of the trusted group can attempt to exploit the vulnerability.
This is very basic UNIX systems administration practice that should be taught to ALL UNIX and Linux system administration professions in their first term. There is not difference between UNIX and Linux in this regard.
Note that SUID and SGID only applies to binaries --- NOT to scripts. Perl has a special helper application (sperl) which allows it to handle SUID (and SGID?) Perl scripts. It would be wise to associate sperl with a trusted group and make it non-world executable (as my second command example shows). You can make as many trusted groups as you like.
Note that SUID and SGID are the most basic forms of privilege delegation in UNIX and Linux. They allow you to write a program which acts as an agent, allowing one group of users to access some resource in a controlled and limited way (through the agent). If the program (and the libraries against which it is linked) are bug free (or "sufficiently robust") then this is a safe means of giving everyone or specific groups access to some protected resource. In the case of fping that resource is a lower level form of access to one or more of your networking interfaces. In other cases a program might be SGID "games" to allow it to update a file of high scores.
Because the likelihood of vulnerability rises dramatically as the size and complexity of a program increases, it is considered best practice to make SUID and SGID programs as small as possible --- often splitting the "agent" portion of the code into a small helper application that is called by the larger application.
A general purpose "SUID" wrapper program is called sudo. It allows you to maintain a list (even a network wide list) of users (and hostnames) and a precise list of programs, options that each user or group are permitted to run and precisely who these programs will effective run as. (There are several similar programs like super, caliph, and runas). sudo is the most commonly used choice among professional sysadmins. You control its configuration via /etc/sudoers (using the visudo wrapper to edit that; and to check your syntax as you save and exit).
Naturally I would suggest you make a sudoers group, associate sudo with that, and mark its mode to 4550 (SUID and non-world-executable) as I explained before. This will help limit the number of users that could exploit any bug found in sudo itself. Luckily sudo is one of the more widely audited bits of code on the Internet. Unfortunately it's also sufficiently well known and widespread that any cracker that does find a bug in it; or manages to pass out a trojaned copy of it, will gain LOTs of access using it (though they need to get to a local shell account first).
So it is with all SUID and SGID programs. If the agent is "vulnerable" it can become a confused deputy and give unfettered access to all resources owned by a given user or associated with a given group. (Obviously unfettered access to the root UID is also complete control of a normal UNIX or Linux system).
You can search your entire system for SUID and SGID files with a command like:
 	find / -type f -perm +6000 -ls
... this will find all SUID and SGID files. The SUID bit is meaningless on directories (at least under Linux and most forms of UNIX --- so far) and the SGID bit has some special semantics on Linux and BSD systems (which I've explained in other articles):
http://www.linuxgazette.com/issue64/lg_tips64.html#tips/18
The SUID/SGID files are also meaningless on device nodes, FIFOs (named pipes) and unix domain sockets; as well as "regular" non-executable files and most scripts (text executables). All of the permissions bits are generally ignored on symlinks.

(?) Wireless networking

From Ben Okopnik

Answered By: Benjamin Okopnik, Jason Creighton, Thomas Adam

Hi, all -

I've finally had a chance to test out the wireless Ethernet on my laptop - in fact, I'm sitting at the local airport right next to their Air Port (that's a joke, dammit. You're s'posed to laugh.) The problem is, the speeds that I'm getting in Linux and Wind0ws are wildly disparate, with Linux being on the losing end. Of course, I have no way to measure the exact speed in Wind0ws (other than maybe downloading a large file and doing a little math), but the connection properties say "11Mbps" and "Quality: excellent", and the Web pages snap onto the screen like I've never seen before. Linux... [sigh] I've seen it get as high as 29kB/S during an "apt-get" operation, and Web pages crawl.

I'm using "ndiswrapper" (possibly part of the problem - like everything else on this damned Acer, the hardware (Intel PRO/Wireless LAN 2100) is unsupported), so my whole initialization sequence goes like this:

# ndiswrapper-specific stuff
modprobe ndiswrapper
loadndisdriver 8086 1043 /lib/windrivers/w70n51.sys /lib/windrivers/w70n51.inf

iwconfig wlan0 mode Managed
# Looking for a public access point
iwconfig wlan0 essid default
ifconfig wlan0 up

# get an IP via DHCP
pump -i wlan0

"ifconfig wlan0" says:

wlan0     Link encap:Ethernet  HWaddr 00:04:23:72:F5:DC
          inet addr:X.X.X.XXX  Bcast:YY.Y.Y.YYY  Mask:255.255.255.0
          inet6 addr: fe80::204:23ff:fe72:f5dc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:55417 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34901 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:81279617 (77.5 MiB)  TX bytes:2375903 (2.2 MiB)
          Interrupt:11 Memory:d0000000-d0000fff

Even my old trick of searching for the "parm" string in the module doesn't produce anything useful:

strings ndiswrapper.ko | grep parm
parm=if_name:Network interface name (default: wlan0)
parm=proc_uid:The uid of the files created in /proc (default: 0).
parm=proc_gid:The gid of the files created in /proc (default: 0).

Change the MTU, maybe? Invoke "iwconfig" in some different way? Or am I just stuck with it?

(!) [Thomas] If you haven't done so already, Ben, make sure you have disabled apci from the kernel:
linux noapic
at the LILO prompt (by then you knew that :))
(!) [Jason] Doesn't "modinfo" do the same thing?
~$ modinfo sb
filename:    /lib/modules/2.4.20/kernel/drivers/sound/sb.o
description: "Soundblaster driver"
author:      <none>
license:     "GPL"
parm:        io int, description "Soundblaster i/o base address (0x220,0x240,0x260,0x280)"
parm:        irq int, description "IRQ (5,7,9,10)"
parm:        dma int, description "8-bit DMA channel (0,1,3)"
parm:        dma16 int, description "16-bit DMA channel (5,6,7)"
parm:        mpu_io int, description "Mpu base address"
parm:        type int, description "You can set this to specific card type"
parm:        sm_games int, description "Enable support for Logitech soundman games"
parm:        esstype int, description "ESS chip type"
parm:        acer int, description "Set this to detect cards in some ACER notebooks"
parm:        isapnp int, description "When set to 0, Plug & Play support will be disabled"
parm:        isapnpjump int, description "Jumps to a specific slot in the driver's PnP table. Use the source, Luke."
parm:        multiple int, description "When set to 0, will not search for multiple cards"
parm:        pnplegacy int, description "When set to 1, will search for a legacy SB card along with any PnP cards."
parm:        reverse int, description "When set to 1, will reverse ISAPnP search order"
parm:        uart401 int, description "When set to 1, will attempt to detect and enable the mpu on some clones"
~$

(?) Is ACPI such an all-around evil thing that you recommend turning it off in all cases? It just doesn't seem relevant here, unless you have info to the contrary.

(!) [Heather] I caution against confusing APIC (some sort of feature which SMP processors all do, some uniprocessors happen to do, and some CPU/motherboard combinations make poor Tux give up on herring for Lent) with ACPI (which is what APM might be is you divided it into a few levels of suspend then told each device to deal with sleepiness themselves - kind of neat from an object oriented point of view, but somewhat annoying to someone who just wants to be able to close the lid safely without knowing why it works). Both have their moments... and their times to be set on fire :(
(!) [Thomas] It is a complete nightmare from start to finish. It interferes with everything. Whenever you get a HW problem such as this, I would always look at seeing if turning it off solves it.
(!) [Ben] Well! That's quite the characterization.
(!) [Thomas] Humour me, at least. Then you can slowly remove your sunglasses and tell me to think again :)
(!) [Ben] I was actually asking in a spirit of inquiry, not doubting you. It's just these sunglasses make everyone suspicious. :)
I'll check it out - should be back on in a few minutes.

(?) Just tried it. The Wi-Fi and the Bluetooth lights now stay on permanently (can't be turned off), and the speed is a bit lower if anything (I'm copying a movie file from idgames, and it's running about 26kB/S.)


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

Published in Issue 102 of Linux Gazette, May 2004

Retrospectives

By Jim Dennis

I skipped my retrospectives article last month, but should be in the regular swing of things again now. So, 100 issues ago, in August of 1995, John M. Fisk published his second issue of the Linux Gazette. He describe the 1990s as a time when "we're supposed to be shallow." In retrospect I suppose it was the a little the fin de sieèle for the 20th century; the "dot com" bubble was that century's swan song.

Mailbag:

We start with praise for the "Keystroke-HOWTO" To me this calls to mind the Keyboard-and-Console-HOWTO, the Accessibility-HOWTO and perhaps the Intkeyb (internationalization (i18n) of keyboards using xmodmap and xkb support). The latter of these is quick to point out that modern Linux systems have support for a LANG= environment variable and that his HOWTO is a legacy from older systems.

On the issue of accessibility I had to figure out how to set up sticky keys for a friend of mine years ago; before that HOWTO was written. He'd had as stroke and needed to be able to type with a single hand; the sticky keys features allow one to type [Shift], [Ctrl], [Alt] and similar keys as separate keystrokes which then apply to the the next "regular" key pressed before reverting to their unpressed state. I set up the keys on the left to be "sticky" and the keys on the right to be "locks" (so the right [Alt], [Shift], and [Ctrl] keys would all act as toggles, staying virtually pressed until they were tapped again). Now one might just read the One Handed Typing though my old approach would still work, too. It was done at the console (using the loadkeys command, and in X using Xmodmap).

Linux also supports a few voice recognition packages though the best of these is almost certainly the commercial ViaVoice from IBM. However, there are other efforts out there as described by: Speech/Voice Recognition for Linux, Linux Review: ViaVoice and XVoice: Providing Voice Recognition

Of course on the downside some people, some of the time might still need to read the BackspaceDelete HOWTO.

This same correspondent also offered a hint to users of the old sbpcd (SoundBlaster Pro CD-ROM drives and adapaters). Thankfully all the CD-ROM, CD-R, CD-RW, DVD-ROM, DVD+/-RW/+/-R drives on the market today are ATAPI (IDE) or SCSI. So they just work now.

And finally this correspondent had choice words about the peversity and bloat of EMACS, the atavistic nature of vi and problems running an ELF binary of xemacs. ('95 was back in the transition from a.out to ELF binary formats in Linux --- ELF is executable linking format). A modern Linux distribution would avoid those issues by simply providing packages (RPMs or .deb files). Package management has come a long way in Linux.

John's response referred to the (then upcoming) release of WordPerfect for Linux by Novell (now the proud owners of S.u.S.E.) and Caldera (now known as "The SCO Group" and currently embroiled in a lawsuits with Novell, IBM, Red Hat, Daimler-Chrysler Corporation, AutoZone and others --- allegedly over Linux issues; although each of these cases is really about contract disputes, Lanham Act violations (akin to slander/libel) by SCOG , etc).

I could go on at great length about The SCO Group or about the failure of WordPerfect (which was eventually released for Linux by Corel Inc; but seems to be basically unavailable now).

However, today the obvious responses would be: text editing with nedit for Linux X Windowing System users who don't like EMACS/xemacs and vi/vim, and OpenOffice.org for the word processing and other office productivity operations. At this point there are a significant number of organizations that are deploying or at least evaluating deployment of OpenOffice or it's commercial twin StarOffice on their MS Windows systems. This trend is far more pronounced internationally and is, for many, a transitional phase in a long term migration towards Linux on the desktop.

The next letter was from a user of multiple operating systems. He gave a list of his most important packages:

fips
an MS-DOS program for splitting partitions without damaging FAT (file allocation table) filesystems residing on them. This is the free alternative to Partition Magic (now owned by Symantec).
LOADLIN
a utility to load a Linux kernel from an MS-DOS prompt. It was later covered in an article by Bill Bennet in LG #34: LOADLIN.exe Installer
Netscape Navigator
... which is still alive and kicking at version 7.1, though Mozilla is more popular among Linux users and there are many other browsers. There are several scattered among the list of WWW Applications at Linux.org and and there are other lists like: this, this, this, and this article by Chris DiBona
kermit
the classic communications software, known for robust file transfer over serial lines, while its extensive scripting and networking features go gravely under-appreciated.
GNU EMACS
and its derivative XEmacs, of course.

His only complaint related to data exchange between Linux and NT. Linux can read and write NTFS with the latest Linux-NTFS and even the newer LDM (logical disk manager) features of MS Windows 2000 (and XP Pro).

More tar Tricks:

The old GNU tar utility is almost unchanged in the last several years. However, it's worth noting that the support for ACLs and EAs (access control lists and extended attributes) in the 2.6 kernels means that many system administrators will need to consider updated tools to store, transfer, and restore these additional forms of meta-data. This will be especially true of those using Samba, which support ACLs if they're available. Samba provides filesharing services to MS Windows clients, which is a community that expects ACLs to be available. Luckily the necessary software has been around for a long time; Joerg Schilling's star has been around for a long time and support ACLs and EAs in a POSIX-compliant fashion. star has a number of other advantages over GNU tar as well. (Not the least of which, it can be forced to read past corrupt headers and recover the rest of the files from an archive --- a glaring failure of GNU's version which is not present in the .tar file support in star, cpio, pax, or any other modern utility that can handle .tar archive files)!

Vim:

In his next article John sang the praises of vim over other versions of vi. While there are still three camps keeping their torches burning in the vi vs. emacs vs. anything but either flamewars, there is no need to fight. De gustibus non est disputandum (there's no accounting for matters of taste).

I personally have been the ultimate heretic in this particular religious war. While I tend to use vim on systems I administer I often use XEmacs in viper mode (M-x viper brings up a superb emulation of the vi interface inside of emacs or XEmacs while still providing access to the many features and modes of the emacs environment.

This is a key point that many people don't understand. emacs is an applications environment which happens to use text editing as its unifying interface. It has mail readers, web browsing, file and directory management (including remote access and file management), and many programming tools (especially features for checking files into and back out from several different back-end revision control systems, and for comparing and merging different revision). When you think of emacs as a text applications environment then you see that the choice of editing modes is less of an issue.

What people don't understand about vi is that it's made for power users who are likely to spend a large part of every day editing text files and scripts on varied and diverse systems. Thus, systems administrators use vi and programmers tend to use emacs.

vim is the most powerful version of vi and supports many extensions and integrates with several scripting languages. One thing that's evolved over the years since LG#2 is vim's syntax highlighting. You can install a minimal version of vim but if you install the full package and run it from a color-capable console or terminal emulator (such as the Linux console, xterm, or rxvt) and enable the syntax highlighting (:syntax on from inside it, or edit your .exrc or .vimrc files) that many of the files you edit are parsed for patterns and the text is set to various colors for different syntactic contexts. For example I'm editing this HTML in vim and all the HTML tags show up in yellow, while main text is displayed in cyan on black (as set by the -fg and -bg options to my xterm. Inside of anchor tags the href= is in green, the URLs are in red, and the link text is in underlined purple. Italics are in inverse video (black on cyan) while bold is in a brighter (bold) cyan, and so on.

In other types of files the highlighting is set according to the syntax of your C, shell scripting, Perl or Python, Makefile, or other code or content. In e-mail and Netnews postings the headers are colorized and "quoted" excerpts are distinct from your responses. In some cases *emphasized* text (that is text enclosed in *s is also set to a bold color. Naturally this is all customizable and extensible. The package comes with a .../syntax/ directory full of *.vim files while are simple scripts that implement all of the parsing and highlighting. Yes, you can use vim to editing these .vim files and, of course, they will be syntax highlighted by the code in the vim.vim file which is one of the largest .vim in my set. There are about 400 of these files on my system — which is just a typical copy of KNOPPIX.

Of course syntax highlighting is a feature of all modern editors. In emacs this would be enabled with the M-x global-font-lock-mode and then the M-x html-mode for HTML files, and so on. Of course all of that magic is hidden in the .emacs file or under the .emacs.d directory in an emacs user's home directory.

The question of GUI vs. text mode text editors comes up frequently, too. Emacs and XEMacs will detect a DISPLAY environment variable and automatically come up in a graphical window if possible. This can be over-ridden with the -nw (no windowing) command line switch. There's gvim which is a GUI wrapper around vim. Amusingly, vi started as a curses wrapper around the ex "extension" to the ed line mode editor; thankfully it's still possible to run vim in ex mode. Rarely necessary but still handy when you really need it (i.e. your terminal emulation and curses support libraries are badly mangled).

In the anything but vi or emacs camp I suggest Nedit. It's simple enough for the most novice computer user. Yet powerful enough that one needn't outgrow its features. Nedit is GUI-only (there's no terminal-mode support).

Personally I still recommend that system administrators still learn vi because it's been available on every UNIX-like system for thirty years. As sysadmins, we are frequently called upon to edit files on new and minimal systems which might not have any GUI libraries or other editors installed. I don't go so far as to push people towards proficiency in ex, but a half hour running through the vimtutor tutorial (included as an interactive wrapper script with the vim package) is an investment that any systems administrator will find rewarding.

He also mentions xcoral, and xwpe as IDEs (integrated development environments). I hadn't heard of them for years, but quick Google! searches shows that they're still actively maintained by their niche communities.

Of course the new kid on the IDE block now is the Eclipse project. This may eventually become the mainstream IDE for Linux and other open source operating systems. However, its fate and future are tied inextricably to those of the Java platform even though the tool can be used in developing any sort of code. In many ways Eclipse seems to be an effort by Java developers to "eat their own brand" and to prove to a broader developer community that a suite of user interface intensive programs written in Java can offer the performance, stability, and native graphical "feel" that's comparable to those compiled from C/C++ and other "native" sources.

The differences between full-featured text editors and "integrated development environments" have always been somewhat blurred. As I've said, emacs is more of an environment (development and for other uses) while vi and nedit tend to be less integrated with the rest of the developer's toolchain. Since they are powerful, extensible editors with scripting languages built-in (or available as plug-ins in the case of vim) they can be as integrated with other tools as anyone cares to make them.

PPP Scripts:

All I can say about this is: Wow! I'm glad I've got a broadband connection! It's not about speed. I only get 144Kbps over my ISDL (DSL over ISDN) line. However, it's always up and running, no waiting for dialing and connecting; and the latency is lower than any modem ever was. Of course many Linux users still need to rely on dial-up and the old PPP package is still well supported. Many users would prefer to use wvdial perhaps with one of its GUI wrappers like QtWvDialer or X-wvdial, KPPP for KDE.

A quick Freshmeat search: PPP lists over a hundred utilities and packages related to PPP. Very few people should have to fuss with custom chat scripts any more and the many other packages can log, generate statistics and help with other aspects of PPP. Thankfully, SLIP (serial line IP) is a fading memory (though there are still 20 packages that mention it at Freshmeat.

Pine+popclient:

While the pine mail reader (MUA, mail user agent) is still maintained and available, many users have switched to mutt. The popclient utility seems to have disappeared completely, though the fetchmail package has taken up the slack. Of course there are many GUI mail readers and the needs of Microsoft Outlook users go beyond simple text mail interfaces. For them there is Ximian Evolution or any of over a hundred others found on Rick Moen's list of MUAs.

Of course all those instructions for building pine from source are generally unnecessary now. Pine is widely available in RPM format and one can find apt-geti-able Debian packages can be with a search at www.apt-get.org. (This is the general way of finding unofficial sources for Debian packages; for programs that aren't quite free enough, or aren't among the 12 thousand packages in the official Debian archive/mirror system).

On a broader level the big issues in e-mail these days are spam and the plethora viruses that infest MS Windows networks and flood my inbox with about a thousand pieces of trash every day. (That is no exaggeration, I get 1000 slices of spam, virus, or erroneous bounce/error e-mail every day). Tools like spamassassin and ClamAV only solve about 95% of that problem for me. Many more tools are available, but deploying and maintaining them gets harder as you intertwine more of them together. Your risks of hitting false positives (blocking legitimate mail) increase as we take more aggressive anti-spam and anti-virus measures.

For years I just "leaned on the [d] key" manually deleting it all. However, I got the the point where I was sure that I was more likely to err out of sheer numbed mind exhaustion than any decent anti-spam tools were out of over-aggressive pattern matching. So now I can't use e-mail at home without spamassassin.

The average Linux user is increasingly less likely to run his or her own mail server. However, it's a battle that professional sysadmins fight every day (and mostly lose). Many users rely on free webmail services such as those provided by Microsoft at hotmail, or Yahoo Mail or the exciting new Google Mail. Also any accounts with AOL, MSN, or other major ISPs will also include some spam blocking features.

I'll continue to suffer the pain of managing my own e-mail, but mostly as an investment in maintaining my skill set for my consulting customers. Otherwise I'd probably just subscribe to an account with IMAP Partners and outsource my mail hassles my friends that run it.

Configuring X:

Configuring the X Windowing System is no longer a rite of passage for the Linux newbie.

Mostly I think we can thank the advent of PCI which makes the automated identification of video cards and other adapters in a PC or other computer a simple automated affair. Automatic detection of a VGA monitor's capabilities via the VESA VBE/DDC standards has also helped quite a bit.

But, most of all we can thank the countless thousands of man hours spent by volunteers, on building databases used by read-edid and similar utilities. You might never run read-edid yourself, but the chances are pretty good that your free operating system's installation and configuration tools used that code to make a formerly painful "rite of passage" into a simple routine click of the mouse or tap on your [Enter] key.

Of course most of customization hints in John's article are still valid today. They're somewhat obscure and generally not necessary for someone using the GNOME or KDE environments. However, today's Linux users can still customize X and run fvwm or twm for a minimalist and traditional X-perience.

Customizing X with vgaset:

I don't remember the vgaset utility; I think it was completely superceded by xvidtune. We rarely resort to using that these days either. However, if you should need to use it be sure to read the XFree86 Video Timings HOWTO and the XWindows User HOWTO.

Customizing X with the Xaw3d libs:

Here also used the dreaded "blink" tag (HTML) in his exhortation for Linux supporters to subscribe to the Linux Journal. I still think LJ is the best printed magazine for Linux; but for my money the most important Linux subscription these days would be online at LWN (though slackers can still wait a couple weeks to see all of their content for free).

As for the old Xaw3d libraries, they're just included with every mainstream distribution and have been for many years. The most you'd have to do is run an RPM command to install them when some other package barked about a missing dependency. (Of course apt-get would just resolve the dependency for you, too). Most of us probably have had it installed on our desktop machines for years and been blithely unaware of it; as it should be with libraries, for users.

Conclusion:

Looking over the many links I've included in this retrospective, we see again that UNIX and Linux programs can stand the test of time. John's articles didn't include links to many of these projects, and many of those old links would certainly have been obsolete; but we find that almost all of those old free packages are still available, and maintained.

Of course there are many new packages, too. GNOME, KDE, OpenOffice.org, Abiword, Gnumeric, Evolution, even the ability to run Microsoft Windows programs via WINE and Crossover-WINE, VMWare among others.

Despite all of those advances, I think the most profound effect of Linux and the GNU project has little to do with software!

Early in this column I made a couple of literary references. Perhaps you followed those links out of curiosity, even if you were familiar with idioms like "fin de siècle" and "swan song." These lead to Wikipedia a collaborative world-wide encylopedia. The whole notion of a free general-topic encycopedia which is maintained by anyone with a web browser and access to the Internet was almost unthinkable back in 1995! Now it is not only a reality but almost unremarkable! It has grown over the last five years to include a quarter of a million articles in English (a half dozen of which where initially written by me; and about a 100 of which I've touched at some point or another). There are other articles in many other languages and there are sibling projects such as the Wiktionary dictionaries, for English and many other languages, and Wikiquote a dictionary of famous and notable quotations.

While Wikipedia and it's siblings are probably hosted on Linux (I honestly don't know), and the Mediawiki software package that runs all of these sites is free and open-source software, relying heavily on MySQL, one of the two major free SQL RDBMS (relational database management system) packages – this is not about the software. What is more important is that the information is free and that sites like Wikipedia are becoming an information utility.

Regardless of the software base for Mediawiki it seems that the philosophy of freedom and collaboration is the real accomplishment of the last decade. Even through the infamous "dot com bomb" (and the shallowness that John dismissed with such levity), the social movement of people contributing their work and knowlege in ways that the enjoy survives and seems to be thriving.

Another resource that I used extensively is Google. In fact I used Google to find the latest and most authoritative URL for almost every link I used in this column.

Google is, of course, a commercial entity. They are a advertising medium, just like a radio station or your TV broadcasters. However, they've also become an indispensable utility on the Internet. Linux is a key enabling force for them; primarily for economic rather than technical reasons. Google runs over 10,000 (ten thousand) Linux nodes to provide various aspects of their indexing and searching services.

To me Google is more and more indispensable resource, but Wikipedia is the more impressive accomplishment.

Meanwhile I continue to see articles that try to depict the Linux movement as a war against Microsoft in particular and against commercial software in general. These are journalists that just don't get it. Sure, some participants are motivated by animosity or disgust. However, more of us are simply doing our part to build something that we want for ourselves, and the gyrations of the multi-national behemoths is irrelevant to the degree that they don't interfere with that.

Jim is a Senior Contributing Editor for Linux Gazette, and the founder of The Answer Guy column (the precursor to The Answer Gang).


[BIO] Jim has been using Linux since kernel version 0.97 or so. His first distribution was SLS (Soft Landing Systems). Jim taught himself Linux while working on the technical support queues at Symantec's Peter Norton Group. He started by lurking alt.os.minix and alt.os.linux on USENET netnews (before the creation of the comp.os.linux.* newsgroups), reading them just about all day while supporting Norton Utilities, and for a few hours every night while waiting for the rush-hour traffic to subside.

Jim has also worked in other computer roles, and also as an electrician and a crane truck operator. Jim has also worked in many other roles. He's been a graveyard dishwasher, a janitor, and a driver of school buses, taxis, pizza delivery cars, and even did some cross-country, long-haul work.

He grew up in Chicago and has lived in the inner city, the suburbs, and on farms in the midwest. In his early teens he lived in Oregon-- Portland, Clackamas, and the forests along the coast (Brighton). In his early twenties, he moved to the Los Angeles area "for a summer job" (working for his father, and learning the contruction trades).

By then, Jim met his true love, Heather, at a science-fiction convention. About a year later they started spending time together, and they've now been living together for over a decade. First they lived in Eugene, Oregon, for a year, but now they live in the Silicon Valley.

Jim and Heather still go to SF cons together.

Jim has continued to be hooked on USENET and technical mailing lists. In 1995 he registered the starshine.org domain as a birthday gift to Heather (after her nickname and favorite Runequest persona). He's participated in an ever changing array of lists and newsgroups.

In 1999 Jim started a book-authoring project (which he completed after attracting a couple of co-authors). That book Linux System Administration (published 2000, New Riders Associates) is not a rehash of HOWTOs and man pages. It's intended to give a high-level view of systems administration, covering topics like Requirements Analysis, Recovery Planning, and Capacity Planning. His book intended to build upon the works of Aeleen Frisch (Essential Systems Administration, O-Reilly & Associates) and Nemeth, et al (Unix System Administrator's Handbook, Prentice Hall).

Jim is an active member of a number of Linux and UNIX users' groups and has done Linux consulting and training for a number of companies (Linuxcare) and customers (US Postal Service). He's also presented technical sessions at conferences (Linux World Expo, San Jose and New York).

A few years ago, he volunteered to help with misguided technical question that were e-mailed to the editorial staff at the Linux Gazette. He answered 13 questions the first month. A couple months later, he realized that these questions and his responses had become a regular column in the Gazette.

"Darn, that made me pay more attention to what I was saying! But I did decide to affect a deliberately curmudgeonly attitude; I didn't want to sound like the corporate tech support 'weenie' that I was so experienced at playing. That's not what Linux was about!" ( curmudgeon means a crusty, ill-tempered, and usually old man, according to the Merriam-Webster OnLine dictionary. The word hails back to 1577, origin unknown, and originally meant miser.)

Eventually, Heather got involved and took over formatting the column, and maintaining a script that translates "Jim's e-mail markup hints" into HTML. Since then, Jim and Heather have (finally) invited other generous souls to join them as The Answer Gang.

Copyright © 2004, Jim Dennis. 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 102 of Linux Gazette, May 2004

A Shell Named Westley

By Theresa L Ford

I think of the different shells as clones of little worker guys. sh drinks beer, sports a nice beer belly, and is quite content to do what you ask him to. bash drinks beer AND smokes cigars. ksh is an outdoor barbeque type who likes food and sports with whatever drink is handy. csh only drinks dry martinis and has a dark sense of humor. Each of these worker types speaks a slightly different dialect and gets confused if you offer him beer when he distinctly requires a dry martini. Each has his own unique DNA (sometimes referred to as initialization scripts).

You can change which shell worker type you want to order around on a routine basis using a magic wand etched with the word 'chsh' to point at the one you want to come running first. This doesn't limit you, though, because you can always clone a new one of any type by saying his name. The conscription of new workers can even be done inside files using a #! whip.

Each worker does his job at a minimum wage of $0, but may require some training and additional $'s, maybe 1-9, and will tell you how much you gave as a simple $#. If you overpay him, you might have to shift his wages a little. Sometimes, the worker can be paid in special loot like gems, $* (equivalent to all given), or $@ (also equivalent to all given but requires that the worker spend proceeds only after careful consideration of all estimate quotes).

Additionally, each worker operates under specific user permissions and may have problems if you tell him to do something he isn't allowed to do. He has a distinct personality and only sometimes likes to interact with you; in fact, these workers can hide from you in the background (sly buggers, these shells!) or let you watch them operate.

Each worker can request another worker clone (of any installed type), called its child, through a process named 'spawning'. He can learn a specialized vocabulary (if you define each new word as a variable) and is even capable of sharing his vocabulary with his children, but only if you specifically tell him to! Though he'll forget some of his words if you unsettle him.

If you give him enough $$, he'll tell you who he is. If he's hiding, you have to shout ($!) to get his attention so he'll tell you who he is. You can ask him a question ($?) and he will tell you how he did at his task. In all, I think I shall name all my shell worker clones "Westley", call them "Farm Boy", and expect them to respond, "As you wish..."

Additional Information

[See also the author's origami page with animated GIFs. -Editor.]


[BIO] Easily amused by many things, Theresa L. Ford plays with computers, origami, wild plants, hydroponics, writing, and games. You can peek into her mind at her website: Cattail.nu.

Copyright © 2004, Theresa L Ford. 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 102 of Linux Gazette, May 2004

Songs in the Key of Tux: More Songwrite

By Jimmy O'Regan

This is supposed to be a series, and to be so, it requires at least a second article. In my defence, I haven't had Internet access since the last week of November last—a few days since I submitted my last article, in fact.

In the meantime, I've had plenty of time to get to know Songwrite better. Since December I've been using it exclusively for tablature; I haven't booted Windows once since then. So I have two goals for this article: to pass on what I've picked up in the past four months, and to correct the inaccuracies of my last article.

Songwrite has found a new home. It can now be found at http://oomadness.nekeme.net/en/songwrite/index.html

Corrections

First things first: corrections. In my last article I said that Songwrite doesn't support whammy bar dives. This isn't strictly true: Songwrite supports downward bends, just not to the extent that a whammy bar can—Songwrite can only support down bends of two semitones. If you try to bend lower than this, it might do it for you, but it'll bend up again, which is rarely what is intended. I'll describe entering bends a bit later.

I also said that Songwrite doesn't support tempo changes. Not only is this incorrect, it's also not what I meant to say. I had meant that it didn't support tempo changes when importing GuitarPro files, but, in fact, it does (though it did miss on the few examples I tried when writing the article, it was successful in later tests more often than not). There is one problem when importing GuitarPro files—the tempos are too fast. This is not Songwrite's fault though, as MIDI files I converted with GuitarPro play too fast as well.

Lastly, I said that Songwrite added an extra string to a file I was working on. I must have done that myself, because repeated use has shown that Songwrite simply doesn't do that. It will, however, maintain the notes which were pasted over the "edge" of the staff, so that the notes can be dragged into the correct location.

One thing to watch out for when using Timidity with Songwrite is that the "Distortion Guitar" sound is an octave too low. This is not a Songwrite problem, though Songwrite uses Timidity for playback (it can also use playmidi, or any other MIDI player). It's not even Timidity's fault, it's the soundfont. Guitar is traditionally transcribed an octave higher than it sounds, and whoever added the "Distortion Guitar" sound was a bit overhelpful.

Tablature Basics

I've already discussed basic note entry, though it's worth noting that you can navigate around the tablature using the arrow keys, instead of having to reach for the mouse every time you want to enter a note. Most features are available from the keyboard - to add a hammer-on or pull-off, press 'h'; to slide, press 's' (for these effects, you need to have a target - Songwrite won't let you hammer-on to nothing); for tremolo, 't'; for bend, 'b'; for roll, 'r'; and to reset to normal, 'n'. You can also set a note's properties by double-clicking on the note and selecting the property you wish to change, or by selecting 'Note->Properties...'. You can also raise and lower the pitch of a note by pressing '+' and '-', respectively, or by simply pressing 'Enter' to get an open note. (Note: This is 'Enter' on the numeric keypad; the other 'Enter' marks a note as "strong").

When you enter a bend, either by using the keyboard or the note properties, you can then select the note properties to set the extent of the bend; 0.5 is a semitone, 1.0 is a whole tone, -1.0 bends down a whole tone etc. Bear in mind that if you have used the note properties to set the bend, you have to dismiss the dialogue and reopen it. Songwrite only supports bends between -1.0 and 1.0 without bending back in the opposite direction though, so watch out!

Note placement

Placing notes in Songwrite is very simple, as I've said before; rather than requiring that the user enter notes and rests linearly, Songwrite simply lets you enter the note where it's required, and there isn't a way to enter rests - simply leave the space blank.

When pasting or moving notes with the mouse, the note duration currently selected determines where you can place the notes. For most music, this means selecting a sixteenth duration before selecting the piece you wish to move/paste—and I mean before, as selecting a different note duration while notes are selected changes their duration (well, what did you expect?). If you forget this, don't worry! Songwrite has a great Undo/Redo facility!

Tied notes

Songwrite's support for tied notes is so simple and obvious that my months of using other tablature programs hid it from me: you don't tie the notes. If you've got a syncopated riff which starts with an eighth note which plays a sixteenth before the beat, you simply place the note a sixteenth before the end of the previous bar, and enter an eighth note. If you're using hammer-ons or pull-offs in a chord, you set the rest of the chord to the entire duration, and simply change the notes where the hammer-on occurs. Songwrite then puts in the rests when you export to Lilypond or MIDI.

Tuning

Songwrite is set up by default for standard tuning (EADGBE), which is fine for most guitarists, but I use quite a lot of tunings - Drop D from my Helmet rip-off days, Eb from my Slayer rip-off days, C# from my death metal phase (i.e. right now), etc. etc.

The tunings dialogue (or "dialog" if you must) in Songwrite (available from each instrument's 'Properties' button, above the tablature staff) is easy to understand - select the string you wish to tune, and move the slider to the correct note. There is, however, one problem - some notes don't show up on the slider! For example, if I want to use Drop-D tuning, I would expect to be able to just move the slider to 'D', but it skips straight from D# to Db. To get around this, at first I tried creating a blank file, saving it, and then manually editing the file to get the correct tuning. As you might expect, this got really tedious, so I decided to change the source to add the tunings I use regularly.

Since Songwrite is written in Python, the source is installed by default, so I didn't have to go digging in backup CDs for the tarball. By default, Songwrite comes with two guitar tunings available from the 'Partition' menu--'Guitar Standard' and 'Guitar DADGAD'. 'DADGAD' seemed unique, and the only instance I found was exactly what I was looking for: the area where the tunings are defined, in tablature.py

guitar_view_type = view.ViewType("tab", _("Guitar"       ), Tablature, \
{ "strings_args": ((64, 0), (59, 0), (55, 0), (50, 1), (45, 1), (40, 1)) }, 24)
view.ViewType("tab", _("Guitar DADGAD"), Tablature, { "strings_args": \
((62, 0), (57, 0), (55, 0), (50, 1), (45, 1), (38, 1)) }, 24)
view.ViewType("tab", _("Bass"         ), Tablature, { "strings_args": \
((43, 0), (38, 0), (33, 1), (28, 1)) }, 33)
view.ViewType("tab", _("Banjo 5G"     ), Tablature, { "strings_args": \
((62, 0), (59, 0), (55, 0), (50, 0), (Banjo5GString, 67, 0)) }, 105)

Now, I've never used Python before, but this looked straightforward enough, so I dove in and made my changes (after making a copy of the original file, obviously), ran Songwrite and enjoyed my new tunings.

guitar_view_type = view.ViewType("tab", _("Guitar"       ), Tablature, { \
"strings_args": ((64, 0), (59, 0), (55, 0), (50, 1), (45, 1), (40, 1)) }, 24)
view.ViewType("tab", _("Guitar DADGAD"   ), Tablature, { "strings_args": \
((62, 0), (57, 0), (55, 0), (50, 1), (45, 1), (38, 1)) }, 24)
# Helmet, Metallica, Nirvana, Van Halen etc.
view.ViewType("tab", _("Guitar Dropped D"), Tablature, { "strings_args": \
((64, 0), (59, 0), (55, 0), (50, 1), (45, 1), (38, 1)) }, 24)
# Hendrix, Slayer etc.
view.ViewType("tab", _("Guitar Eb"       ), Tablature, { "strings_args": \
((63, 0), (58, 0), (54, 0), (49, 1), (44, 1), (39, 1)) }, 24)
# My crappy Strat copy. I've set this 'cause the tuning dialogue won't let me
# set the correct tuning on the G string. Set to overdriven guitar by default.
# Slayer's later albums use this tuning.
view.ViewType("tab", _("Guitar C#"       ), Tablature, { "strings_args": \
((61, 0), (56, 0), (52, 0), (47, 1), (42, 1), (37, 1)) }, 29)
view.ViewType("tab", _("Bass"            ), Tablature, { "strings_args": \
((43, 0), (38, 0), (33, 1), (28, 1)) }, 33)
#My brother has a 5 string bass as well as a normal bass.
view.ViewType("tab", _("5 String Bass"   ), Tablature, { "strings_args": \
((43, 0), (38, 0), (33, 1), (28, 1), (23, 1)) }, 33)
#I read about this in Guitar World. Possibly an April issue :)
view.ViewType("tab", _("Bassitar"        ), Tablature, {"strings_args": ((43, 0), \
(64, 0), (59, 0), (38, 0), (55, 0), (50, 1), (33, 1), (45, 1), (50, 1), (28, 1)) }, 33)
view.ViewType("tab", _("Banjo 5G"        ), Tablature, { "strings_args": \
((62, 0), (59, 0), (55, 0), (50, 0), (Banjo5GString, 67, 0)) }, 105)

The only parts of that I really understand are "Bassitar" etc. are the names which appear in the menu, and the (64, 0) stuff is the tuning details: one per string, starting with the lowest string; the number for the note (the number which appears in the tuning dialogue); and the "tuning direction" (which doesn't seem to do anything).

Lyrics

Entering lyrics is as simple and logically arranged as everything else - to enter lyrics, you first need to enter the vocal melody. Songwrite then arranges the words beneath the corresponding note. Pressing space or tab moves the cursor underneath the next note, as does entering '-', which cuts the word (which are reassembled in Lilypond's output). 'Enter' brings you on to the next line (though you need to place a double backslash before the newline to have each line show up correctly when printed - see below).

Song Properties

Now, like most other tablature programs out there, Songwrite lets you add information about the song. Unlike other programs, Songwrite uses Lilypond and LaTeX to generate its printed output. A nice side effect of this is that you can write whole articles in Songwrite, with a nice