(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to linux-questions-only@ssc.com

There is no guarantee that your questions here will ever be answered. Readers at confidential sites must provide permission to publish. However, you can be published anonymously - just let us know!


Contents:

¶: Greetings From Heather Stern
(?)Q: avoid getting answers from apropos in the man sections 3 and 3x
(?)"crypt" function in Linux
(?)I think this would be a common problem at least is has been for me --or--
Dependency Hell
(?)Is This a Good Book for Linux Programming?
(?)What ISPs Do We Use for Linux
(?)How to let the world find your Linux Server when using DHCP
(?)trouble w/ dual boot
(?)Any good resources on laptop hardware support? --or--
HOWTO find a good laptop

(¶) Greetings from Heather Stern

Ouch.

The world trade center in shambles. The financial community is still mostly in shock. The airline industry is rightfully quite horrified. I know I'm horrified...

What can we, members of the free software community, do?

I know a lot of sites have put up banners linking to various helpful organizations, the Red Cross, funds for the families of all the emergency personnel killed, and so on. So much in fact, that I wonder how many charities will go short shrift of donations, clothes, and other things, simply because this one presently has everyone's attention.

But that's what we do as people. As a community we can do a lot more. Slashdot did great on keeping us all in tune with the news, when the routers in front of almost every major news service were going into meltdown. People used IRC and websites to find out if friends were alive and well, I saw wikis, I saw email lists briefly stop talking about the topic of the moment and reserve the day for traffic about who was okay. Now this didn't just mean wondering whether anybody died in New York. For instance, a friendly soul from the GNOME Usability Project was trapped in China for 6 days longer than he expected... making it to our user group meeting just in time, I might add, but I think it probably dampened his enthusiasm for our chinese food.

We're an international community, and now an international problem that has existed for a long time has been made more obvious. These people that took these planes used little that was unavailable to Cro Magnon Man. I'll update them to the Bronze Age because they found a cheat sheet for how to not be followed - but we're still talking tribal hunters, not 21st century "agents" from The Matrix.

Yet there are these pushes to "wiretap" email. (See the Crypto-Gram Newsletter, http://www.counterpane.com/crypto-gram-109a.html for some details.) The ultra-protectionism of Big Corporate copyrights continues (you think the Digital Millenium Copyright Act, already passed and being enforced, is bad? Look at the bill "SSSCA" up for attention. According to the EFF's Cindy Cohn it makes the DMCA "look like the Bill Of Rights".) while frankly, my ability as a real individual who writes about one tune every 2 years, lyrics a little more often, and at least one article a month, to continue to enforce my OWN copyrights and fair use rights under the US Code, Title 17 (http://www4.law.cornell.edu/uscode/17/index.html) continues straight into the gutter. My expectation of safety when I visit a foreign country obviously won't be based on the idea that I was an invited speaker -- as far as I know, anybody who was trapped in another city because all flights were grounded has gotten home now, even the ones who took a taxi From Chicago to Los Angeles -- but Dmitry Sklyarov, a Russian citizen, continues to live trapped in the USA because eBooks can't be sold in Russia unless you can make a backup of them, and he agreed to TALK about how the encryption works on US soil.

NOW I'm terrified.

Of course most of my email lives a very public life already. But let's face it, a translucent dime store postcard written on in big black marker has more privacy than the average internet Joe. It's not a federal felony to hassle a small town ISP because they don't want to let you wiretap all of their customers just because you have a warrant on one of them. (We'll leave out whether the "up to something" they might be up to is about real life-and-death matters or merely about someone wanting to play Mom for us.) It's not a federal crime to impersonate being someone important so that your spam gets into a victim's box. Hey, I may dislike spam a great deal, but it's just a delete button, okay? He's said his piece and I ignore it. We paint over graffiti on the walls of small towns, no attention, no fanfare, and eventually the spams die. End of story.

Soon, however, it may be a federal crime -- penalty, to lose most of your rights of US citizenship forever -- to deface a website. HELLO real world! This is about equivalent to "joyriding". Give 'em some community service and get on with life. Goodness knows what level of punishment they have in mind for someone who believes that mail containing things about money matters really ought to be in an envelope that can't be steamed open, even in the figurative sense of cyberspace. (If you don't use PGP or GnuPG already, establish the habit now. Free interoperable clients for MSwin and Mac: http://www.pgp.com/products/freeware/default.asp) Or that we have a reasonable expectation of privacy and freedom to assemble as a group for any other reason. Or that the business transactions of any US company are none of any other company's or country's direct business, unless some sort of model of trust exists between them. Join the Electronic Frontier Foundation and keep up on other resources about what is going on. As a group we have a better chance. (There are other privacy related groups out there too. Cato.org, the American Civil Liberties Union, and Europeans might consider checking out the Justis database, http://www.justis.com/database/european_law.html. I'm sorry I can't read other languages or surely I'd have more pointers...)

The electronic 'zines I'm subscribed to were singing the praises of the IT staff who arranged for businesses to go onward regardless of the chaos. They're only just starting to notice the drastic legislation that's trying to come down the pipe on a wave of patriotism, duty, and budget-grubbing. I work with and know a lot of sysadmins. I can tell you that a lot of sysadmins right now don't like the idea of being put in a tight spot: as a cop, with none of the legal defenses a cop has for doing his job; as a carrier of bits, with none of the legal defenses of a telphony Common Carrier for the fact that we are not the origin of any of this information; as an implementor of company policy, and a professional with special skills, but without the defense of "client privilege" that other professions enjoy.

A number of legislators are quite up in arms over the idea that they are being asked to vote on these matters without enough time to read all the horrid little details. However, some seem to want this extra time so they have a chance to draft their own pet departments, see http://dailynews.yahoo.com/htx/ap/20010920/us/attacks_terrorism_laws_3.html. Call your reps now and make sure that whatever does finally get drafted actually defends and supports you. I'm sad to say that email probably isn't enough -- you can try it, but they get a ton, and it carries little emotional power. Use a phone and talk to these people.

While a proposed bill isn't exactly "closed source" it is pretty much what something huge like OpenOffice or the linux kernel is to someone uninitiated to the wizardry of C and perhaps even deeply experienced in the same. Of course in our scope we have all sorts of utilities to help us manage large projects and sort through things. So what I'd love to see is some sort of "pretty print" style parser that goes over proposed bills and exposes the described crimes, regulations, penalties and so on to a bit of serious debugging. The "sources" are readable by anyone on THOMAS, http://thomas.loc.gov/; although goodness knows if those are up to date with what is being argued on the Congress floor, it's a start. I'm sure somebody out there can give it a shot!

On a somewhat more local note, we had many more threads than this, in fact I am amazed at the percentage of incoming questions that we answered. But I just got all boiled up and had to let off the above rant. On the plus side my scripts are doing better by far than last month. So I have picked some highly juicy ones and hope you'll forgive me the short list. We have new Biographies for the Answer Gang, too, so you can get a sense of who answers your questions here.


(?) Q: avoid getting answers from apropos in the man sections 3 and 3x

From Sándor Bárány

Answered By Mike Orr

Dear Answer Gang,
I am looking for a way to avoid getting answers to my apropos queries from the man sections 3 and 3x (ie I want to see only command names and no APIs). How can I do that without statically removing those man sections?
Regards,
Sándor Bárány
(!) [Mike] If you want to see only a certain section, you can pass that as the second argument to "man". For instance, "crontab" has two pages. "man 5 crontab" shows the file format, and "man 1 crontab" (or "man 8 crontab" on some systems) shows the command.
Apropos doesn't have any options, but man can be called as:

man -S 1:5:8 MyCommand
man --sections=1:5:8 MyCommand
to make it search only certain sections. In this case, it will display the first file it finds.
The easiest way to do what you want would be to have a shell script or function that greps the output of "apropos" to remove the unwanted lines:

#!/bin/sh
apropos $* | fgrep -v '(3)
(3X)'
Or if you like regular expressions:

#!/bin/sh
apropos $* | egrep -v '\((3|3X)\)'

(?) "crypt" function in Linux

From Ben Okopnik

Answered By

Just a little while ago, I needed to use the "crypt" program, so well-known in other Unices, to encode a text file (for those of you unfamiliar with it, it encrypts the contents of a file using a password that you supply. A fairly useful little utility when you want just a bit of added security on a publicly-readable file.) Imagine my surprise when I found that Linux does not have one! Once again, it's Perl to the rescue.
This version follows the syntax of the original "crypt", although I'm certain that the algorithm is different. The encryption and the decryption are symmetric, meaning that the same syntax is used for both (with the obvious exception of the relevant filenames):

# This encrypts the contents of "mysecret.txt" using "iAMw0tIam" as the
# password and saves the results to "mysecret.encrypted".
crypt iAMw0tIam < mysecret.txt > mysecret.encrypted

# This prints out the decrypted contents of "mysecret.encrypted" to the
# screen.
crypt iAMw0tIam < mysecret.encrypted

# This decrypts the contents of "mysecret.encrypted" and writes the results
# to "mysecret.decrypted".
crypt iAMw0tIam < mysecret.encrypted > mysecret.decrypted
Long passwords are preferable to short ones for better security; "crypt" accepts them without a problem, provided that any password containing spaces or other "weird characters" is quoted (preferably in single quotes).

crypt 'Praeterea, censeo Carthaginem esse delendam.' < file > file.enc
As always, bug reports, comments, and piles of diamonds are welcome. :)

See attached crypt.perl.txt

Ben Okopnik

(?) Dependency Hell

From Andrew

Answered By Thomas Adams, Dan Wilder, Heather Stern

(?) Hello Gang,

Hope you don't minding me milking some knowledge from you. One thing that has been bugging me for a while now is this.

I am running Redhat 6.1 with a recompiled kernel (2.2.19)..

This is the thing though. There are given programs that i may/do want to install that need different libraries for them to work. Most of my upgrades have been via rpm -U scenario (easy to keep track of what is on my system).

I need to install gcc which when i do the following i get this

[root@echelon /root]# rpm -ivh gcc-2.96-54.i386.rpm
error: failed dependencies:
        cpp =3D 2.96 is needed by gcc-2.96-54

so then i do this

[root@echelon /root]# rpm -q cpp
cpp-1.1.2-24

so i better upgrade

[root@echelon /root]# rpm -U cpp-2.96-85.i386.rpm
error: failed dependencies:
        libc.so.6(GLIBC_2.2)   is needed by cpp-2.96-85
        cpp =3D 1.1.2 is needed by egcs-1.1.2-30
        cpp =3D 1.1.2 is needed by egcs-objc-1.1.2-30

Mmmm i know GLIBC is pretty important so i get the version above & do the following

[root@echelon /root]# rpm -q glibc
glibc-2.1.3-22

so ok lets upgrade this (or at least try to)

[root@echelon /root]# rpm -U glibc-2.2-12.i386.rpm
error: failed dependencies:
        glibc-common =3D 2.2 is needed by glibc-2.2-12
        glibc > 2.1.3 conflicts with db3-3.1.17-4.6x
        glibc > 2.1.3 conflicts with rpm-4.0-6x
        libdb.so.2 is needed by enlightenment-conf-0.15-9
        libdb.so.2 is needed by pan-0.9.1-0_helix_1
        libdb.so.2 is needed by ggv-0.95-0_helix_1
        libdb.so.2 is needed by pygnome-1.0.53-0_helix_3
	[ . . . about 70 more complaints . . . ]
        libdb.so.3(GLIBC_2.1) is needed by perl-5.00503-6
        libdb.so.3(GLIBC_2.1) is needed by pam-0.72-20.6.x
        libdb.so.3(GLIBC_2.1) is needed by php-3.0.18-1.6.x
        libdb.so.3(GLIBC_2.1) is needed by sendmail-8.11.0-1
        libdb.so.3(GLIBC_2.1) is needed by openldap-1.2.9-6

Do you see wehat i am getting at

How would you get around these issues it can become rather frustrating

Any advice on this would be great like always

Thanx guys n girls

Regards

Andrew

(!) [Thomas] Hi Andrew,
Yuck!! You have managed to expose one of the more annoying features that the RPM format brings....version dependant files.
Since every package (or nearly every) is linked to another, you can imagine just how one package may be needed by another.
To try and get arounf your problem, you can specify to install an RPM file without looking for it's dependencies, thus:

rpm -i --nodeps ./rpmfile-version-3.rpm
But, one caveat with this, is that if you don't have/install the dependencies, then the program might not work.
Hope That Helps
(!) [Dan] It is a common problem. The common solution is to upgrade the installation using the upgrade method provided by the distribution. It may be time for you to upgrade across-the-board to Redhat 7.1.
It is possible to upgrade a distribution piecemeal, but it becomes more difficult (as you have observed) as the number of dependencies increases.
The alternative is going off-distribution and building the specific things you need from source, one at a time. This is more often not worth the effort.
(!) [Heather] Heh. Jim calls this "dependency hell". Every distro has it. Debian is pretty good about reducing the number of parts in the puzzle -- about the time you're looking at upgrading glibc, they call it the next version name, and a lot of people bust their butts to make the upgrade smooth. Of course, unless you're using LibraNet or something, the install is a bit rocky...
For staying with an older distro a bit longer (hey, it's not crashing, why change it much, right?) my common solution is to remove the offending rpms, use alien (a perl script) to transform deb files from the equivalent Debian variant, and then use those to provide the libraries and so on, that just my app needs. I've used this trick to introduce lynx-ssl to a number of systems that otherwise only come with a non-SSL version, often a bit old.
Nonetheless, I agree with Dan -- once you've decided to upgrade glibc, it's time to take your upgrade seriously, and make a new round of it. Distros vary widely as to whether it's safer to upgrade or to just install anew; with a good backup of all your personal files (don't forget odd things like any tweaks you made to config files in /etc/ or /usr/lib, notes about hardware you have and need support for, etc.) you can try an upgrade, and if it bombs, then install fresh.

(?) Is This a Good Book for Linux Programming?

From Chris Gianakopoulos

Answered By John Karns, Faber Fedor

(?) Hello Gang, I've mentioned that I am working on an embedded project that will use Linux as its kernel. As a result, I am learning to write cool software for the Linux platform.

The type of stuff that I have to do will be fork()s and exec()s (the "s" indicates lots of fork() and exec() invocations), IPC stuff, signals (I know -- that's IPC stuff, too). and pipes. I know that there will be slight differences (for example, the spawn() function), but now for the question.

There are lots of good guides (and of course, the man pages). I am also presently reading a book entitled "Advanced Programming in the Unix Environment" by Stevens.

Will that Stevens book lead me astray? It really is giving me lots of good insight (what other insight could there be?), so I hope that you tell me that it is good reading for learning to create complex software systems in Linux.

Of course, I will read the man pages and guides, and I expect that some header file may be in different places (I saw slight differences for network programming).

(!) [J.Karns] I've seen that book recommended for Linux programming on a LUG list I subscribe to. Additionally, this one:
The Design of the Unix Operating System, Pr. Hall, ISBN-0-13-201799-7 Moris J. Bach

(?) Thanks for the confirmation. I've got the Bach book and read it years ago. It is my reference for Unix internals. I will read the Stevens book just for the sport of it since it applies to my FreeBSD system. I am happy that it also applies to Linux.

(!) [Faber] Excellent book, IMO. I was re-reading it Friday night (yes, I need a life ;-) and still learning new things.

(?) I claim to have a life -- my peers don't agree with me when I start to talk about technical stuff. I'm almost finished with chapter 9 -- the stuff that talks about session leaders and stuff. Soon I read about signals -- almost like writing interrupt handlers only a little easier.

(!) [Faber] I don't do the kind of programming that you do, but I think the combination of the Stevens book and the kernel documentation (usr/src/linux/Documentation assuming you've installed the kernel sources) should do you well

(?) It will be not quite like an embedded project. That's what makes it fun because it will be more like standard Unix programming (which I have not yet done). I'll have to deal with such issues as do I run various servers as daemons? What if I want daemon-to-daemon communication -- do I use named pipes?

As I learn and discover, I will pass this type of information as 2 cent tips.

Thanks for that info, Fabor. I will keep that Linux Documentation stuff in my mind. I know that I ramble whenever I talk about this project that I am working on. Here's why, though.

When I was doing DSP (digital signal processor) programming, I would ask myself questions like "I wish that I could use DMA for those A/D samples." Then, I would turn around and discover that the feature existed.

Linux is the same way. I'm architecting this system as I were designing hardware to do the job. You want I/O? Use the messaging IPC. That allows programming language independence with respect to server implementation. Linux (and Unix) has all of these cool things that provide for a concurrent implementation of the system.

And that stability. The things that people can do when they work together!!


(?) What ISPs Do We Use for Linux

From Chris Gianakopoulos

Answered By Dan Wilder, Heather Stern, Thomas Adams, Faber Fedor, John Karns, Ben Okopnik, Mike Orr

(?) Hello gang, I am going to lose my Internet service provider at the end of this year because they are going to disappear.

I am visiting various web pages for ISPs out there, but, I am clueless about how to determine their (the ISPs) interoperability with Linux.

For example, I talked to the support staff at www.excelonline.com, and they said that their ISP service should work with Linux.

I'm not sure what the failure mechanisms are, and I will probably do lots more surfing of the web so that I can find a suitable replacement for my current ISP (provided by www.gateway.net).

About Linux Friendly ISPs... What does friendly mean? Does it mean that standard protocols are used?

(!) [Dan] The short answer is, "almost any ISP works with Linux, but don't count on technical support from most of them."
With most ISPs, you'll have to know how to set up your PPP, dhcp, whatever, yourself. Increasingly, people are going to DSL and cable, and you need to watch out for the ones who want you to put the router or modem inside your box. Some of these are unsupported in Linux. Better to go with a provider who furnishes an external router or modem.
(!) [Mike] An external modem will be more expensive ($200), but is worth it because it's "standard". My Cisco 678 connects to an ordinary Ethernet card, and is configured via telnet or a null-modem cable (minicom/kermit). (Actually, I could never get the telnet mode to work because I couldn't figure out the device's IP address on its configuration network. So I went the minicom way.) The modem is switchable between bridging and routing. The telco said I have to use bridging mode, so I'm directly on the ISP's network. The modem converts from Ethernet to DSL, then to ATM, then back to Ethernet at my ISP. For those that use the telco's own ISP, I hear they use routing mode over PPP.
The telcos/cablecos frequently have promotions where you get a free or discounted modem. And my ISP (oz.net/theriver.com, covering Washington and Colorado) has deals for ex-Covad customers now that Covad is bankrupt: free setup and installation for their portion of the fees and free first and last month. I expect other ISPs have similar deals.
(!) [Ben] By now, it's "you name it, and I've used it." I have not yet run into an ISP to which I couldn't connect (AOL is neither an ISP _nor_ anything that I want to connect to; I'd hate to wash my modem out with soap...) I've gone through, oh, at least a dozen ISPs - in the Bahamas, all over the Caribbean, in Bermuda, and a number of different ones in the States. Come to think of it, better make that around two dozen. :) I've used Ethernet, PCMCIA/serial/ USB modems, both wired and radio, and I'm about to try it via a cell phone. These days, I'm about to drop AT&T, their support policies and quality of service started from egregiously bad and took a sharp downward turn. And the rates. Blechhh.
Anyway - trust me: if it's at all possible, Linux has a way to do it.
(!) [Faber] Basically, yes. TCP/IP is TCP/IP and even Microsoft Exchange supports SMTP and POP. :-)
(!) [Heather] [For connectivity itself] most dialup places that speak MSwin-only use PAP.
(!) [John] Almost all services should work with Linux. Some might be a little more difficult to deal with than others, but most ISP's today use chap / pap and set things up to be compatible with the default MSW client internet connection cfg. I have found wvdial to work in almost all cases. Here in Bogota, virtually all ISP's are using w2k or other MSW platform servers, with no login scripts, which seem to be a thing of the past - which means less fuss for you. I have tried at least three different ones over the past 3 yrs and all have worked. Although sometimes (not too often) I have to try dialing more than once to get a connection due to PAP authentication gotcha's; but I tend to think that it's more an issue of telecommunications complications than anything else.
(!) [Mike] PAP and CHAP authentication are conceptually similar to an ssh login without a password prompt. It does send a login and password, but this is part of the built-in handshaking process rather than something you have to script. To troubleshoot, set PPP to debugging mode and watch the handshake strings and error messages. I haven't used pppd for years, but the most frequent errors I used to get were the one about the line not being 8-bit clean (you have to escape more special characters), or the mysterious "serial line loops back" or whatever, meaning it tries to contact the remote host but reaches itself; I think that means some client/server switch is wrong.
As they say, Microsoft loves industry standards so much that it never saw a protocol it didn't embrace and extend. NT4 had PAP and CHAP, but it was "Microsoft PAP and CHAP". pppd users had to install a patch, which eventually made its way into the standard package. Each version of NT/Win2000/WinXP may introduce similar subtleties.

(?) That's interesting (but not the least bit surprising) - I wasn't aware of that.

Cool -- I partly understand things. I noticed that my new ISP uses PAP. My (soon to be) previous ISP uses CHAP.

(!) [Faber] As Dan pointed out, just about any ISP will suffice, just don't expect any technical support. If you do require technical support, be preparedto switch over to Windows for the duration of the phone call.

(?) That's cool. I can live without the support -- It's more fun figuring things out myself (and with your help -- of course).

(!) [Heather] I have found that either wvdial or xisp or (there's a k toy, is it kisp? kdial? oh well, it was on freshmeat somewhere) work slightly differently, so if one doesn't work for you try the others before even starting to stress out. Jim does dialup. I haven't had to in years, though I can trouble shoot a raw PPP connection if I really have to.
Between freshmeat and the debian packages listing there are so many front-ends trying to make it easy to do dialup, it's hard to just pick one to use ;P

(?) That's true. Sometimes, I feel more comfortable doing it the "hard" way, just so I know how to set up the various ppp scripts. For my FreeBSD machine, I have two alternatives. I can use the pppd (our daemon), or I can use a program called ppp (a user space process). The latter is pretty cool, because, by turning on ip forwarding (with the sysctl command), and passing "-nat" to the ppp program, I get ip masquerading.

(!) [John] An important part of the issue might be to tell them that you're running Linux, and ask if they would have a problem providing answers to you regarding such a platform. If they turn up their nose at you, look elsewhere. I would maybe ask them what platform they are using for their operation, and look for one which is using a *nix / non-MSW platform.
There should be a number of ISP's that (still) fit this category. Another reason I would tend to avoid the MSW people would be that I would assume the *nix people might be a little more savvy technically speaking, as setting up a w2k / or NT box may done with a few mouse clicks - ok maybe several.

(?) Or does it mean that a bunch of advertising stuff does not clog your display window when using, for example, Netscape?

For example, a friend told me that when you use America Online, you need their special browser to interact with them. I thought that all browsers used http over TCP for the communications mechanism.

(!) [Faber] AOL is a proprietary network, with proprietary protocols. IMNSHO, AOL is not an ISP (in terms of a center that whose primary purpose is to let you gain access to the Internet) but a private networks which, coincidentally, you can access the Internet through.

(?) Now I see why this is so. ISPs I sort of understand. AOL, I did not understand (since I do not see their protocols in the textbooks that I read).

As far as email is concerned, I thought that POP and SMTP would be supported by each and every ISP (possibly a misconception on my part).

(!) [Mike] Every regular ISP supports POP. Some may try to steer you toward IMAP instead of POP because it's more "advanced". Of course, if you don't need IMAP's features (which allow complex operations on messages stored on the server, rather than downloading them to your PC and reading them there), POP works just fine.
(!) [Faber] As longas it's not a proprietary network like AOL or Delphi (is that one still around? What about Bix?), then you should be okay. But check with the ISP JIC.

(?) Very cool! I just tried an experiment using a friend's ISP account with the provider that I was interested in (with the friend's permission of course, and we were not simultaneously using the service), and it works! It was just a connectivity experiment -- not one to rob somebody's bandwidth.

So, my goals were to discover if ISPs are somewhat generic in their behaviors (it seemed logical that they should be). Thanks to your responses, and my experiment, I am now confident to proceed.

If a few of you could respond to the question "Which dialup ISP do you use with your Linux system", that would be cool. I'll go ahead and read the HOWTOs and figure out all of that chap-secrets stuff and make it work for my SuSE Linux distribution.

I guess that I am sort of lost because I am not getting the information that I want from the various ISP sites (due to my ignorance of course).

(!) [Dan] You didn't mention where you were.

... Not that this kept most of the Gang from jumping in, nor that the results might not also be useful to you, dear readers ...

(?) How silly of me, Dan. I forgot to mention that I am in the Chicago, IL area. Thanks for the ultra quick reply. I just tried an experiment with www.excelonline.com using my sister-in-law's login using my FreeBSD machine as a router. Therefore this particular ISP works with FreeBSD's ppp user space program. Linux should be free sailing -- I expect.

I gotta log off because the use of her ISP account (with her permission, of course -- she's sitting next to me) was only for experimental purposes.

(!) [John] With a *nix acc't you might want to look for an ISP which offers shell accounts. It's nice to be able to log in and read mail from their server if need be, or place a .forward file to have your mail temporarily forwarded somewhere else if you plan to travel to where there will be a local email account available.
And, there might be more reliability with an ISP using a *nix-based box. :-0
(!) [Mike] Good luck. Most ISPs consider shell accounts a security risk, generator of most of their tech-support calls ("Can you install/upgrade this mailreader/newsreader/ compiler/library?"), and not a marketing priority (because most of their customers wouldn't know what to do with a shell account if it bit them).
(!) [John] No doubt the shell acc'ts are rarer today than a few years ago. I admit that I haven't shopped for an ISP shell acc't for about 3 years; but at that time I did come across a few. Also, my Colorado ISP acc't which I've had since about 1995 is still a shell acc't. They use a kerberos'd DEC ultrix.
(!) [Dan] In the Seattle area, where our offices are located, we have a number of Linux-supportive ISPs, such as blarg.net, eskimo.com, serv.net, zipcon.net, oz.net, speakeasy.net, and others to whom I no doubt do an unjustice by not listing here. Some of these providers have points of presence in other cities.
(!) [Heather] My provider, Idiom.com, offers dialup. It's S.F regional and spreading, but I don't think it's nationwide quite yet. The owner is a big BSD fan so it's all free software under the hood, and an all-digital internal backbone. It may be more expensive than others, but we like getting our DSL from someone we can trust - not like those PacBell bozos...
For Jim and I, Idiom's dialup is mainly a backup for if we are out of town, but it's still handy.
(!) [Thomas] Hello. That is a shame that Gateway are cutting their ties with providing Intenet Access. I know of a few ISP's in the UK that are Linux "friendly":
www.uklinux.net
www.f9.net.uk
www.vigin.net
All offer PPP support allowing you to dial in.

(?) I did find a good ISP. At least the tech support staff answered their phone during a Saturday morning and afternoon. When I asked them if it took 25 minutes to service my phone call because of their heavy service load, they told me that there is only a few people around their on weekends. I suspected something like that. I almost gave up waiting, but, I decided to give them a fair shake (on the belief that they were real busy). It was worth the wait! When I asked them if they knew if their system would play well with Linux, they told me that they would help me if I had any problems. They the fellow said "We're just a bunch of computer geeks hanging around here" (or something like that). I saw their coolness (I'm somewhat of a geek too), and decided to give their site a try. They have a good staff at www.excel.com.

As things went, I had no problems setting things up on my FreeBSD machine (using user-space ppp) and no problems using Linux (using wvdial).

I'm rereading the HOWTO that talks about ip masquerading for Linux, because I do tend to give my FreeBSD machine and Linux machines equal treatment. It's making sense now...

Thanks much to all of you that answered! You all, once again, increased my confidence in this stuff. This is just like engineering -- lots of successes and lots of time me being humbled. There's always something to learn in this protocol world (and Linux world). That's what makes it so much fun.

Chris Gianakopoulos


(?) How to let the world find your Linux Server when using DHCP

From Jason Bailey

Answered By


Abstract

Many of us have broadband connecting our Linux machines to the Internet and would like to play around with our own webservers, but for a variety of reasons are unable to get a static address. This article should help you with publishing your Linux server's current IP address to an ISP's web server.


Introduction

I've wanted to have my own web server for many years. Partly because I'm a geek who has a need to do things just because I can. But more importantly, I've wanted to do it because many ISPs don't let you play with cool stuff like databases, perl, php, python, etc.
So what's the big deal? You say. Set up a Linux box and you are good to go. Well, it is that easy if you don 't care about sharing this website with anybody else. My ISP won't give me a static IP for my cable modem. So I thought, what if I could create a webpage on my ISP's web server which would point to my web server? The game was afoot! I began searching google.com and pestering the members of my LUG (Linux Users Group) for ideas.
One of the most helpful articles I found was written for Linux Gazette several years ago by Henry H Lu. I have followed a lot of his basic ideas, though I have reduced the number of files used and I've standardized on shell script as opposed to using both shell script and perl. Henry does have a nice example of how to make the FTP portion work with Geocities if you happen to be using them.


Automating FTP

The file transfer protocol client interaction can be a bit difficult to script if you are having to wait for prompts for username and password. One way around these prompts is to use the .netrc file. The layout for the file would be as follows:
machine www.MyISP.com login JoeUser password Top$ecret
Please note that you must change this file to read/write owner only when you create it. For more information about the .netrc file and its uses do a man netrc at you command prompt.


HTML File Template

I found that the easiest way to do this was create an HTML file which has a placeholder everywhere I want the IP address to go. I chose "~~~IP~~~" to be my placeholder since it stands out and I'd never have it appear anywhere else in my document. The following is an example of what you might use.

See attached up.html_source.txt


The Shell Script

I'll first show the script and then explain what each part does.

See attached dhcp-myip.sh.txt

First, we find the IP address using ifconfig on our WAN device (depending on your setup it may be eth0, ppp0, etc) and parse out all information we do not want. If you are not sure if you are using eth0, eth1, ppp0, ppp1, etc you can type ifconfig to see which devices you are currently running and look for the
one with a valid Internet IP address.
We save the IP address in the variable MyIP and in an ASCII file. Then we com pare a file that contains the current IP address and one that contains the IP address which we had the last
time the script ran. If these two
addresses are the same we are done. If they are different, we use take our up .html_source file and replace ~~~IP~~~ with our current IP and store the results in up.html. Next we FTP th e file to our ISP. Finally, we copy our current IP to "MyIP.then" for future referen ce.
Make sure you do a chmod +x to the script after you save it.


Repeating the Process

After you have tested out the script, you'll probably want to have it run eve ry five to fifteen minutes. You can easily to this by adding a cron job. It is important that you run the cron job as the user w ho has the files in his home directory and has the FTP server information in his .netrc file.


Conclusion

If you want to make your web server, which is on a dynamic IP address, easily
found by your friends and other. This script can
make it as easy for them to find your home server as going to http://www.MyIS P.com/~JoeUser/ip.html. The scripts are easy to reconfigure to suite your needs. My next step is to write a PHP script tha t will ping my IP address and if it gets a response it would send you to the server. If no response was received, it wou ld give a page that explains that the site it down. I hope you find this as useful and fun as I did.
Jason Bailey

When I'm not at work doing system admin stuff, at school pursuing my Computer Science degree, at a Susitna Linux Users Group meeting or off doing freelance computer work, you can find me hanging out in beautiful Palmer, Alaska with my wife and kids.

(?) trouble w/ dual boot

From Jeferson

Answered By Mike Orr, Heather Stern, John Karns

(?) <html><head><meta http-equiv='content-type' content='text/html;'>

(!) [Heather] Aaaaargh :) allow me to quote my favorite wimpy, but totally virus proof mailer --
[text/html is unsupported, treating like TEXT/PLAIN]
(somewhat after the fact, I note that there can be good reasons to do this - foreign character sets maybe - but leave plaintext plain, okay?)

(?) Hey guys, how r ya doing huh ?

I'm having a little problem here with my OS, I've installed Conectiva Linux in the Master HD and I had the MS windows installed ins the Maste Slave hd, what can I do to have a graphical interface or even an easier way to boot in the system, without having to go to the system setup and change the boot order ...

Can ya help me ???

(!) [Mike] Have you looked at the HOWTOs at www.linuxdoc.org? http://www.linuxdoc.org/HOWTO/HOWTO-INDEX/howtos.html Search for "Windows" and "Win" in the text. There are several HOWTOs about making Linux coexist with Windows.
Also poke around www.linuxnewbie.org for other information you might find useful.

(?) I've already looked at the HOW-TOs and my problem is a bit different, there is any way I can manage the boot, like... now I want to boot with Win32, I just reboot the pc and choose MSWIN, later I'll be in a mood to boot with Linux, then I reboot the system and choose LINUX, I've already tryied with "system commander", the Grub... wait a second, isn't grub a graphical interface for the LILO ? how can I change the configurations of the lilo, where is it's configuration file?

(!) [Heather] /etc/lilo.conf is a text file that /sbin/lilo (a progam) uses to compose LILO (the boot loader). It's usually quite well documented in /usr/share/doc somewhere, in a directory named either lilo, or lilo with a version number. And in 'man lilo' plus those HOWTOs that Mike mentioned.
grub is not a GUI for LILO particularly; it's a boot loader in its own right. But you can use it to point at LILO as a second stage if you want.
GAG, the initials are for the spanish words of "Graphical Boot Manager", is an entirely GUI bootloader, and it is its own configurator - that sounds a bit more like what you are really asking for. The link's quite slow for me but might be a bit closer to your ISP there in Brazil:
http://www.rastersoft.com/gageng.htm
Gujin is another alternative bootloader, it's supposed to be smart enough to look for bootable drives or kernels on its own, so it doesn't need setup:
http://gujin.sourceforge.net
But if I misinterpreted what you want, there are GUI tools which run under X to help you set up /etc/lilo.conf - among them Glilo (GTK), Klilo, lilo-config, or BootRip.
(!) [John] Also, later versions of lilo have a gui-like interface which offer a menu with a 'point & shoot' menu-bar. BTW, even the older lilo versions offer a "menu" of sorts, if you press the '?' key at the boot prompt, which will display a list of available choices; although you still have type the selection rather than "point & shoot". Even this can be minimized by using a short label in your lilo.conf:

See attached jkarns.lilo.txt

If your machine is fast enough and has ample memory, you might also consider installing VMWare, and avoid having to reboot. Although if you're a gamer, it might not offer what you want. Anyway, they are offering an "express" version for $50, which isn't so expensive. I've been very happy with the software, but it's running on a 700 Mhz machine with 128 MB of RAM. Even w2k runs fast enough to be satisfactory. I also purchased a copy to run on a 500 Mhz / SCSI machine which is a bit slower, but still tolerable. A 380 Mhz / IDE / 64 MB machine is also usable, but a bit too slow to be pleasureable.
There are other products available both commercial (e.g., Win4Lin) and GPL (Wine). Re: wine, it is indeed a formidable task to emulate an entire API on a foreign OS. They deserve lots of credit for getting as far as they have, but it's still alpha. I haven't looked at Win4Lin so can't comment, except to say that I believe that VMWare is the most mature product in this venue. BTW, they also offer a version for w2k / NT to host Linux, but since I think that Linux is the more stable OS, it seems a better idea to use Linux as the host =:<)
(!) [Heather] Well if he is a gamer, I really think he ought to look at Transgaming (http://www.transgaming.com) and see if their WINE + ActiveX solution works for his games. I saw a demo at LWE and it ran Diablo for MSwin directly; I was impressed.
Lilo also supports a value called "alias" and if you make it a single character then you can even get one-tap loading. Here's about the simplest example that works -- assuming you have the world's plainest configuration, basically, C: at the start, "all one big slash" for the second partition with a linux kernel named "vmlinuz" at its root, your swap partition invisible at the end, and no framebuffers or other hardware oddities requiring an "append=" line. /vmlinuz could be a symlink to wherever you really keep your kernels, if you prefer.
boot=/dev/hda2
single-key
image = /vmlinuz
  label = linux
  alias = 1
other = /dev/hda1
  label = dos
  alias = 2

(?) PS: Sorry about the HTML

(!) [Heather] That's okay, now you know :)

(?)

Thankx
Jeferson

(!) [Heather] You're welcome

(?) HOWTO find a good laptop

From William Thornton

Answered By Heather Stern, Faber Fedor, John Karns, Mike Orr

(?) Just wondering if you can point me to any good web resources on what laptop hardware is currently supported under linux. What I've been able to find are how-to's (as in how to install linux on a laptop. And these seem to be out of date. You can't even buy the models listed anymore.) Any help would be greatly appreciated. Thanks.

(!) [John] One of the originals - and most extensive - was Kenneth Harker's "Linux on Laptops".
It was at utexas.edu, but that URL has since changed, and unfortunately I don't have the updated one.
(!) [Faber]
For those of you watching at home, the link is, of course...
(!) [Heather] ... Kenneth Harker's site full of links to personal testimony and other resources: http://www.linux-laptop.net
Or Werner Hauser's Mobilix:
http://www.mobilix.org
Alternatively you could cheat, and buy a laptop from a vendor that sells laptops pre-loaded with Linux...
Distros have gotten better about being able to be installed on a laptop; the rise of laptops with accessible CD bays has helped a lot too.
The important thing to know is that you should consider your parts of hardware individually when looking at buying a laptop. Model names and numbers themselves are immaterial, except that those may make it easier to find fellow users of the same hardware. Yes, the same real manufacturers sell through many vendors, with the exception of a few giants like Sony and IBM that build their own stuff.
USB
pretty much no problem. lspci can tell you if you have UHCI or OHCI, then you can load up the right one and rock on.
Infrared
Find out what chipset it has (this is harder than it looks, just "fast" doesn't cut it). Linux supports several but to get Fast IR you need to know which kind, and it needs to be one of the small handful we handle. Mobilix has good info.
Mouse
luckily most mice are just PS/2; there are a few synaptics style touchpads out there, that have a PS/2 compatible mode anyway. Those "jogdial" things Sony has need a special program, but we have one.
(!) [John] ... and now those of the USB variety are available. I have been using one for the past few months, since I purchased a Dell Inspiron. This allows using an external keyboard which helps to make the laptop a better replacement for a desktop. That way I can use both an external mouse and keyboard, and still have the serial port free for an external modem should I choose to use one.
(!) [Heather] Video card
If you're planning to slash the bleeding edge, you really have to be sure on this one. It's one of the parts you cannot easily replace! Note that some manufacturers throw their own cheap X servers together - check into them further and see if they are going the XFCOM route (which eventually leads to the source being merged with XFree, when the card is yesterday's news) or staying proprietary. And whether they need a kernel module to support GL and/or acceleration. (hey, that'd be sweet. But I wouldn't bet on finding that.) If you're a gamer, check if the video has proper texturing support. Many don't.
Also, X 4.1 is getting there, but there still might be a few cards better supported under X 3.3.6.
Driver Status for XFree86[tm] 4.1.0
http://www.xfree86.org/4.1.0/Status.html
For libvga I always recommend trying the VESA setting before giving up. And setting the VesaSave value to a different number can help solve if it's coming out with a text mode that puts your cursor below the screen :)
(!) [John] I had a rough time with the Inspiron - the only way I could get X to work was by DL'ing the XF86Config file from the mfr's Internet site; and I have yet to get it to work for other resolutions than 1400 x 1050. Even though they offer several to cover various resolutions, they did a very poor job - some were just duplicates under different names.
Be careful of the ATI r128 chip series. There are around 10 different variations of that chip, designated as r128 SM, r128 RE, etc., and they are not compatible; so check the X docs to verify that the chip is supported - or better yet verify that the chip is indeed the same as one of the models mentioned on one of the Linux laptop sites, i.e. that it has not been changed by the mfr for the currently shipping models.
(!) [Heather] ATI is actually rather infamous in the community for generating new troubles with every minor BIOS and circuitboard revision. That problem is not at all limited to laptops :(
Your monitor
Sounds odd, but yes, this needs to be considered seperately.
Try to get X modelines from someone else who has the same screen. They don't need to be from the same distro, and in fact, you can steal modelines from an XF86Config that's meant for version 3 and use them on version 4 just fine. You cannot steal the whole file and use it though - the format has changed a bit. Put your modelines in the Monitor section, in either case.
Sound
You actually have a pretty good chance here. So far lspci has always been good for me at coughing up what chipset the sound is, and after that it's easy to look up. (This doesn't work on older models that have ISA sound, but you're talking about new machines here.) The important tidbit is, there are three different ways to get sound support working, and you only need one of them to work. In order of preference, it can be a normal kernel module, the ALSA project probably has drivers for you, or you can use OSS. SuSE makes sound setup easy. Your distro may vary.
http://www.alsa-project.org
Ethernet
Usually isn't much of a problem. lspci should tell you what it is, then just load the right module. In fact lspci is usually better than the box for telling what's in it; many manufacturers are licensing chipsets these days.
If you have a builtin modem...
Ouch. Most of these are winmodems, er, 'scuse me, "controllerless". In other words they are born missing one or two of the three core chips that make a real modem work. For anyone who's been under a rock for the last few years, that means that they are "easily upgradable" but also cheap and prone to breaking down under heavy CPU load.
I list the ones mentioned at linmodems.org here, because many of the projects have moved recently. The linmodems links still work too.
Don't be afraid to buy a PCMCIA card to replace these. Nobody will blame you. But do check the resources at linmodems before buying a card - some folks have been burned by PCMCIA softmodems, those pretty much don't work for us.
(!) [John] In my case, I had to DL the pcmcia pkg from the 'net and install it separately after installing SuSE 7.1 due to a quirk with the newer TI PCI4451 PC card Cardbus Controller chip that the machine uses. Trying to use the SuSE packaged version would hang the machine. This was explained in one of the pages about my machine referenced from the harker site.
Also, one can check the docs that are pkg'd with the pcmcia stand-alone pkg. There has in the past been a document included which lists the cards known to work, with the caveat that card mfr's sometimes change the chips inside the cards without changing the model designation - it's rare but not unheard of, so you can find yourself with a card that doesn't work, even though it's on the compatible list. I've had pretty good luck with Xircom in the past - a CEM33/10 and a CEM56/100 which both have a full modem implementation rather than a winmodem (the only people who 'win' are the mfr and Microsoft :-( ).
(!) [Heather]
(!) [John] These are perhaps the most ubiquitous of winmodems, and some say offer the best chance of working under Linux.
(!) [Heather]
(!) [John] Dell was shipping two versions which they were designating as mini-pci 3com ether combo cards. The one that was shipped in my machine is known under the name of Actiontel, and has an LTModem paired with an Intel eepro-100 ethernet chip - luckily for me both components are Linux compatible; probably because they were offering machines pre-installed with Linux. They have since changed their policy and are no longer offering pre-installed Linux, except on their servers. Consequently they are now shipping one of the modem chips mentioned above, which people don't seem to having much luck with, and many have bought a pcmcia card to use instead. However, there are two items of interest in this regard, IMO:
  1. many of the pcmcia cards seem to run quite warm, even hot - especially the ether / modem combos cards, which adds extra heat to your laptop, and also means more battery drain.
  2. many laptops are implementing the ether / modem combo cards for the mini-pci slot connector which is also being offered on many desktop style mobos. This connector very much resembles the one used for the type of memory module (so)dimms currently being used. Thus if desired it is possible to purchase one of these from an after market 3rd party and replace an incompatible card with one that is Linux compatible.
(!) [Heather] Did I miss anything?
Oh, probably. But if you have a feature listed that you're wondering about, try Google! Linux (http://www.google.com/linux - and do NOT put a slash on the end) and type in the buzzword or chipset. Chances are good you'll find something on it.
(!) [John] ... not too much!
Just one more thing. We need to make the hardware co's more Linux cognizant. Be sure to mention that you're buying the machine because you have reason to believe that it is Linux compatible, and if it wasn't you wouldn't be purchasing from them! Also mention any items that you know not to be compatible, such as the winmodem. Express your interest that they consider increasing their Linux support in the future.

(?) Wow! I thought I MIGHT get one answer to my question. Instead I get three very good answers. The info at linux-laptops.net seems to be much more up to date than what I'd been finding.

Thanks! I should be pretty well armed with info for my next trip to the computer store.

(!) [Mike] Thanks for the encouragement.


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 71 of Linux Gazette October 2001
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/