LINUX GAZETTE

January 2003, Issue 86       Published by Linux Journal

Front Page  |  Back Issues  |  FAQ  |  Mirrors
The Answer Gang knowledge base (your Linux questions here!)
Search (www.linuxgazette.com)


Linux Gazette Staff and The Answer Gang

Editor: Michael Orr
Technical Editor: Heather Stern
Senior Contributing Editor: Jim Dennis
Contributing Editors: Ben Okopnik, Dan Wilder, Don Marti

TWDT 1 (gzipped text file)
TWDT 2 (HTML file)
are files containing the entire issue: one in text format, one in HTML. They are provided strictly as a way to save the contents as one file for later printing in the format of your choice; there is no guarantee of working links in the HTML version.
Linux Gazette[tm], http://www.linuxgazette.com/
This page maintained by the Editor of Linux Gazette, gazette@ssc.com

Copyright © 1996-2003 Specialized Systems Consultants, Inc.

LINUX GAZETTE
...making Linux just a little more fun!
The Mailbag
From The Readers of Linux Gazette


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.


FvwmCommand (FvwmCommandS)

Fri, 15 Nov 2002 17:17:20 -0100
Hans Borg (Hans.Borg from Physics.umu.se)

%AB Heather Stern, Thomas Adam %%AB

Hi all,

Have tried to find a help forum for Fvwm* stuff, but can't find any. My be just tipping me of one is enough.

The problem: Have made an application using FvwmCommand that works fine when running under /root (super user, SU). However, when running under a "normal" user it fails by the FvwmCommand fifos.

[Thomas] I use nothing but fvwm :-) I love it. It would be useful to know which version of fvwm you're running.

My understanding: The FvwmCommandS sets up 2 fifos (C,M) in /var/tmp and always get the permission prw-------. Those fifos doesn't seem to be accessible from none SU.

[Thomas] Yeah -- I checked the Changelog file for fvwm version >=2.3.0, and there was a bug within the FvwmCommand module. However, as of version 2.3.6, it was fixed. I'd upgrade to the latest stable release.

When trying not SU, always get the report:

No such file or directory FvwmCommand error in opening message fifo: Permission denied.

May be this is deliberately from some security point of view, but on the other hand FvwmCommand is "x for all" in my default installation.

Best regards

[Thomas] As Heather goes on to explain, it is most likely a umask problem.
I'm a fvwm fan myself, but I've not used the FvwmCommand module. Generally I just put things on the menus as Exec calls.
However, it sounds like a umask problem; and possibly a permissions problem in the filesystem. /var/tmp, rather like /tmp, should be permissions 1777 (sticky-bit, everybody can see and write and stat things in the directory). The permissions your file got would be sufficient to defend it from other accounts reading it, but should allow the creating account to work with it. Also note that it's not executable; you weren't trying to create a script and then run it, were you? -- Heather
[Thomas] But that's what FvwmCommand can do heather! It's supposed to do that :-)
Is it also supposed to refuse to do it if the result is not marked executable?
For doing, um, dynamic things I like to have a tmp under my homedir, which belongs only to me (mode 0700) so I can do strange things but I don't subject myself to possible nosy other users. Mind you, I don't usually have other users to worry about, but what the heck; I plan some things here that may get put in production elsewhere. -- Heather

Thanks for your answers and appologies for my late
response. Have been away we no net capabilities.

I agree that it looks like a permission problem as is actually reported. There should be no problem with the /var/tmp directory permissions. They are both "rwx" (7) for all.

You don't mention if it's sticky (shows drwxrwxrwt with ls) -- Heather

The problem seems to be related to FvwmCommandS that sets up (I guess) the two Fifos and also sets the permission to prw-------. By the way, what does "P" stand for.

p stands for named pipe. Stdout (standard out) of one process may be set to feed into a pipe, and the program attached to pick up stdin (standard input) from that pipe can use that to do whatever it needs to do next.
Both the programs should have the permission to reach the pipe that has been created; the umask of the fvwmcommand process is probably restricted to prevent nasty side effects. -- Heather

Have tried after FvwmCommandS is spawned to (as SU) change the fifo permissions by all sorts of combinations with no luck. Typically I can get to prwSrwSrw-. In chmod I used "s" but comes out as "S".

That's because it had no execute permission; since the "Suid" shares a space with the "eXecute" bit, a way was needed to show that both are set, or only one of them,
execute but not suid: for owner and group, the first two triplets: rwx
execute AND suid: for owner and group: rws
not execute, but suid. This doesn't make sense for most purposes: for owner and group: rwS
execute but not sticky: for "other", the third triplet: rwx
execute and sticky: for other: rwt
not execute, but sticky. again it's rare for this to be reasonable: for other: rwT
Now, since the suid, exec, and sticky bits don't affect the read or write, those "rw" could really be any of "r-" "-w" "--" or "rw". -- Heather

My version of FvwmCommand is 2.4.7. I do not know what, or how to find out the version of FvwmCommandS.

I do not know that either. Perhaps Thomas Adams or one of the other Answer Gang members can help further. -- Heather

Thanks a lot for the information on permissions. Some of them were new
to me.

Honestly, I have to tell that I have rewritten the application in order not to use FvwmCommand, but it is still interesting to know where the problem sits. It may be useful in the future.

Just for testing I have done the following (may be someone can do the same ?).

  1. I have set the permissions as (a lot shouldn't be needed, but just for test): FvwmCommand: -rwsr-sr-x /var: drwsrwsrwx /var/tmp: drwsrwsrwt
  2. FvwmCommandS is spawned by fvwm95 (using that). When spawned I changed (as root) the two fifos permissions to: prwsrwsrwx
  3. From an xterm I run: FvwmCommand Restart fvwm95. Works when logged in as root but not as !root user.

Well, as having rewritten the application it is no longer of utmost importance.

The Answer Gang has been of a lot of help in the past. Thank you all.

Best regards
Hans.

During this thread I cc'd the Answer Gang back in so the entire Gang can help you out here. Any one of us could go underwater with complicated questions, so we do not "assign techs" to help anybody all alone. Good thing too - nice to have Thomas confirm what I was groping around in the dark about...
... and that's where it comes to you, dear readers. Hans solved his problem, by avoiding it. But if anyone happens to know what it's really up to - was it really a bug in that version, does it really work now? If anyone else out there is using fvwmcommand actively, drop us a line and let us know what you're doing with it. I presume, making FVWM a little more fun :)
Other articles or replies about making your favorite window manager do cool and weird things are also welcome. If we get enough maybe it could be the month of "The Truly Cool Things We Did To Our Computers" -- Heather


Installing Redhat on Dell X200 laptop (via 1394 CD)

Thu, 19 Dec 2002 14:58:35 -0700
Montgomery, Jim (jmontgomery from peakdatallc.com)

Please help me install Redhat 7.3 on my Dell X200 laptop. This machine has a firewire CD from which I am able to start the install process. However, the install process soon asks for the device from which to do the install (NFS, FTP, Hard disk, etc.).

No option is given for CD. It looks my BIOS can see the 1394 CD but Redhat cannot. I've looked in all the obvious places for 1394 firewire drivers (Redhat, Dell, Linux documentation and discussion sites). Please help. NFS/FTP boot is not an option.

Thanx, Jim Montgomery

[Heather] For that matter, if our readers know any distro that would cleanly install from a firewire CD, let us know. Distro vendors - look forward to more questions like this!

GENERAL MAIL


Thanks for the viewer hints

Wed, 27 Nov 2002 19:23:09 EST
JRook78123 (JRook78123 from aol.com)

I forgot to tell the lads and lassies at Linux.......I got the .max viewer online and downloaded it.......Now I can view my nieces scans without having to fiddle with them......

Again and again, THANKS!

Jack - Chicago


The last word on "daemon"

Wed, 4 Dec 2002 09:56:00 +0100 (CET)
Maurizio Loreti (loreti from pd.infn.it)

I have read on the December Linux Gazette (mailbag) another letter about the etimology of "daemon". Usually for this kind of things the ultimate source of knowledge is "The Jargon File" by Eric S. Raymond, aka ESR (aveilable at the URL http://www.tuxedo.org/~esr/jargon) .

At this point he repeats the entry, but you can find it online at: http://tuxedo.org/~esr/jargon/html/entry/daemon.html
The jargon file entry was mentioned in the starter to this thread, which began in the October issue when someone confused about Kylix made a wildly incorrect guess about the origin of "daemon" and was immediately fed all sorts of tasty bits by The Answer Gang. I thought the timing was quite excellent as it arrived perfectly for Halloween. http://www.linuxgazette.com/issue83/tag/1.html
It has since seen replies in November's and December's mailbag http://www.linuxgazette.com/issue84/lg_mail.html http://www.linuxgazette.com/issue85/lg_mail.html which remove the haze of years that a glossary entry generally summarizes out of existence, to describe current usage only. The Jargon File doesn't always do this, but the information lost by not being quite common enough "common knoqledge" before this began to be set down as bits (and eventually paper) sadly does the glazing over quite well enough.
"ultimate" is a strong word and frankly I rarely use it for anything. Anyone who's been in this business long enough knows that to depend upon only one source for your research isn't really "ultimate" at all, and I'm pleased to have drawn some historians out of the woodwork with more complete info than the Gang pulled out of our wizard hats at the end of September.
In fact, I think the Jargon File maintainers may well like to add details from the etymology-of-daemon thread updates to their entry. To make it more likely, I've cc'd their maintainer list. :) Hi Eric, and everybody :)
As of press time, I haven't seen an update to this entry in the Jargon File as a result. No worries. It's probably because I didn't follow their posting guidelines more closely... -- Heather

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

You can mail submissions for the Jargon File to jargon@snark.thyrsus.com.

We welcome new jargon, and corrections to or amplifications of existing entries. You can improve your submission's chances of being included by adding background information on user population and years of currency. References to actual usage via URLs and/or Google pointers are particularly welcomed.

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


GAZETTE MATTERS


answerguy and tag addresses gone

Wed, 4 Dec 2002 09:55:22 -0800
Mike Orr (Linux Gazette Editor)

The answerguy and tag addresses are now gone, "user unknown", bye bye, see ya. Answer Gang, expect a significant decrease in spam. -- Mike

And I suspect a significant amount of rejoicing from our sysadmin, Dan, who has to clean out the spamtrap occasionally... -- Heather


Thanks

Thu, 12 Dec 2002 21:56:25 -0500
naylor (rnaylor from nhvt.net)

I found the back issues of the Gazette included in the Debian CDs. Another hidden gem. This alone was worth the purchase price. I enjoy the format of multiple answers to questions (eg: the answer gang) and I am suprised that other publications have not tried to copy the format. It kind of has the feel of being subscribed to a news list I subscribed to 'Linux Journal' a couple of years ago because of 'linux Gazette'.

I agree, Linux is more fun.

Why don't you advertise your magazine archives? ~ Buy Our Linux Gazette Archives And Get a FREE Debian 3 Disto.~

Heather specifically wanted The Answer Gang to read like an informal conversation, so that's how she edits it. I don't know why nobody else has copied the style. For LJ, it may be because of tradition and space. The Answer Gang takes up a lot of space when printed, and print magazines have only a limited number of pages, so you'd have to drop a couple articles. But people buy LJ for the articles. -- Mike

(curtsy) thanks for the compliment, guys. I figure, a thick enough thread feels a little like an installfest... all these clues flying around at high speed... bonking people occasionally, but all in good fun. -- Heather

As for the Debian CDs, those are handled by the Debian Project and the CD vendors, so it's their job to promote them. We do have LG on the Linux Journal Archive CD (store.linuxjournal.com, under "LJ Archives"). -- Mike


Re: virtual beer and feature request

Mon, 30 Dec 2002 16:57:24 -0800
Mike Orr (Linux Gazette Editor)
Request by Raj Shekhar (lunatech3007 from yahoo.com)

Can it be possible to append the author bio to the TWDT file. Or maybe make a TWDT for the author bio itself for each issue. I really enjoyed reading the bios :-).

We'll think about this. One of the purposes of the Author pages is to have the latest contact information and bio; the articles and TWDT would not be changed after publication.

Pehaps I can put the entire bio page (minus the links to previous articles, and minus the large type in the header) at the bottom of the TWDT article, with a note that this information may be old and another link to the Author page.

Thanks for looking into my feature request about the author's bio. What you suggested is exactly what I wanted.

Done, starting in January's issue. -- Mike



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/
Copyright © 2003
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
More 2-Cent Tips

This column is not ready yet. Please check back in 24 hours.

 


Copyright © 2003, . Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
The Answer Gang

This column is not ready yet. Please check back in 24 hours.

 


Copyright © 2003, . Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
News Bytes
By Michael Conry

News Bytes

Contents:

Selected and formatted by Michael Conry

Submitters, send your News Bytes items in PLAIN TEXT format. Other formats may be rejected without reading. You have been warned! A one- or two-paragraph summary plus URL gets you a better announcement than an entire press release. Submit items to gazette@ssc.com


 January 2003 Linux Journal

[issue 105 cover image] The January issue of Linux Journal is on newsstands now. This issue focuses on Networking/Telecom. Click here to view the table of contents, or here to subscribe.

All articles older than three months are available for public reading at http://www.linuxjournal.com/magazine.php. Recent articles are available on-line for subscribers only at http://interactive.linuxjournal.com/.


Legislation and More Legislation


 ElcomSoft Innocent

The first criminal trial under the Digital Millennium Copyright Act (DMCA) has resulted in a not-guilty verdict. The history of this case goes back to July 2001, when a soon to be famous Russian programmer by the name of Dmitry Sklyarov was arrested while attending Defcon in Las Vegas. He had come to the attention of the authorities through his work for software company ElcomSoft on a computer program capable of removing copy protection on documents created using the Adobe ebook format. Sklyarov's presentation at Defcon was on the subject of the weak protections offered by this ebook format

Dmitry's incarceration was to last 3 weeks, subsequent to which he was required to remain in the United States for a further 6 months while various legal details were hammered out. The result was that Dmitry would not have to face prosecution. Instead his employer, ElcomSoft, would have to face the charges, and Dmitry would be obliged to return to the US to testify in the trial. In the course of these events, widespread public opinion was sympathetic to Dmitry's plight, and this was likely a factor in Adobe's distancing itself from the case. Notwithstanding this, Adobe is still (as reported by The Register) a strong supporter of the DMCA, and advocates further criminal prosecutions.

In the intervening period leading up to the current trial, unsuccessful attempts were made to pre-emptively stop the prosecution based on challenges to the constitutionality of the DMCA law. These arguments were based on assertions of the right to free speech (including the rights of third parties to fair use of copyright materials), and also on a claim that the law was so vague as to be unconstitutional. Judge Ronald Whyte dismissed these motions in May 2002. Although the Judge accepted that computer code was free speech, he asserted that the DMCA was content neutral and thus dealt with computer programs on the basis of its purpose, rather than its content. He also decided that no fair use was prohibited by the DMCA, while acknowledging that many uses may be made substantially more difficult. Whyte also ruled that the law was sufficiently precise to be constitutional. This decision is a significant victory for the DMCA supporters, as was noted by Lewis Clayton in his review of IP cases in 2002, and strengthens the legitimacy of the law.

Following some difficulties with visas and the US State Department, Dmitry and Alex Katalov (chief executive of ElcomSoft) finally travelled to California in December 2002 for the trial. Some transcripts from the trial have been made available online. Additionally, Lisa Rein has done a good job of reporting on the court proceedings. A significant point on which the trial hinged was whether ElcomSoft wilfully broke the law. It was the jury's opinion that while ElcomSoft's product may have violated the DMCA, they did not distribute it while aware of this infringement. The open manner in which the product was distributed contributed to this image. The jury is also reported as having difficulties with the severe curtailment of users' rights inherent in the application of the DMCA to the ebook format.

The consequences of the verdict are unclear. Don Marti believes it is a hugely positive development, and that Federal prosecutors will be slow to attempt another DMCA criminal case given the failure of the ElcomSoft prosecution. Linux Weekly News is less upbeat, and sees this primarily as a victory for ElcomSoft. The point is made that it has now been shown that the DMCA can lead to "expensive criminal trials and arrests, even if they win in the end". This is only partly true, since as Don points out, the Federal authorities will only prosecute cases they believe can be won, and the ElcomSoft verdict raises the standard of evidence required to justify such an opinion. However, the civil-law provisions of the DMCA can also be used to cripple smaller companies with the burden of an expensive DMCA defence, and it is at the discretion of the complainant if and when to bring such cases.

Below is a quasi-random selection of the recent media reporting on the case, arranged in approximately chronological order.


 DVD Jon

Jon Johansen is another young man who has found himself in court in the past month as a consequence of his involvement in software development. Jon's case began three years ago, when the young Norwegian participated in the development of the DeCSS program. The purpose of DeCSS was to allow playback of DVD movies on systems, such as Linux, which lacked DVD playback software. Though Johansen has been strongly associated with the DeCSS software, he is keen to point out that he was only a minor collaborator in its development. However, the other collaborators in the project have remained anonymous, leaving Johansen facing criminal charges in a Norwegian court.

Though Jon could have faced up to 2 years in jail, the prosecution has sought a sentence of 3 months probation along with payment of US$1400 court fees and confiscation of his computers should he be found guilty. Jon has strongly defended his innocence. Prosecution questioning appears to have focused on the possible use of DeCSS for DVD piracy. Johansen has argued that although DeCSS could possibly be used in some forms of piracy, piracy is entirely possible and quite easy even without DeCSS. The primary purpose of DeCSS is the playback of DVDs that customers have legally purchased. A verdict is expected early in January 2003.

It is worth putting this case in the context of other cases which have been taken in the US to suppress DeCSS. Cryptome has a large number of documents relating to these cases, as does the EFF. Of particular interest is Jon Johansen's testimony in the New York DeCSS trial, where he gives much of the background to these cases. Though Jon's trial relates to the actual development of the software and breaking protection on a DVD, in the case of the NY trial the issue concerned the legality of simply linking to DeCSS on the internet. Many have objected strongly to these draconian prosecutions, and have ridiculed the law by finding novel, clever or humorous ways to distribute DeCSS. An example is Phil Carmody's publication of a prime number which is also, neatly, a valid DeCSS executable. This follows from his first "illegal" prime which contains the DeCSS source code.


 The Yes Men

The DMCA has also found use in efforts to silence a group of satirical impostors, known as The Yes Men. A parody website, which was located at www.dow-chemical.com, was constructed to draw attention to the 18 year legacy of the Union Carbide chemical disaster in Bhopal, India which killed 20,000 people. Union Carbide is now a part of the larger Dow company. On the 18th anniversary of the tragedy, a hoax press release was issued, purporting to be from Dow and addressing why Dow was unable to accept responsibility for the injuries and deaths.

"We understand the anger and hurt," said Dow Spokesperson Bob Questra. "But Dow does not and cannot acknowledge responsibility. If we did, not only would we be required to expend many billions of dollars on cleanup and compensation--much worse, the public could then point to Dow as a precedent in other big cases."

Dow's reaction was one of anger, and a letter was sent to the site's upstream provider verio.com requiring the removal of the website. This communication served notice of a violation of the DMCA (the parody used logos and designs from the original Dow website), and this effectively obliged Verio to take immediate action. Verio withdrew service to Thing.net, the New York activist oriented ISP hosting The Yes Men's site. This action simultaneously took down a range of unrelated arts based websites. Subsequently, Verio has served notice that Thing.net must relocate to another provider within 60 days, after which point service will be terminated.

As well as intimidating the service providers, Dow succeeded in taking control of the www.dow-chemical.com domain name (which it turns out they owned, as it was registered by the pranksters in the name of James Parker, son of the Dow CEO). Nevertheless, the website can be viewed at numerous mirrors. A list of current mirrors can be found in The Yes Men's account of events. The original press release is also included.


Linux Links

Australian newspaper, The Age, has published an interview with Rick Moen (yes, the Rick Moen of The Answer Gang).

LinuxDevices.com has published the proceedings from the Fourth Real-Time Linux Workshop held December 6-7, 2002 in Boston.

Some links of particular interest from Linux Weekly News:

An encouraging Siliconvalley.com report on the accessibility of Linux to new users.

Vanishing Features of the 2.6 Kernel.

Dustin Puryear explores recent enhancements to Samba. (Dustin is also an LG author.)

The BBC reports on free software, as explained by Richard Stallman.

Fitting a computer to an albatross.

Some interesting stories from The Register:

Newsforge commentary on teaching GNU/Linux to new users.

PC World article reporting a study which says that the appeal of Linux is emotional rather than technical.

Tinyminds.org have interviewed kernel developer Robert Love. He discusses some issues relating to the current development kernel series, and how new features will manifest themselves for desktop users.

Some links highlighted by Linux Today:

Linux and Main, rewindable desktops. Summarises a paper by Bowie J. Poag.

Some links of interest from Linux Journal.

Santa considers switch to Linux, Red Hat is frontrunner.

LinuxSecurity.com has reported that despite the availability of fixes attackers are still compromising servers with well known attacks. The article has tips on improving security and security awareness. Some interesting links from Slashdot:


Upcoming conferences and events

Listings courtesy Linux Journal. See LJ's Events page for the latest goings-on.


Consumer Electronics Show
January 9-12, 2003
Las Vegas, NV
http://www.cesweb.org/

LinuxWorld Conference & Expo
January 21-24, 2003
New York, NY
http://www.linuxworldexpo.com/

O'Reilly Bioinformatics Technology Conference
February 3-6, 2003
San Diego, CA
http://conferences.oreilly.com/

Game Developers Conference
March 4-8, 2003
San Jose, CA
http://www.gdconf.com/

SXSW
March 7-11, 2003
Austin, TX
http://www.sxsw.com/interactive

CeBIT
March 12-19, 2003
Hannover, Germany
http://www.cebit.de/

4th USENIX Symposium on Internet Technologies and Systems
March 26-28, 2003
Seattle, WA
http://www.usenix.org/events/

PyCon DC 2003
March 26-28, 2003
Washington, DC
http://www.python.org/pycon/

AIIM
April 7-9, 2003
New York, NY
http://www.advanstar.com/

SD West
April 8-10, 2003
Santa Clara, CA
http://www.sdexpo.com/

COMDEX Chicago
April 15-17, 2003
Chicago, IL
http://www.comdex.com/chicago/

Real World Linux Conference and Expo
April 29-30, 2003
Toronto, Ontario
http://www.realworldlinux.com

USENIX First International Conference on Mobile Systems, Applications, and Services (MobiSys)
May 5-8, 2003
San Francisco, CA
http://www.usenix.org/events/

USENIX Annual Technical Conference
June 9-14, 2003
San Antonio, TX
http://www.usenix.org/events/

CeBIT America
June 18-20, 2003
New York, NY
http://www.cebit-america.com/

The Fourth International Conference on Linux Clusters: the Linux HPC Revolution 2003
June 18-20, 2003
Las Vegas, NV
http://www.linuxclustersinstitute.org/Linux-HPC-Revolution

O'Reilly Open Source Convention
July 7-11, 2003
Portland, OR
http://conferences.oreilly.com/

12th USENIX Security Symposium
August 4-8, 2003
Washington, DC
http://www.usenix.org/events/

LinuxWorld Conference & Expo
August 5-7, 2003
San Francisco, CA
http://www.linuxworldexpo.com


News in General


 iCanProgram

Spaces are still available for the iCanProgram course. iCanProgram began a year ago, offering online programmer training courses with a "no fee in return for a Cancer Research donation" format. Over the course of 2002 more than 1500 students have participated.


 GFDD

Debian Weekly News reported on the 'stable' launch of GNUtemberg! Free Documentation Database, or GFDD. The GFDD is a free database for free documentation, providing services such as indexing, translation management, information on official publishing, document ratings, statistics and search.


 Galuna S.R.L.

Galuna S.R.L. aims at supporting and improving Linux for Romanian users. The company translated major parts of GNOME desktop environment and helps new users migrate from Microsoft products to Linux, increasing productivity while reducing costs and software piracy rate which is very high in Romania.

To help clients benefit from open-source software advantages at high quality standards, Galuna offers both standard and custom solutions. Visit www.galuna.ro for presentations of Linux advantages and available desktop applications.


 IBM Ships New Linux Ready eServer Systems

IBM has announced that it is shipping Linux ready IBM eServer pSeries systems. Equipped with POWER4 processors, IBM claims the new eServer system costs substantially less than a comparably configured Itanium 2 based system from Hewlett-Packard.


 rpmseek.com - New rpm search engine

The new Linux portal www.rpmseek.com claims to offer users of the Linux operating system a convenient search engine for rpm packages. The packages can be searched by various criterions, such as package name, file name, distribution, keywords, dependencies or files that a package contains. Dependecies between packages are resolved by cross references.

For every rpm package there are numerous detailed informations collected, links to different mirror servers are listed for the download in geographically arranged order. Another highlight is the classification of all rpm packages into categories. This way, a special software type or functionality can be found by browsing the tree structure of the categories. The site also aims to offer a range of documentation and discussion groups.


Distro News


 Debian

The Debian Project has updated the current stable release (Woody) to Debian GNU/Linux 3.0 updated (r1). This update has involved the acceptance and rejection of some packages. The total list of changes for both the regular and non-US branches can be viewed online


Debian Weekly News reported that apt-get.org is now up and running. It maintains a list of unofficial APT repositories.


Debian Weekly News also highlighted two resources which would be of some use to those customising Debian. Martin Sjögren has made available scripts for building CD images based on the new debian-installer. This is of use in putting together small CD images. Also of interest is Create your first Debian Package. Clemens Lee's new Mini-HOWTO entitled " How to Create Your First Debian Package", which describes how to create a Debian package for installation on one's own computer, rather than for inclusion into the official Debian archives.


DesktopLinux has published an interview Colin Walters of the Debian Desktop subproject


DebianPlanet have published an article describing the process of downgrading from Sarge to Woody with Debian.


 Mandrake

In the past month, MandrakeSoft has publicised financial difficulties that could threaten the future of the business. The company has appealed for more users to contribute financially through the purchase of Mandrake products, or by investing directly in the company. It is also hoped that the introduction of commercial licences will help generate larger revenue streams, though Mandrakesoft is at pains to emphasise that this does not represent a retreat from Free Software.


 Rock

ROCK Linux 1.5.20 has been released.


 Slackware

Slackware 8.1 has recently been reviewed by Unix Review and by Distrowatch.


 SuSE

SuSE Linux has announced that the German city of Schwäbisch Hall (population 36,000) will build its IT infrastructure entirely on SuSE Linux - replacing a more costly Windows installation. The town will deploy SuSE Linux on IBM Intel-based servers as well as up to 400 PCs - saving the city an estimated amount of more than one hundred thousand Euro over the Windows installation.


 Xandros Desktop

DistroWatch has published a review of Xandros Desktop 1.0.


Software and Product News


 ActiveState PureMessage: email protection

ActiveState Corp., a producer of email gateway filtering systems, has released PureMessage 3.0 (formerly PerlMx), an update of its anti-spam, anti-virus, and policy compliance solution. PureMessage 3.0 provides IT administrators with new features including a web-based administration console, enhanced spam identification and management flexibility, optional end user quarantine management, next generation anti-spam heuristics, and the McAfee anti-virus engine. The product is aimed at mid to large sized organisations.


 SCO Update and UnixWare 7.1.3

The SCO Group has announced the launch of SCO Update Service, a new program that is claimed to make the upgrade process for SCO operating systems more efficient and less costly. The service is available for SCO Linux 4.0, UnixWare 7.1.3 and will be available for SCO OpenServer 5.0.7 when it ships early next year.

The Update Service simplifies and streamlines the process of deploying new technology and keeping deployed systems up-to-date. This service provides electronic notification and delivery of operating system changes, gives the system administrator control of the upgrade process and helps customers accurately budget for the cost of system upgrades.


 Farpointer

Farpointer Technologies has announced a new automated session management tool for the Apache server. The company's iConductor server module interacts with HTML files to automatically implement session tracking via any URL. In addition, iConductor manages simple key/values as well as complex documents such as Web Services requests and replies. These features save a significant amount of developer time in building Internet-based applications. A free trial version of iConductor and an online demonstration are available online.


 CylantSecure free for personal use

Cylant, a provider of host-based intrusion prevention systems for the Linux server platform, has announced that it is offering the newest version of CylantSecure (2.0.2) free for personal use.


 ProjectForum

ProjectForum provides a solution for flexible workgroup collaboration and coordination of projects over the web. It can be used for project planning, todo lists, design notes, task assignments, meeting notes, problem reports, team discussions, collecting feedback, research, brainstorming and more. Version 1.1 (the first public release) is now available, with versions for Linux, as well as Windows, MacOS X, and FreeBSD.


 ActiveState Updates Perl Development Portfolio

ActiveState has announced new releases of its Perl tools and language distribution: Perl Dev Kit (PDK) 5.0, Visual Perl 1.7, and ActivePerl 5.8. The Perl Dev Kit features tools for building and deploying Perl applications. Visual Perl is the Perl plug-in for Visual Studio .NET. ActivePerl is ActiveState's quality-assured distribution of Perl, available for Linux, Solaris, and Windows.


 Fast Hardware Backup of Big IDE Drives

Arco Data Protection Systems, a provider of low cost IDE disk mirroring (RAID 1) hardware, has announced the release of The DupliDisk3. DupliDisk3 facilitates maintenance up-to-the-minute backups of data and software. The DupliDisk3 supports the Windows, LINUX , Macintosh and DOS operating systems and works by creating an exact bootable replica of your hard drive. The software is designed to handle drives as large as 131 Petabytes (131,072 Terabytes) and can provide copy speeds up to 48 Gigabytes per hour (800 Mbytes per minute).

 

Mick is LG's News Bytes Editor.

[Picture] Born some time ago in Ireland, Michael is currently working on a PhD thesis in the Department of Mechanical Engineering, University College Dublin. The topic of this work is the use of Lamb waves in nondestructive testing. GNU/Linux has been very useful in this work, and Michael has a strong interest in applying free software solutions to other problems in engineering. When his thesis is completed, Michael plans to take a long walk.


Copyright © 2003, Michael Conry. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
An Undeletion Experience
By C.E.C. Artime and J.A. Baro

We describe an attempt of recovering data unadvertedly deleted on a ext2 filesystem. Aware that the course of events was far from desirable, we are committed that our readers will not make the same mistakes and, in order to illustrate the bunch of things that one can learn during a crisis, we detail the whole story.

Prelude: the disaster spells

The arena

Hardware

Two boxes, called Fish and Bell. Fish is a Sun E250. Bell is a Pentium 3 (450 MHz). They are in the same Ethernet subnetwork.

Software

Bell runs Debian GNU/Linux 3.0r0 after a painless upgrade from 2.2r7. Kernel is Linux 2.4.18.

Fish also runs a Debian 3.0r0, port Sparc64. A recent upgrade from 2.2r7 led to a unique problem: XFree does not work for normal users (it does for root). Kernel is Linux 2.4.18-SMP.

All filesystems are ext2.

How we buggered it up

On Fish, Xfree works for root, but not for normal users.
Rationale: either a problem with permissions or user configuration files.
Solution: let us add a user and copy root's dot-files to its home directory:

root@fish# adduser judas
Enter new UNIX password:
Retype new UNIX password:
root@fish# cp --recursive /root/.[a-zA-Z]* /home/judas
root@fish# chown --recursive judas:judas /home/judas/.*

[Did you spot the difference between regexp arguments for cp and chown?]

After enough trail & error, the X problem is finally solved; it is about time to remove the user.
While trying to speed up the procedure a bit, thorough study of a terse man page reveals an appealing option:

root@fish# deluser --remove-all-files judas

Cha-ching! Enters disaster! The unfortunate option makes deluser search the entire disk looking for files owned by judas and erasing them!

Contents of /home disappeared.
Two minutes later, we unmounted its corresponding device (/dev/sda8).

Back-up

First attempt

First cares involve taking a copy of the raw bytes inside the doomed device.
There is no room in Fish, so let us make a copy onto Bell's hard drive:

root@fish# ftp bell
ftp> put '|dd if=/dev/sda8' fishbackup

In fact, this step was not so easy due to a problem with the net: transmission of big files is interrupted after a while. The file must be split. Partition /dev/sda8 is size 10142 MiB.
Resorting to the factor tool of GNU shellutils:

root@fish# factor 10142
10142: 2 11 461

This led us to an appropriate size for each chunk of device.

Secure tunnelling

Instead FTP, we used the OpenSSL suite for the next step.
First we interchange passwords in order to use batch mode:

root@fish# ssh-keygen 
artime@bell$ ssh-keygen
root@fish# scp /root/.ssh/identity.pub artime@bell:/home/artime/.ssh/authorized.keys
root@fish# scp artime@bell:~/.ssh/identity.pub ~/.ssh/authorized.keys

Let us execute this script in Fish:

#!/bin/sh
for i in $(seq 0 460)
do
  dd if=/dev/sda8 bs=$((2*11*1024)) skip=$i of=fula
  scp --batch fula artime@bell:~/fiback.$i
done

Just join the pieces in Bell:

for i in $(seq 0 460)
do cat fiback.$i >> fiback.raw
done

Equivalently we could do the same in one step by executing in Fish:

#!/bin/sh
for i in $(seq 0 460)
do
  dd if=/dev/sda8 bs=$((2*11*1024)) skip=$i | ssh artime@bell "cat >> fiback.raw"
done

Seeking lost data

We can resort to the Linux Ext2fs undeletion mini-HOWTO, by Aaron Crane; the Ext2fs undeletion of directory structures mini-HOWTO, by Tomas Ericsson; the recover program by Tom Pycke; Torsten Werner's patch for debugfs working on i386.

Lazy attempt

Recover is a tool for recovering individual files. As in our case we have suddenly lost hundreds of files, it seems this is not the best choice to begin with. The most direct way is using Werner's debugfs patch; we already have a copy of the damaged filesystem stored in a i386 box, so we can use the binary found at twerner.debian.org:

artime@bell$ ./debugfs fishback.raw
debugfs> restore
debugfs> quit
artime@bell$ mkdir mnt
artime@bell$ mount -t ext2 -o loop fishback.raw mnt
artime@bell$ ls -l mnt

We find no files there! It seems we unmounted /dev/sda8 a little too late. As T. Werner indicates on his page, his tool can only recover files that still have a name.

It pays reading

Crane's undeletion howto

This tool we pick in The Linux Documentation Project taught us how to find the inodes (more or less, the locations) of lost files and how to recover them with the dump command of debugfs. We finish with a lot of assorted files in the same directory, but they are just a small subset of the deleted ones. As mentioned before, a thorough, file by file recovery scheme as indicated in this HOWTO is unfeasible in our case.

Ericsson's directory undeletion howto

Here we learnt how to tell between deleted files from directories. We followed the indications.
The script in section 7 was in need for some further adaptation to our version of debugfs

#!/bin/sh
awk '{ print "mi <" $1 ">\n"\
             "\n\n\n\n\n\n\n"\
             "0\n"\
             "1\n"\
             "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" }'

Anyway, we fail to find the directory names and proceed to section 8. So we must look elsewhere.

Man pages

A last chance was

$ man debugfs

where we found the command rdump, unmentioned in the howtos. Applying the following script to the directory inodes located in lsdel.out of section 6 of Ext2fs Undeletion of Directory Structures mini-HOWTO:

#!/bin/sh
awk '{ print "rdump <" $1 "> folders\n" }'

most directories are recovered into the directory folders. But unnamed! So finally we have to individually assign two hundred folders to users by looking their contents! Even after that, we miss some files, notably an e-mail box. Let us try a quest by hand:

$ strings fishback.raw | grep -B1 -A99 "To: lisistrata" > lisistrata.mbox

Epilogue

Further things we would like to outline.

RTFM

And never use a new option as root for the first time.

Magnetic tapes

Fish has a magnetic tape unit. GNU mt and tar are useful tools for a backup schedule. Aaron Crane's howto includes interesting links regarding this issue.

Regexps

The use of regular expressions in shell commands is very dangerous, especially when dealing with dot-files. Perhaps the superuser root should use a shell with limited (rather than "extended") regular expression support. We are considering esh.

PDA

This article was mostly written with an Agenda VR3, a rather unique free software PDA, in a beach of Gran Canaria.

 

[BIO] C.E.C. Artime is a GNU fan and a free software advocator since 2000.

[BIO] J.A. Baro is a Linux user and a Perl hacker since 1996.


Copyright © 2003, C.E.C. Artime and J.A. Baro. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
I Broke the Console Barrier
By Stephen Bint

Colour text, keyboard and mouse under DOS and the Linux console

When I began using Linux I noticed that most Linux text editors are rubbish, having little or no mouse support, no shift-selection and no menus or file open dialogs. So I thought I could make a contribution, by writing an editor which had all the features we have come to associate with DOS editors, for the Linux console. Why shouldn't the better OS have editors which are at least as good?

So I searched for a library that would give me a colour text-mode interface to both platforms and I found Slang and curses. Neither were satisfactory. In order to provide an interface to a huge list of platforms, many features possible at the Linux console were disabled. Also, they were so big there was no prospect of customising them for my own needs and bundling the modified versions with my own sources. Out of frustration I set out to write my own.

I set myself the target of producing an interface with the widest possible range of ctrl- and alt- key combinations, a function to report the state of shift, ctrl and alt keys, full mouse reporting (including movement) and direct access to a screen array of EGA-style character-colour pairs. I hoped to produce something small and simple enough for programmers to bundle with their own source, so they could modify it if they wish and distribute with confidence.

The Mouse

Programming for the mouse was relatively easy. Under DOS, I just used int86 and Ralf Brown's Interrupt List. Under Linux, I struggled for a while and eventually mastered the gpm mouse driver, which has pretty good docs and demo programs.

The Screen

Finding out how to output colour text to the Linux screen was more of a struggle. I was saved by an article at Linux Gazette called "So You Like Color!!!". I was shocked at what it said.

Unlike DOS, under which characters and colours are written directly to video memory as byte pairs, the Linux screen is refreshed by using fwrite to write to stdout! Instead of a colour being written with each character, the output colour must be changed whenever a character is a different colour to the one written before it. Changing the output colour involves writing an 11-byte string to stdout.

Consequently, screen refresh is very slow under Linux. I did what I could to speed it up. I keep a duplicate screen buffer which is updated as the screen is refreshed. Comparing this to the screen buffer, I refresh only parts of the screen which have changed. Even so, screen refresh takes twenty times as long under Linux as it does under DOS.

It is possible to access video memory in recent versions of Linux, by opening /dev/vcsa as a file. (see man vcs for details) There are two reasons not to do this. One is that only programs run by the superuser are allowed to do it. The second is that only the US ASCII character set is supported. At least with fwrite, the local character set is respected, which is important because Linux is an international thing, from its friendly welcome screen to its big, warm heart.

I found out how to show, hide and position the text cursor by examining the Slang sources and by using an excellent program bundled with Slang, called untic. Untic reads the terminfo database and translates it into human-readable form. (The terminfo database contains the command strings to write to stdout to perform control operations on any terminal.)

There was one little niggle. Under Linux, box-drawing characters are not part of the default character set. ASCII values which produce boxes under DOS produce funny foreign letters under Linux unless you send a string to stdout to switch to the alt character set. Switching to that charset permanently was not an option. I wanted the library to be international like Linux, supporting international character sets, so what to do?

I decided to use the high bit of the colour byte as a box bit. Programmers wishing to draw boxes would have to set the box bit in the colour for any characters they wish to be shown as box characters. This meant that blinking text would not be available, because the high bit is otherwise used for that, but I was happy. I never liked blinking text anyway.

The Keyboard

Interpreting keyboard events on either platform is a giant screaming nightmare on stilts. Under DOS, the BIOS scancodes are so illogically allocated, they might as well be random numbers. Under Linux, the terminal has to be specially prepared and then, the function keys generate strings of bytes which need to be converted to scancodes through a lookup table.

It was almost inconceivable to convert Linux key events to DOS, or vice versa. I decided instead, to produce a pure key function, which would report a key value which is unaffected by control or alt, but will be shifted if shift is pressed. Programmers wishing to use a ctrl- or alt-key combination for a hot key could examine the keyboard status word seperately.

The DOS Keyboard

You might hope that a two-byte BIOS scancode would use the high byte as a key ID which never varies and the low byte for an ASCII value which depends on whether shift, control or alt are pressed. Unfortunately, because of a need to maintain compatability with the old XT keyboard, the high byte varies as much much as the low byte. What is worse, different keys react differently to control and alt. To avoid a time-consuming switch block, I produced a tangle of "if" tests to sieve the identities out of ctrl'd and alt'd scancodes.

Then I found that holding down shift reverses the sense of the numlock under DOS, but not Linux. I had to complicate my key purifier still further to undo that stupidity, so numlock means numbers, no matter what. So DOS was conquered and I faced the horror of the Linux keyboard.

The Linux Keyboard

In its default state, the Linux keyboard is far from suitable for an interactive program. The fgetc() function does not return until return is pressed, then it returns a whole string at once, so moving the cursor with arrows can't work. It echoes characters to the screen and ctrl-z, ctrl-q and ctrl-s all generate interrupts. It's a nightmare.

I had hoped I could avoid using fgetc() and slip the keyboard into raw mode (pure scancodes), but the gpm mouse driver offered me no choice. It provides a single function to read events from both keyboard and mouse, and the keyboard part uses fgetc(stdin). There is a mouse-only polling function, but I couldn't make it work.

I am glad of that now, because I have realised since that fgetc() receives high-level keycodes which are likely to be the same on foreign keyboards, where the layout and probably the scancodes would be different. I resigned myself to translating strings of bytes into scancodes as a necessity and it turned out to be easier than dealing with BIOS scancodes under DOS had been.

I found out how to set up the terminal by examining the Slang sources. You use a function called tcsetattr() to set flags and values in a terminal control structure. So I fixed the keyboard to return characters immediately without echo and to treat ctrl-z, ctrl-q and ctrl-s as ordinary keys.

I still had no kbhit() function, nor any way to read the shift state (whether ctrl, alt or shift are pressed). Google turned up an article at Linux Gazette called "Taming the Linux Keyboard", which gave me both those functions, full source code.

The Final Trial

Still one bugbear remained. It may seem trivial to you but it was everything to me. It seemed insurmountable and I don't mind admitting, it nearly broke me.

You know how on DOS editors you can select text by holding down shift while using cursor-movement keys, including page up and page down? Well under Linux, shift-PageUp and shift-PageDown are reserved for a pointless function called scrollback. That means applications receive nothing from fgetc() when shift-PageUp/Down are pressed. The kernel spirits these keys away and your program never sees them.

But that is not the worst of it by a long chalk. After weeks of brain-busting work I found out at the final furlong, that if a user tries to select text with shift-PageUp, half my lovely colour text screen disappears - scrolled back!

There was no way I could release my library now. I felt like I had read a thousand-page novel and found the last page missing. I went round and round in circles of man pages and info files and searched the net to no avail. Then I noticed that the shift_state() function I got from that article I mentioned earlier, used a function called ioctl() to work its magic.

I used "apropos ioctl" to search the man pages and found one called "console_ioctls". There I discovered that ioctl() is the Linux equivalent of a DOS interrupt call. The same page gave a full list of low-level system calls and a warning from a kernel programmer, never to use these because they are not guaranteed and are subject to change in future versions of the kernel.

But we all know we can ignore kernel programmers when they say things like that. They are just denying responsibility, like when Scotty tells Captain Kirk it's going to take twice as long as it really will.

In the list I found one to change the functions associated with keys - including PageUp and PageDown. It involved filling a struct with three integers, to indicate which table, which key and which command to assign. The problem was, there were no docs telling me what these numbers should be, to disable scrollback for shift-PageUp.

Further research turned up the kbd package, which contains great docs and a bunch of utilities for changing the key mapping. You can dump the current mapping to stdout by running dumpkeys. Here is an excerpt from my dumpkeys output. Notice that it only gives me one of the three numbers I need - the keycode.

keycode 103 = Up              
	alt	keycode 103 = KeyboardSignal  
keycode 104 = Prior
	shift	keycode 104 = Scroll_Backward
keycode 105 = Left            
	alt	keycode 105 = Decr_Console    
keycode 106 = Right           
	alt	keycode 106 = Incr_Console    
keycode 107 = Select          
keycode 108 = Down            
keycode 109 = Next            
	shift	keycode 109 = Scroll_Forward
keycode 110 = Insert          

If you redirect the output into a text file, you can edit it and pass it to loadkeys to alter the mapping. Experiments revealed that you can delete most of the file - only leaving the keys you want to change. So I reduced it to two lines:

shift	keycode 104 = Scroll_Backward 
shift	keycode 109 = Scroll_Forward

and changed the current functions to the ones for those keys without shift pressed:

shift	keycode 104 = Prior
shift	keycode 109 = Next

I called the file kmap and ran "loadkeys kmap". Then I tried my test program and found that scrollback had been disabled - exactly the result I was looking for. I knew now that it was possible. A peek at the source for loadkeys revealed that it used the ioctl I had found, to change the key functions, but I still did not know what numbers to use.

I had no choice but to use cunning. I found out that loadkeys has a -m option, to produce a source file, which contains tables of 256 values. I ran "loadkeys -m kmap" and found it produced one table with 254 null values and two non-null. Counting elements I found that the non-null elements were numbered 104 and 109 - the key codes in my kmap file. The values in the table had to be the values of the "Prior" and "Next" commands.

I also saw that this table had a number. I tried changing "shift" to "control" in one of the lines in kmap and got two tables, one for shift and one for control. In both cases the shift table was table number 1. Along with the actual values in the table, I had my three numbers.

To disable scrollback and scroll forward and make shift-PageUp/Down into ordinary keys, you must save the existing values, then change them and install an exit routine to restore them to normal function afterwards.

If you want to disable any key, such as the console switching keys for example, you will need to mess about like I did with "loadkeys -m" to find the numbers you are looking for.

This function changes a key's action and saves the old one in an integer you pass in by reference (written for gcc):

(text version of all listings)

#include <sys/ioctl.h>
#include <linux/kd.h>
#include <linux/keyboard.h>
#include <stdio.h>

int set_kb_entry( unsigned short table, unsigned short keycode, 
                  unsigned short value, unsigned short *oldvalue ) {

   struct kbentry ke;

   ke.kb_table = table;
   ke.kb_index = keycode;

/* Get old value, return error if table or keycode are duff */
   if( ioctl( fileno(stdin), KDGKBENT, &ke ) )
      return -1;

/* Unless oldvalue ptr is NULL, save old value to restore later */
   if( oldvalue ) *oldvalue = ke.kb_value;

/* The new action for this key */
   ke.kb_value = value; 

/* Do the business, return error if value is duff */
   if( ioctl( fileno(stdin), KDSKBENT, &ke ) )
      return -1;

   return 0;
   }

To use the above function to disable scrollback and restore it on exit:

#include <stdlib.h>

/* Old key action values will be stored in these */
unsigned short scroll_forward = 0;
unsigned short scroll_backward = 0;

/* The magic numbers gleaned from dumpkeys and loadkeys -m */
#define SHIFT_TABLE          1
#define PAGE_UP_KEYCODE    104
#define PAGE_DOWN_KEYCODE  109
#define PAGE_UP_ACTION     0x0118 /* Prior */
#define PAGE_DOWN_ACTION   0x0119 /* Next  */


/* Restore default funcs for shift-PageUp and shift-PageDown */
static void restore_scrollback() {

   if( scroll_backward )
      set_kb_entry( SHIFT_TABLE, PAGE_UP_KEYCODE, 
                    scroll_backward, 0 );

   if( scroll_forward )
      set_kb_entry( SHIFT_TABLE, PAGE_DOWN_KEYCODE, 
                    scroll_forward, 0 );
   }


/* Liberate shift-PageUp and shift-PageDown for normal use */
int disable_scrollback() {

   if( set_kb_entry( SHIFT_TABLE, PAGE_UP_KEYCODE, 
                     PAGE_UP_ACTION, &scroll_backward ) )
      return -1;

   if( set_kb_entry( SHIFT_TABLE, PAGE_DOWN_KEYCODE, 
                     PAGE_DOWN_ACTION, &scroll_forward ) )
      return -1;

   atexit( restore_scrollback );

   return 0;
   }

Return of the Jedi

So I emerged from the dark underworld of the Linux console, prizes in hand, triumphant. I have made it possible for programmers to write console apps which behave exactly the same under DOS and Linux and (I think) secured my place in legend.

And you know what? I never did write that text editor. I can't because I am homeless and I was lucky to get access to a computer long enough to do this little thing. Perhaps that is where you come in.

Linux is a virgin territory, about to be colonized by the people of India and Africa. They can't afford flash computers that can run X, so they need console apps. Now even those of you who don't have Linux installed can help them.

Linux needs pioneers to carve out the infrastructure before the first big wave of settlers can move in. Those settlers will need configuration dialogs for common apps like Apache and for common filters like grep. They will need a good text editor, with a right-click cut-copy-paste menu.

Programmers who mean to produce these tools will need a widget library and especially, a file Open/Save dialog. They would benefit from a well-written string array class with cut-copy-paste functions, provided separately to be used in various, competing text editors.

The perfect editor wouldn't have many features, but would have a simple facility for adding functions to its menus. It would be set up so that any fool could write a C++ function which takes a pointer to an editor as an argument and add that function to the editor's menu, just by adding a single line to main(). Programmers could swap C++ editor functions with eachother and we would be on course to the ultimate editor.

Will you be a pioneer? If no-one bothers, I fear that Linux may fall and we may all end up the helpless playthings of the evil Darth Gates. So I am hoping you will pick up my fallen standard. You may be our last, our only hope. Good luck.

May the Source be with you.

ctio.zip (41.7kb)
ctio.tar (150kb)

Credits

Slang, by John E. Davis. Slang is easy to rob because it is well-written. I learned how to init the keyboard and got most of the command strings for the screen from the Slang sources. I got other command strings by using the untic program that comes with it. But the best thing about Slang is what enables Midnight Commander to run in a telnet window. Anyone who has ever had to fix a web server remotely will know, it's a beautiful thing.

So You Like Color !!! By Pradeep Padala (LG #65). This article got me started on the Linux console screen.

Taming The Linux Keyboard By Petar Marinov (LG #76). My shift_status() and key_awaits() functions are modified versions of shift_state() and kbhit() given away with this article.

Ralf Brown, Patron Saint of DOS programmers

 

[BIO] Stephen is a homeless Englishman who lives in a tent in the woods. He eats out of bins and smokes cigarette butts he finds on the road. Though he once worked for a short time as a C programmer, he prefers to describe himself as a "keen amateur".


Copyright © 2003, Stephen Bint. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
HelpDex
By Shane Collinge

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

[cartoon]

Recent HelpDex cartoons are at Shane's web site, www.shanecollinge.com, on the Linux page.

 

[BIO] Part computer programmer, part cartoonist, part Mars Bar. At night, he runs around in a pair of colorful tights fighting criminals. During the day... well, he just runs around. He eats when he's hungry and sleeps when he's sleepy.


Copyright © 2003, Shane Collinge. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
Ecol
By Javier Malonda

These cartoons were made for es.comp.os.linux (ECOL), the Spanish USENET newsgroup for Linux. The strips are drawn in Spanish and then translated to English by the author. Text commentary on this page is by LG Editor Iron. Your browser has shrunk the images to conform to the horizontal size limit for LG articles. For better picture quality, click on each cartoon to see it full size.





All Ecol cartoons are at tira.escomposlinux.org (Spanish) and comic.escomposlinux.org (English).

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


Copyright © 2003, Javier Malonda. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
EcolNet and the escomposLinux.org project
By Javier Malonda

The (not so) brief story.

Why should I be interested in this article?

This is an article about the birth, growth and everyday life of an Internet community. Why is this Internet community so special? See it for yourself.

We're using cable and DSL Internet connections. Most likely this community model could be run on more modest bandwidth connections. Of course it can be run on better connections, thus offering new possibilities. It's all a matter of imagination and motivation. As for the boxes, some of them are pretty old for today's standards, but they deal very well with their everyday duties, showing the true power of Open Source and being a remarkable example of what can be done with Linux and hardware that someone else would consider a piece of junk.

Following EcolNet's example, bigger or smaller communities could be built on the same basis. Keep on reading and see what we have come up with. Maybe it will fire your imagination. I hope it does :)

Some history

escomposLinux stands for a "short" name of the newsgroups hierarchy es.comp.os.Linux. As you can easily note, this is the root of all Linux newsgroups in Spanish and the other languages spoken in Spain. "es" refers to Spain, in contrast with "esp" which hosts all the Spanish speaking groups in general.

The es.comp.os.Linux newsgroup was founded in 1996, promoted by Pablo Saratxaga. In those days, there was no newsgroup to discuss about Linux in Spanish, not even in the esp.* top-level domain noted before. Later, in 1999, and due to the incredible increase of traffic, a split of the original es.comp.os.Linux was proposed, voted and approved, so four more specific groups were created:

This current year saw the birth of es.comp.os.Linux.anuncios (announcements) , though it doesn't hold much traffic as of now.

In the year 2000, some active es.comp.os.Linux users created a first version of the escomposLinux web page, hosted at Linux-es.com. Not long after that, a group of five ecol users, bought the escomposLinux.org domain and the web page got moved to its actual location, at www.escomposLinux.org. Those Linux users who were especially active at the newsgroups, received web hosting space and FTP access, so they could have a place to display all their Linux documentation and personal projects. Everyone interested, can access to a @escomposLinux.org mail account. I'd like to note that, in Spain, things were hard even in the year 2000, and having an email account was not as easy as it is nowadays.

These "Five Good Men" started the project writing a manifesto about the guidelines to be followed. All initial the costs were assumed by those volunteers, who never asked for financial help. Step by step, the escomposLinux.org project gets bigger and bigger, as new services are added and more people gets involved. Luckily, DSL become relatively affordable. On October 2001, all the services provided at the time are moved to machines run and maintained by regular es.comp.os.Linux.* users. This is when the escomposLinux.org project becomes EcolNet.

What's EcolNet?

Technically, EcolNet is the escomposLinux.org network, a bunch of computers spread all over the country. EcolNet is run, administered and defrayed by volunteers who have in common their passion for Linux and the regular use of the es.comp.os.Linux.* groups. We are not "37337 gurus". We enjoy learning how Linux works. Plus we are happy to help the Linux community.

What was the motivation behind EcolNet? Basically, the terrible management by the Spanish ISPs of the newsgroups, including es.comp.os.Linux.*. Slow services, lost messages... We thought we could do better. Also, the first place that hosted escomposLinux.org was very resctrictive, data storage was expensive and FTP was limited. As soon as we thought we could take care of the services we needed, we moved escomposLinux.org to our home servers.

What's EcolNet current goal? When someone wants to start a project (say a little program, a big one, a documentation project, a game) he doesn't have at hand all the tools he might need. Usually, you'd have your code at sourceforge, maybe freshmeat, an IRC channel at openprojects.org, an FTP in some university lost in some lost place of the planet, and so on. With EcolNet, s/he who starts a project has all the support he may need, and everything centralized: www space, FTP, IRC channel, etc. That's basically what EcolNet offers. But of course, EcolNet is much more than that. EcolNet is a bunch of people who have become good friends enjoying Linux and its philosophy.

Where are the servers located? A map showing these EcolNet machines' location is shown here. You can see the machine's name, its IP, the volunteer's name, their email address and what kind of Internet connection the box has: [Click for image].

This is a nice example of what can be done with Dia. You can find more details about this diagram in the end of the article if you are interested.

So the idea is easy: we take a few computers with a relatively decent Internet connection and create a network providing services. Adding resources and allocating necesities and responsabilities, we have achieved a network which works on small computers and basic DSL Internet connections, depending just on ourselves and our capability to keep the boxes working. EcolNet also allows us to experiment the management of a Linux server, having fun with it, and puts on our shoulders the responsability to keep things working, which is sometimes a bit stressing. But that's what the root life is like, isn't it? ;)

What services do you run at EcolNet?

The list is quite long. EcolNet offers to the Linux community in Spain (completely non profit) the following services:

Besides those services, www.escomposLinux.org holds a lot of information, like Linux related links, book reviews and helpful documentation. And constantly growing.

The services distribution varies from time to time, either when some machines join the EcolNet or when someone experiences problems, like too much bandwidth consumption or some real tragedy. One of our primary servers had a terrible crash featured by the electrical company not long ago. We learnt a few things from that.

We are specially proud of these "Star" features:

Who takes care of the whole thing? Is there something like a president? Do you have an EcolNet king?

There's a lot of people involved in EcolNet, which makes things "interesting". Fortunately, EcolNet volunteers are always talkative and very nice, and it's more a pleasure than a hasle to deal with them. Nevertheless, whenever there's people involved, there's a need for some kind of structure. At EcolNet there's a core of people, basically the "Five Good Men", who take care of the baby. They hold the experience and the know-how. If you want, you can see them as Primus intern Pares, First among Equals.

I've already talked about censoring in Libertonia, and I'll keep on reviewing "nasty" words. Next one is "dictatorship". Let me tell a story I especially like. Plato the philosopher said in The Republic that the perfect form of government is the dictatorship of a wise man. Unluckily, that's not possible in real life, or is it? Well, I think we do have that: we have a few people that have never been elected, that usually say what's to be done or they just do it, and everybody's happy with it. And it's been like that for many years and we keep rolling on, better and better each day. The rest of the volunteers of course have an opinion, and it's taken into account. Everything is pretty democratic, or at least it looks like it. It's hard to fight when everybody is nice and has the same goals. We all know we ride the same boat. We want to keep the boat afloat and we know who is the most capable, so everybody works together, rowing in the same direction.

How does EcolNet's decision-making process work? We have the admin mailing list, the users mailing list, an internal weblog and an online poll. Usually, infrastructure stuff gets discussed in the admin mailing list, because users don't need to know or be bothered with technical details. The users mailing list is for when things affect all the EcolNet population, both those running machines and users who have projects or documentation hosted. For minor discussions, we tend to use the internal weblog and its poll.

In Memoriam

The EcolNet project is dedicated to Tas, one of the original "Five Good Men", now staying with $DEITY.


Written by Javier Malonda.

There's a lot of people who should be listed in the credits, but they want to be anonymous. Just read http://www.escomposLinux.org.

If you're curious, you can find the Dia source XML code of the diagrams, as well as the diagrams themselves, at http://helvete.escomposLinux.org/ecolnet/ .

 


Copyright © 2003, Javier Malonda. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

LINUX GAZETTE
...making Linux just a little more fun!
Security with PHP Superglobals
By David Lechnyr

"Avoid strange women and temporary variables." -- Anonymous

A few years ago, my wife and I decided to go on a skiing trip up north. To reserve skiing equipment, you had to give 24 hours advance notice using the ski lodge's on-line website. The catch was that my wife had asked me to make the reservations 23 hours before the deadline.

So I got to thinking, and examined the online website, which would not let you make any reservations within the 24 hour timeframe. However, once you selected an appropriate date, I noticed that the URL was:

https://www.somewhere.com/reservations.php?date=01-23-01

It occurred to me that, while they had locked down security on what dates I could choose from, the final value was placed into a GET statement at the end of the web address. I modified the web address to use "date=01-22-01" and indeed, our skies were waiting for us first thing the next morning (we paid for them, of course).

This innocent yet practical example is just one of the dangers we have to be aware of when using any programming language that can be used in ways that we did not intend, which leads us into our discussion on PHP Superglobals.

Forms

To understand Superglobals, it is critical that you understand how data is passed from one web page to another (e.g., forms). Specifically, you must be aware of two methods known as GET and POST. You should also probably be familiar with the HTML <FORM> statement (a good reference is http://www.w3.org/TR/html401/interact/forms.html).

You've probably seen something like this before:

<form name="form1" method="post" action="process.php">
   <p>Please enter your name:</p>
   <p><input type="text" name="yourname" /></p>
   <p><input type="button" name="Submit" value="Submit" /></p>
</form>

This is standard, nothing-fancy HTML form code that asks for some information and then submits the data to the file "process.php" .  The critical bit here is the method declaration, which tells the form how to submit the data, for which we need to digress for a moment or two (hold your breath):

For those that recall the early days of HTML, forms were provided by means of the <ISINDEX> HTML tag. By inserting this tag into the HEAD of your HTML documents, a text field appeaed where you could fill out input. As the new HTML+ standard evolved, a <FORM> tag was designed and could be used with a METHOD attribute of GET, POST, or PUT.  So, this leaves us with a few different ways to send our data.

GET

With GET, variables and their values are sent in the header of the URL request appended as part of the URL itself.  The limitation is that web addresses (URLs) are limited to 8,192 characters; if the amount of data is too long, it will be truncated. Also, even with an SSL connection, the data is not encrypted since it is part of the web address.

For example, a web page might have a form statement like this:

<form name="form1" method="get" action="process.php">
   <p>Please enter your name, e-mail address, and a comment:</p>
   <p><input type="text" name="yourname" /></p>
   <p><input type="text" name="email" /></p>
   <p><input type="text" name="comment" /></p>
   <p><input type="button" name="Submit" value="Submit" /></p>
</form>

When you clicked Submit, your web browser would take the values you filled out in the form and redirect you to this web address:

http://www.fluffygerbil.com/process.php?yourname=fred+smith&email=fred@nowhere.com&comment=I+have+no+comment

Notice how the values of the form are part of the web address itself? That's the essence of GET.

For the curious, what is actually sent in the raw HTTP transmission to accomplish this transaction is:

GET /process.php?yourname=fred+smith&email=fred@nowhere.com&comment=I+have+no+comment HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)
Host: www.fluffygerbils.com
Connection: keep-alive

POST

With POST, the variables and their values are sent in the body of the URL request, not the header.  The advantages of this type of data transmission is that there is no limit to the size of the data being sent since it is contained in the body of the HTTP request, not the header.  Also, if you're using an SSL connection, the data will be encrypted too, what a deal. :)  For example, a web page that has a form statement like:

<form name="form1" method="post" action="process.php">
   <p>Please enter your name, e-mail address, and a comment:</p>
   <p><input type="text" name="yourname" /></p>
   <p><input type="text" name="email" /></p>
   <p><input type="text" name="comment" /></p>
   <p><input type="button" name="Submit" value="Submit" /></p>
</form>

When you clicked Submit, your web browser would take the values you filled out in the form and redirect you to this web address:

http://www.fluffygerbil.com/process.php

Notice how the values of the form are not part of the web address itself? That's the essence of PUT.

For the curious, what is actually sent in the raw HTTP transmission to accomplish this transaction is:

POST /process.php HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, */*
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)
Host: www.fluffygerbils.com
Content-Length: 94
Pragma: no-cache
Connection: keep-alive

yourname=fred+smith
email=fred@nowhere.com
comment=I+have+no+comment

So What?

So, why is all this background information useful? When you install PHP 4.2.2 or later, you migh