[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]

More 2¢ Tips!

Send Linux Tips and Tricks to tag@lists.linuxgazette.net

[LG 78] help #5: ADSL with roaringpenguin

Wed, 01 May 2002 11:19:12 -0700
Robert Lynch (rmlynch from pacbell.net)


You say: "I am using the roaringpenguin client." The way I got this to work was run:


and answer the questions (as best you can), to configure the client. Once it is working, you can start, stop and query the link status with:


HTH. Bob L.

Fancy printing in Vim

Mon, 6 May 2002 14:53:25 -0400
Benjamin A. Okopnik (Tne Answer Gang)

Vim has many wonderful features; unfortunately, printing - especially printing that retains all the fancy colorizing stuff that Vim enables you to do via the various syntax files - is not one of them, at least not automatically. However, here's something you can add to your "~/.vimrc" that will set it up, including previewing:

See attached fancyprint.vimrc.txt

Once you have this, simply use the ":ha" command; the output will be displayed by "gv" (which, obviously, is required) which will also allow you to print it.

Un-tarring files + Modification Dates

Wed, 29 May 2002 12:40:51 +0100 (BST)
Thomas Adam (The LG Weekend Mechanic)

[ My first 2-cent (2-pence) tip ]

If you have a computer like mine, where the CMOS battery is shafted for whatever reason, you might find that when you go to untar a tarball, you get a series of messages like:

file.abc has modification time in the future.

Now although this isn't too much of a problem usually, it can be if the tarball contains source-code that you are going to compile, since "make" will usually after trying, sit back and laugh at you saying:

make ** error 1 ** clock scew

To circumvent this problem, you can append the "m" switch when you are untarring your tarball. For example:

tar mxzf ./my_file.tar

Hope It's Useful :-)

-- Thomas Adam

Ghostscript fails after printer driver install

Mon, 29 Apr 2002 10:34:31 -0400
Ben Okopnik (Tne Answer Gang)
Asked by Rich Price

I am attempting to connect my new Samsung ML-1210 printer to my quite old Linux server. The server is running Slackware 7.1. The server has no X libraries [I never loaded them] and, after I updated ghostscript with the RPM supplied on Samsung's install disk, ghostscript started failing with the following message.

gs: error in loading shared libraries: libXt.so.6: cannot open shared
object file: No such file or directory.

I am assuming that this library comes with X.

You're correct; "Xt" is one of the core X libraries.

While I could just find it somewhere and try to figure out where to put it, I don't know what other errors are hidden behind that one. [How many other libraries are also missing?]

Well, if you had an executable program that came with your RPM, you could do "ldd <program>" to learn about its library dependencies; however, I have no idea what Samsung's RPM contains (it may be a program to which GS delegates the output, or another library, or...)

I am willing to send anyone who is interested the RPM from the Samsung install disk. I didn't include it here to save bandwidth.

Why did applying this RPM make GS start failing?

To be precise, GS itself isn't failing (at least so far as I can tell) - the added "stuff" from the RPM is making a call to the non-existent library, and that's what's failing.

Could the RPM be changed to still drive the printer without needing X libraries?

Only if a) you're a programmer, b) know how to write drivers, and c) have Samsung's (presumably proprietary) printer and software engine protocols. In other words, no.

Is there a working version of GS that comes with the Samsung ML-1210 driver out of the box? If so, where can I get it?

It doesn't have anything to do with versions of GS. Winprinters, such as the one you have, are missing a large chunk of circuitry which must be emulated by a software "engine" (this is another Micr*s*ft attempt to make the world proprietary - like winmodems.) Buying one is a bad idea in the first place, although I'd imagine you didn't realize that - you're paying for a real printer and getting a brainless shell that sucks up a chunk of your CPU processing power for no good reason at all.

The 'gdi' driver is some well-meaning programmer's attempt to make these things work under Linux. I'm sure it works for some people - but it obviously requires at least the Xt library.

My suggestion, just in case you have this option open to you, is to return this gadget to the vendor and demand a real printer - which is, after all, what you've paid for. Failing that, you need to load whatever libraries 'gdi' requires, and - you're absolutely right - there's nothing that guarantees that it won't need other ones after Xt.

Research Help

Wed, 8 May 2002 19:13:41 +0100
Neil Youngman (The Answer Gang)



Well i would like to know what the future of Linux will be in the next 3 to 5 years as i am doing a project on it and would appreciate your help.

Linux may take over the world.
It may not.

It may disappear.
It may not.

It may fragment into so many distributions that no one distribution is run by more than 10 people.
It may not.

It may be rewritten from scratch in ADA.
It may not.

It may be taken over by Microsoft.
It may not.

It may become the main operating system controlling the world's refrigerators and kettles.
It may not.

It may do your homework for you ;-)
It may not.


Update Re: The Answer Gang 65

Thu, 23 May 2002 23:29:01 -0400
Robert Hardy (rhardy from webcon.net)


"although it only appears to be available for Debian"

FYI symlink program is standard part of Redhat Linux in both RH6.2 and RH7.3.


Issue 65 is well over a year old; glad to hear they caught on to that tool during the 6.x series. -- Heather

SMC Wireless

Mon, 29 Apr 2002 21:56:36 -0400
Michael Gargiullo (gargiullo from comcast.net)

Has anyone had any success in getting the SMC wireless pcmcia card to work?

I'm running RH7.2 on a compaq presario laptop

Ahh, but he beat us to the punch - in about 7 hours he figured it out himself. I guess Monday wasn't the best day for us to answer him :) Luckily for our readers, he felt inclined to share his success with us. -- Heather

OK got it.. I had to recompile the kernel and used the wavelan driver

For those interested I have the SMC2632W EZ Wireless PC card and the SMC 2655W 11mb Access Point.

I did have to play with the routes to hosts on my firewall

Going to have a beer and sit on my porch while I code...


testing your procmail recipes

Tue, 30 Apr 2002 09:52:21 -0400
Benjamin A. Okopnik (The Answer Gang)

When you initially set up your ".procmailrc", you're going to be tweaking it for a while; getting rid of the first 99% of spam is easy, the next .9% is somewhat tricky, and the next .09% is a fine art. :) What that involves is adding recipes that block as broad of a selection of spam as possible, without affecting your regular traffic; often, you quickly cobble one up while looking at the spam itself - and that's the right time to test it.

Using another xterm window, another console, or a shell escape (often '!', as in Mutt, or perhaps a 'Ctrl-z' to suspend the current program), create a file in your home directory - I actually keep a template called "proc" there just for this - and enter the following:

See attached proc.procmail-recipe.txt

Note that the "mailbox" for a match here is "/dev/null"; in your actual ".procmailrc", you'd probably want to change that to your "spam" mailbox

- at least for a while - to make sure you're not tossing good mail.

Now, from your mail client, pipe the spam ('|' in Mutt) to the following expression:

procmail proc

where "proc" is the name of the file you've just created. If you've matched it correctly, you should not get any output. Now, try the same thing on one of your valid emails - and you should see it in its entirety. Once satisfied, add the new recipe to your ".procmailrc".

Too many CC's? anti-spam procmail recipe

Sun, 28 Apr 2002 10:32:11 -0400
Ben Okopnik (The Answer Gang)

Spammers often send or Cc: to a large list, and these are usually from an archive of "confirmed" addresses - arranged in some order (usually by host or username.) So, if you get an e-mail that's been sent to or has a "Cc:" list with 5 identical users or hosts, that's pretty certainly a bingo (I still send it to my "spam" box rather than bit-bucketing it, just to make sure.)

See attached spammers-cc-too-many.procmail-recipe.txt

For those who are curious about the code: "formail" separates out the specified headers' contents. Perl reads them in, ignoring newlines; gets rid of everything except the addresses; creates a "frequency list" of the usernames and hosts; sorts the list in numerical order and prints out the highest count, which is tested against "greater than or equal to 5".

Please note that this is just a refinement to an existing ".procmailrc". If you do not have "procmail" set up in the first place, I suggest reading my "No More Spam!" article in LG#62:


Note also that this may not work very well for you if you are on some sort of an in-company Cc-list (rather than a list-manager type of setup), unless you have a "whitelist" of the sort that I describe in my article.

Multiple email users on one public address

Wed, 01 May 2002 23:16:59 -0400
Lew Pitcher (lpitcher from sympatico.ca)

I recently switched ISPs and lost the multiple email addresses that the old ISP provided; now, my wife and I are restricted to sharing a single public email address. With fetchmail, I can retrieve our email from my ISP's POP3 server and store it in my lan server for on-demand "offline" reading, but with one email address, either my wife and I have to read each other's mail, or one of us gets no mail at all.

I fixed this little problem with the judicious use of a procmail recipe that uses a feature of email addresses to seperate mail destined for my wife from mail destined for me. You see, although email addresses are usually expressed in the form of


there is an alternate form that's a bit more readable:

  John Q Public <userid@host.domain>

The leading plaintext name (called a 'nickname') is ignored by the mail agents, but is treated as part of the email address for the purposes of data entry and display.

This means that

  Wifes Name <lpitcher@sympatico.ca>


  Husbands Name <lpitcher@sympatico.ca>

are delivered to the same email address (lpitcher@sympatico.ca), but carry slightly different (and testable) values in the email To: field.

This difference permits me to write a procmail recipe that will detect a difference in the nickname and redirect any mail to "Wifes Name" into my wife's local mail spool, while directing mail to "Husbands Name" into my local mail spool. Additionally, mail addressed to "Husband and Wife" or "Wife and Husband" can be duplicated into each of our mail spools.

The procmail recipe that does all this looks like...

See attached sharing-account.procmail-recipe.txt

Of course, you can add as many users as you want nicknames to this, and each user will (ultimately) only get the email addressed to them.

-- Lew Pitcher

Excellent tip, Lew! Well done. As a relevant additional tip, try the '+' address hack: I haven't used it all that much, but it worked fine for the few times when I did. Mail sent to "user+string@host" will be delivered to "user@host", and the part after the '+' can be pretty much anything you like (obviously, excluding whitespace and the '@' character.) A friend of mine uses this as part of his spam reduction policy: when he posts in a Net forum or newsgroup, he'll do something like
He can then route everything from there to a specific mailbox, and can tell exactly where his address got harvested. When a given alias gets too heavily spammed, he blocks it and uses another one.

reliable downloads

Mon, 6 May 2002 09:45:03 -0400
Benjamin A. Okopnik (The Answer Gang)

Have you ever started a long download, left the computer to do its thing, and come back to a message that says "Download timed out" - at just a tiny fraction of the file size? Even with the "resume" feature of "htget", "wget", etc., you've still got the whole thing to do over. How can we get something to 'watch' our downloads, and restart them if they fail?

In Linux, that capability is actually built right in. When programs exit, they return an 'exit code' which indicates success or failure, with most programmers using a sensible definition (i.e., "no, the program didn't crash, but it didn't finish the download") for failure. Given that, all we have to have is a tiny "wrapper" script that checks the exit code, and restarts out process when we're done.

See attached persist.bash.txt

If I want to, for example, install "gimp" on my system, I know that the download will take all night (I have a very slow wireless modem.) Since I use Debian, I would normally type "apt-get install gimp"; instead, I'm going to do

persist apt-get install gimp

and walk away knowing that I'll have it by morning.

Be sure to check for immediate errors (such as "file not found", etc.) though, or you'll be cycling errors all night long. :) -- Ben

There is also an X binary which helps with sort of thing, although I've never used it. I have tried one or two similar apps under the "other OS" though (DL'd StarOffice 5.0 with it), and it is definitely a nice way to go. The SuSE pkg description is:
Name        : nt
Version     : 1.28
Summary     : Downloader for X
Description : Downloader for X is a tool for downloading files from the

  Internet via both HTTP and FTP. It supports reconnecting on connection
  timeouts, has a download queue for multiple files as well as support for
  simultaneous downloads.

    Koshelev Maxim <chuchelo@krasu.ru>
-- John Karns

"Unmapped" pixels.

Sat, 27 Apr 2002 03:52:36 +0200
Robos (The Answer Gang)
Asked and solved by Hans Borg

Hej Answer Gang,

I recently forwarded a problem to you that was very nicely solved. I am very thankful and I also learned a lot. That problem was probably not of much interest to the general reader of the Gazette, but that is not up to me tu to judge. Gazette is a very nice forum, and I like it a lot. Especially I like the "More 2 -Cent Tips" and "The Answer Gang".

Thank you all.

In the name of all probably: no probs ;-)

Well, disregarding the text above, I have a question that may be of more general interest. (Have checked FAQ's and your index search, but not found any obvious answers).

Have made my own icons (.xpm). No problem to make a X*Y one with a defined background. Many Linux .xpm icons,however, have the nice feature to "assert" the wanted pixels only, leaving the background (what ever it is) untouched. How to create or filter a X*Y .xpm file to achieve this feature ? All tips welcome.

Well, I think you mean transparent, meaning the background shining through, right? There is a special color defined. If you use this color not that color is shown but rather none. Dunno what that color is in hex, take a look at an icon that does it with an hex-editor, that should do it ;-)



Thank you for putting me on the right track. I actually found out that the .xpm files are ASCII coded. I always thought they were binaries.

Setting, for example, the background to white it would come out in the .xpm file's color definition as (for 24 bits):


Editing this line to:

"   s None c None"

will do it. Perhaps not the most straight forward method, but it works.

Best regards


Fri, 26 Apr 2002 16:03:30 -0400
Faber Fedor (The Answer Gang)
Asked by Brian Weaver

hi i am kinda new to linux. i am setting up a redhat 7.1 box and i can not telnet into the box. i can ping it. i can telnet out from the box. when i try it says connecting ( IP ADD) cannot open connection to host. it won't even telnet to its self. i seen alot of help for 6.2 but not for 7.1 in 6.2 there is a file inet.d i think that it that you have to modify but 7.1 i can't find it.? thanx brian

In RH 7.x, they switched over to using xinetd instead of the old inetd. You will now find a directory called /etc/xinetd.d. In there you will find a file called "telnet" (and "ftp" and ...). Open the file with your favorite editor and change the line that reads "disable = no" to "disable=yes". Then restart xinetd with a "/sbin/service xinetd restart" as the root user.
Actually you probably don't even have the telnet server daemon installed. Red Hat (Good Distributor! pat pat) doesn't install it by default anymore. Try
rpm -q telnet-server
to see if you've got it. If not, install the package and follow Faber's instructions above. -- Breen
However, you shouldn't be using telnet. telent transmits passwords in the clear (not encrypted) so people can find out what your password is by "sniffing the wire". Use ssh instead (assuming, of course, that you installed the ssh server). -- Faber
Absolutely true. ssh is far superior. -- Breen

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

[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]