LJ Tech Tips

If you give an example hostname in documentation or as part of your
answer in an on-line forum, use one of the safe domains listed in RFC
2606. example.com, example.net and example.org are not assigned to
anyone, so you can safely use them in examples without someone's
actual server getting slammed if a reader takes you literally.

When someone says you're "meretricious", that's a compliment, right?
Not necessarily. Save yourself a trip to the library with the
easy-to-use dict utility by Rik Faith, available on the dict.org web
site:
http://www.dict.org/links.html

If you can only do HTTP from work and want to send resumés from your
shell account, check out GNU httptunnel. It encapsulates any TCP
connection in an HTTP connection, so it will work through an
application-level proxy.

(PPP over ssh over httptunnel is left as an exercise for those readers
who really want to give the corporate security pigs the finger.)

"xterm" isn't a very helpful window bar title for an xterm. You can
put extra information in the title bar, however, with escape
sequences. For example, this repeats your shell prompt both in the
title bar and the command line:

export PS1="\[\033]0;$PS1\007\]$PS1"

For more xterm title bar customization, see the Bash Prompt HOWTO by Giles Orr:

One of the main rules of security is "Don't run anything as root that
you don't have to." To run BIND as a non-root user, first create a
user and group "named", then add the -u (user) and -g (group) options
to the init script for BIND.

On some distributions the init script is called "bind" and on others
it's called "named".

For example, in Debian, change the "start-stop-daemon" line in
/etc/init.d/bind to:

Got old web pages that are so messy you just stick a couple of extra
</table> tags on the end and hope for the best? Try HTML Tidy, the
pretty-printer for HTML, available from the HTML Tidy web site:
http://www.w3.org/People/Raggett/tidy or your favorite Linux packages
site.

HTML Tidy fixes common HTML mistakes and puts everything in an
easy-to-edit format. The author claims it does a good job of stripping
excess markup from Microsoft Word documents saved as HTML, too.

To keep the flexibility of moving services from one system to another
without reconfiguring all the clients, it's a good idea to set up
CNAME records in your DNS. Some good examples are "pop", "smtp",
"news", "shell" and "webproxy"--that way you can move the outgoing
mail server or the Squid server to its own host without having to
reconfigure all the clients.

But with the increasing number of mobile users, don't make the mistake
of, for example, setting client software to only use "smtp" and "pop"
for their mail. Fully qualify the domain name, so that when they take
their laptops to the leetconference.com network, they don't end up
trying to send their mail through smtp.leetconference.com by mistake,
and get it bounced back for attempted spamming. Configure client
software for CNAMEs like smtp.internal.example.com.

(sendmail 2c TIP) * 2

2c TIP: Sendmail ignores everything after a plus symbol in a
username field of an email address. Hence if while cruisin the Wild
Wide Waste, you come across something that needs your email
address, you and put in USER+comment@domain.com When
you get mail/UCE/Spam to that address, you'll know who sold it, or
put it on a web page and a spider ran across it. Even works on
webpages when you want to put a "Mail Me" link. At least you
know a spider harvested your address.

Which leads into another 2c TIP. I use /etc/aliases file to control
my mail. Like I could alias "fubar" to my normal email account
"guy". If for some reason I get a lot of spam from that email
address "fubar" - I would just delete the alias "fubar" from the file,
and the "account" is gone, but my normal email address is intact
for my friends to use.

I do this with my clients that I host for. I inform them of the
benefits of aliasing, and then offer each account they have up to 3
aliases.

Smile--
Guy Milliron

A 2 Cent About Converting Image Files

Hello Answer Gang,
Sometime this week, I noticed that somebody was asking about how to
automating the Gimp so that it could convert image file formats from one
format into another from the shell command line.

I cannot remember who it was, because I lost the email, thus, I'll post
this message and hope that the person will see my posting.

The ImageMagick tools will do the trick. They have a utility called
"convert" that can do the necessary conversions from the command line.

While in hack mode...

Back in LG#60, one of our readers ("Roy") posted a little Tcl/Tk script
to TAG - in effect, this thing pops up a little 'sticky note' with a
message, and goes away when it's clicked. I saved it, and put it to use
occasionally - it's a rather useful toy. A few minutes ago, however,
I happened to glance at the code, and noticed that there was a "dead"
section in there, code that was supposed to execute but didn't. So,
having fixed it and added a usage message, here's the 'New and Improved'
version of the script I called "3m" for semi-obvious reasons:

Tcl/Tk will simply display the quoted text enclosed in curly braces.
Also, note the (unquoted) '&' at the end of the line - this puts
the process in the background, and allows you to continue using your
xterm... perhaps to launch more 'sticky notes'.

I usually use xcolors or gcolorsel, myself. With the caveats that
xcolors creates a huge window and gcolorsel requires GNOME, they're
enough for me to get a quick eyeball on the named color I want to use.
-- Heather

For various reasons, gcc is no longer able to compile the kernel from
source because it uses the 2.96 version of the GNU C
Compiler. However, it is still easy to compile your kernel, as version
2.91.66 of the egcs C compiler has been included with the
distribution. Please note that the details involved with compiling a
kernel are not covered here. For more information please read
the Linux Kernel HOWTO at
http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO.html. This document
is assuming
you have a basic grasp of what is necessary to compile a kernel and
simply cannot get the @$&%@$@*% thing to compile in Red
Hat Linux 7. This information only applies to pristine source,
downloaded from a site such as kernel.org, as the changes necessary
to compile have already been made to the source from the
kernel-source-2.2.16-22.i386.rpm package.

After downloading and extracting the source in /usr/src, cd
to/usr/src/linux and open the Makefile in your favorite editor. You will
need to look for a line similar to this:

CC =$(CROSS_COMPILE)gcc -D__KERNEL__ -I$(HPATH)

This line specifies which C compiler to use to build the kernel. It
should be changed to:

CC =$(CROSS_COMPILE)kgcc -D__KERNEL__ -I$(HPATH)

for Red Hat Linux 7. The kgcc compiler is egcs 2.91.66. From here you
can proceed with the typical compiling steps.

Monitoring log files in real time

When you're debugging a program that writes error messages to a log
file, run "tail -f LOGFILENAME" in another
window. You'll see the error messages immediately when they
occur.

If it's hard to distinguish the lines referring to the latest error,
press Enter a few times in that window. That won't affect the file,
but it will put a few blank lines on the screen. Then it will be easy
to see where the next error message starts.

HSP Micromodem

Pie ChartsHi all,
I'm desperately looking for a driver for my HSP56 Micromodem, a device
integrated on my Mainboard.
Could you suggest some site to download it?

Try searching for "linmodem" with your favorite search engine - I usually
favor google for Linux related searches. There is a site dedicated to
information regarding setting up modems under Linux, and is called
something like www.linmodem.org. I can't remember whether it's .org or
.net, or something else.

-- John Karns

It's plural, and .org ...

if anything calls itself an "HSP"
"HSF" or "HCF" modem, this is the place to see if linux hates
it or can deal with it. -- Heather

Query about Makefile

I am new to this Linux field . I just want to
know all information about Makefile concept used for
compling and configuring Linux kernel .
Where can I get good resource about Makefile ?

amol

Hi Amol,
I read a book entitled "Mastering Make, A Guide to Building Programs on
DOS, OS/2, and Unix Systems" by Tondo, Nathanson, and Young. The ISBN is
ISBN 0-13-121906-5.
I suspect that the O Reilly book about make is also good.

and if he means "normal" signs ... as long as your printer is up to
it, there is OF COURSE my favorite, The Gimp. Pretty darn easy to
tell it you want 250 point fonts. It isn't trying specially to be
"Print Shop Deluxe" ... aiming more for Photoshop really ... but
you can do just about anything with it.
http://www.gimp.org

If it was one of those banner/greeting card/calendar etc. programs
you wanted then maybe Chilliware's IceSculptor would work for
you. As far as I can tell Chilliware itself is unreachable
(were they bought by someone?) but it's pretty easy to find their
boxed product in various e-stores, at least right now. I can't
give you any info about how easy it is to install, etc.

-- Heather

Long ago on the VAX/VMS mainframes we used to make ASCII-art signs that showed
Snoopy holding a sign with your text on it. Since the printer used that
tractor-fed paper, it was easy to make a wide sign. The program might have
been called 'banner'.