Linux Gazette, a member of the Linux Documentation Project, is an on-line WWW publication that is dedicated to two simple ideas:
TWDT 1 (text)
TWDT 2 (HTML)
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.
Got any great ideas for improvements! Send your comments, criticisms, suggestions and ideas.
This page written and maintained by the Editor of Linux Gazette,
The Mailbag!Write the Gazette at gazette@ssc.com |
Contents: |
Date: Sun, 17 Nov 1996 18:49:56 -0600
Subject: a reply type thing...
From: Glenn E. Satan, insipid@onramp.net
> Subject: Xwindows depth > From: James Amendolagine uq274@freenet.victoria.bc.ca > > I have recently been messing with my x-server, and have managed > to get a depth of 16, ie 2^16 colors. This works > really nice with Netscape, but some programs (doom, abuse, and > other games) wont work with this many colors. Do > you know of a fix? I have tried to get X to support multiple > depths--to no avail. The man-page suggests that some > video cards support multiple depths and some don't. How do I know > if mine does. > > I would really like to see an article on this subject,I would like to say, yes, please someone help.... thought maybe a reply would motivate someone a little more to write a article on this.
(All right a second request for help in this area. Anybody out there with suggestions and/or wanting to write an article? --Editor)
Date: Sun, 01 Dec 1996 00:20:12 +1000
Subject: Quilting and geometry
From: Chris Hennessy,
chenness@enterprise.powerup.com.au
I liked your comment about quilting being an interest. We tend to forget that people have interests outside of computers in general (and linux in particular).
Just like to say thanks for what is obviously an enormous effort you are putting into the gazette. I'm new(ish) to linux and I find it a great resource, not to say entertaining.
Has anyone suggested an article on the use of Xresources? As I said I'm fairly new and find this a bit confusing... maybe someone would be interested in an example or three?
Oh and with the quilting and geometry ... better make sure its not the 80x25+1-1 variety.
(Thanks, LG is a lot of work, as well as a lot of fun. And yes, I do have a life outside of Linux. Anyone interested in writing about Xresources? Thanks for writing. It's always nice to know we are attracting new readers. --Editor)
Date: Wed, 4 Dec 1996 13:33:26 +0200 (EET)
Subject: security issue!
From: Arto Repola,
arepola@raahenet.ratol.fi
Hi there!
I was wondering that could you write in some Gazette something about Linux security...how to improve it, how to setup firewall,shadow password systems etc?
I'm considering to build up my own linux-server and i really would like to make it as secure as possible!
Nothing more this time!
http://raahenet.ratol.fi/~arepola
(And another great idea for an article. Any takers? --Editor)
Date: Wed, 04 Dec 1996 08:08:06 -0700
Subject: Reader Response
From: James Cannon,
cannonj@jads.kirtland.af.mil
Organization: JADS JTF
Great Resource,
I really like the resource Linux offers new users. I have already applied a few tricks to my PC. I wish some one would explain how to use the GNU C/C++ compiler with Linux. It is a tool resting in my hard drive. With commercial compilers, there is a programming environment that links libraries automatically. Are there any tricks to command line C/C++ programming with Linux?? Stay online!
James Cannon
(Thanks for the tip. Online is the best place to be. Anyone out there got some C++ help for this guy? --Editor)
Date: Mon, 9 Dec 1996 23:27:21 +0000 (GMT)
Subject: Linux InfraRed Support
From: Hong Kim,
kimh@domp04.adm.intelsat.int
Hi,
I have been so far unsuccessful in finding information for InfraRed support on Linux.
I am particularly interested in hooking up Caldera Linux on a Thinkpad 560 using Extended Systems JetEye Net Plus. Caldera on Thinkpad I can handle but the JetEye allows connection to ethernet or token ring networks via IR.
My searches of Linux Resources page come up negative. I have posted to USENET and also emailed any web master that has any mention of ThinkPad or IR on their pages. Still no answer.
Can you help me to find information. If I am successful, I would be willing to write an article about it.
Hong
(I have sent your question on to Linux Journal's Tech Support Column. Answers from this source can be slow as author contacts companys involved. Sounds like you have covered all the bases in your search -- can anyone out there help him? If you write the article, I'll be happy to post it in the LG so next person who needs this information will have a quicker answer. --Editor)
Date: Thu, 5 Dec 96 13:00:01 MET
Subject: Linux networking problem ...
From:
Tauche%fbm%mfh@mfhdvzis.mfh-iserlohn.de
Hi there,
First I have to apologize for writing to this address with my problem, but I don't no where to search for an answer and university's network is so damned slow that surfing through the net searching for an answer makes no fun. Another reason is that I've got no access to Usenet... means can't post in comp.os.linux.networking... 8-((
I tried to find a news server near to Germany which allows posting without using that damned -> identd <- but found none, may be you know where to find a list with (free) news servers ?
Here's the problem:
I want to setup Linux in our University's LAN but ran into problems, because
the LAN is VINES-IP based so that normal TCP/IP packet drivers won't work.
The admin says I do need a driver which can tunnel the normal Linux TCP/IP
packets into those VINES-IP packets, so that they can be send over the LAN to
that box which has Internet connection....
Maybe you know if such thing is available and/or where I can get it. Or maybe you can give some Email-addresses for asking people which real knowledge 'bout Linux (maybe even that of Linus T. himself) and it's drivers.
Hope you can help me 8-))
Thanks in advantage
Stefan 8-))
(I've sent your problem on to Linux Journal's Technical Support column and will post it in Linux Gazette's Mailbag next month. Neither one will give you a fast answer.I did a search of LG, LJ and SSC's Linux Resources using VINES as the keyword. I found only one entry from an author's biography. It's old -- March 1995 -- and the guy was in the marine corp then so may or may not be a good address. Anyway here's what it said:
"Jon Frievald ... manages Wide Area Network running Banyan VINES. ... e-mail to jaf@jaflrn.liii.com"Anyway you might give him a try for help ideas.
For faster access to LG have you tried any of LG's mirror sites in Germany:
- http://www.cs.uni-dusseldorf.de/~stein/lg
- http://vina12.va.htw-dresden.de/lg
- http://www.fokus.gmd.de/linux/lg
Please note that mirror sites wont help search time -- all searching is done on SSC site. --Editor)
Date: Sat, 30 Nov 1996 20:35:17 -0600 (CST)
Subject: Re: Slang Applications for Linux
From: Duncan Hill, dhill@sunbeach.net
To: Larry Ayers,
layers@vax2.rain.gen.mo.us
On Sat, 30 Nov 1996, Duncan Hill wrote:
Greetings. I was reading your article in the Linux Gazette, and thought
you might be interested to know that Lynx also has its own web site now at:
http://lynx.browser.org/
It's up to version 2.6 now, and is rather nice, specially with slang
included :)
Duncan Hill, Student of the Barbados Community College
(Thanks for the tip! I really appreciate responses from readers; confirms that there are really readers out there! --Larry Ayers)
Date: Sat, 30 Nov 96 16:42:58 0200
Subject: Linux Gazette
From: Paul Beard, paulb@id.co.zw
Hello from Zimbabwe.
Very nice production. Keep up the good work.
Regards,
Paul Beard.
(Thanks. --Editor)
Date: Thu, 28 Nov 1996 23:54:38 +0000
Subject: Thanks!
From: Russ Spooner, russ1@rmplc.co.uk
Organization: Kontagx
Hi,
I have been an avid reader of Linux Gazette since its inception!
I would just like to say that it has helped me a lot and that I am
really glad that it has become more regular :-)
The Image you have developed now has come a long way and it is now one of the best organized sites I visit!
Also I would like to thank you for the link to my site :-) it was a real surprise to "see myself up in lights" :)
Best regards!
Russ Spooner, http://www.pssltd.co.uk/kontagx
Date: Thu, 28 Nov 1996 12:49:12 -0500
Subject: LG Width
From: frank haynes, frank@vatmom.com
Organization: The Vatmom Organization
Re: LG page width complaint, LG looks great here, and I don't think my window is particularly large. Keep up the fine work.
--Frank, http://www.mindspring.com/~fmh
(Good to hear. --Editor)
Date: Fri, 29 Nov 1996 10:30:32 +0000
Subject: LG #12
From: Adam D. Moss. adam@uunet.pipex.com
Nice job on the Gazette, as usual. :)
Adam D. Moss / Consulting
( :-) --Editor)
Date: Tue, 3 Dec 1996 12:55:18 -0800 (PST)
Subject: Re: images in tcsh article
From: Scott Call, scall@ccnet.com
Most of the images in the TCSH article in issue 12 are broken
-Scott
(You must be looking at one of the mirror sites. I inadvertently left those images out of the issue12 tar file that I made for the mirror sites. When I discovered it yesterday, I made an update file for the mirrors. Unfortunately, I have found that not all the mirrors are willing to update LG more than once a month, so my mistakes remain until the next month. Sorry for the inconvenience and thanks for writing. --Editor)
Date: Fri, 06 Dec 1996 21:21:00 +0600
Subject: 12? why can you make so bad distributive?????????????
From: Sergey A. Panskih, serg@cnti.chel.su
i ftpgeted lg12 and untar.gz it as made with lg11. lg11 was read as is: with graphics and so, but lg12... all graphics was loosed. i've verified hrefs and found out that href was written with principial errors : i must copy all it to /images in my httpd server!!!!
this a pre-alpha version!!!
i can't do so unfixed products!!!
i'm sorry, but you forgotten how make a http-ready distrbutions... :)
Sergey Panskih
P.S. email me if i'm not true.
(I'm having a little trouble with your English and don't quite understand what "all graphics was loosed" means. You shouldn't have to copy anything anywhere: what are you copying to /images?There is one problem I had that may apply to you. Are you throwing away previous issues and only getting the current one? If so, I apologize most humbly. I was not aware until this month that people were doing this and when I made the tar file I included only new files and those that had been changed since the last month. To correct this problem I put a new tar file on the ftp site called standard_gifs.html. It's not that I've forgotten how to make http-ready distributions, it's that I'm just learning all the complexities. In the future I will make the tar file to include all files needed for the current single issue, whether they were changed or not.
I am very sorry to have caused you such problems and distress. --Editor)
Date: Mon, 02 Dec 96 18:13:48
Subject: spiral trashes letters
From: jep@jephill.com
It's clever and pretty, but the spiral notebook graphic still trashes the left edge of letters printed in the issue 12 Mailbag.
Problem occurs using OS/2's Web Explorer version 1.2 (comes with OS/2 Warp 4.0). Problem does NOT occur using Netscape 2.02 for OS/2 beta 2 (the latest beta for OS/2).
Problem occurs even while accessing www.ssc.com/lg
Jep Hill
(Problem will always occur with versions of either Microsoft Explorer or Netscape before 2.0. It is caused by a bug in TABLES that was fixed in the 2.0 versions. I don't have access to OS/2's Web Explorer, so I can only guess that it's the same problem. I'd recommend always using the latest version of your browser. --Editor)
Date Mon, 9 Dec 1996 10:14:04 -0800 PST
Subject: Background
From: rayvd@shocking.com
I run at a resolution of 1152x846 (a bit odd I suppose) and although the Gazette pages look very nice indeed, it is a bit hard to read when I have my Netscape window maximized. The bindings part of the background seems to be optimized for a width of 1024 and thus tiles over again on the right side of the page. This makes reading a bit difficult as some of the text now overlaps the bindings on the far right.
I'm not sure if that's a great description of the problem, but I can easily make you a screenshot if you want to see what I mean.
Anyhow, this is only a minor annoyance--certainly one I'm willing to live with in order to read your great 'zine. :)
Ray Van Dolson -=-=- Bludgeon Creations (Web Design) - DALnet #Bludgeon -- http://www.shocking.com/~rayvd/
(Screen shot wont be necessary. When the web master first put the spiral out there, the same thing happened to me -- I use a large window too, but not as large as yours. He was able to expand it to fix it at that time. I notified him of your problem, but not sure if he can expand it even more or not. We'll see. Glad it's a problem you can live with. :-) --Editor)
Date: Sat, 7 Dec 1996 22:16:55 +0100 (MET)
Subject: Problem with Printing.
From: fm@M1.whitespace.de
Hi,
This is just to let you people know, that there might be a slight problem. I want to point out and make it perfectly clear that this is NOT a complaint. I feel perfectly satisfied with the Linux Gazette as it is.
However sometimes I prefer to have a printed copy to take with me. Therefore I used to print the LG. from Netscape. I'm using the new 3.1 version now. With the last two issues I have difficulties doing so. All the pages with this new nice look don't print too well. The graphics show up at all the wrong places and only one page is printed on the paper. The rest is swallowed. Did you ever try to print it?
I had to use an ancient copy of Mosaic, that doesn't know anything about tables, to print these pages. They don't look too good this way too, and never did. I know this old Mosaic is buggy. At least it doesn't swallow half of the stuff. This could as well be a bug in Netscape. I know next to nothing about html.
Anyway, have fun.
Regards Friedhelm
(No, I don't try to print it, but will look into it. Are you printing out "TWDT" from the TOC or trying to do it page by page? It is out there in multi-file format and so if you print from say the Front Page, the front page is all you'll get. "TWDT" is one single file containing the whole issue, and the spiral and table stuff are removed so it should print out for you okay. Let me know if this is already what you are printing, so I'll know where to look for the problem. --Editor)
Date: Wed, 18 Dec 1996 04:02:37 +0200
Subject: Greetings
From: Trucza Csaba, ctrucza@cemc.soroscj.roi
To: fiskjm@ctrvax.Vanderbilt.Edu
Well, Hi there!
Amazing. I've just read the Linux Gazette from the first issue to this one, the 12th (actually I read just the first 7 issues through, because the others were not downloaded correctly).
It's 4 in the morning and I'm enthusiastic. I knew Linux was good, I'm using it for a year (this is because of the lack of my english grammar, I mean the previous sentence, well...), so I knew it was good, but I didn't expect to see something so nice like this Gazette.
It's good to see that there are a WHOLE LOT of people with huge will to share.
I think we owe You a lot of thanks for starting it.
Merry Christmas, a Happy New Year, and keep it up!
Trucza Csaba, Romania
(Thanks, I will. -- Editor)
Date: Mon, 23 Dec 1996 12:16:30 -0800 (PST)
Subject: lg issue 12 via ftp?
From: schwarz@monet.m.isar.de (Christian Schwarz)
I just saw that issue #12 is out and accessible via WWW, but I can't find the file on your ftp server nor on any mirrors.
(Sorry for the problems. We changed web servers and I went on vacation. Somehow in the web server change, some of the December files got left behind. I didn't realize until today that this had happened. Sorry for the inconvenience. --Editor)
Date: Fri, 20 Dec 1996 00:31:45 -0500
Subject: Great IDEA
From: Pedro A Cruz, pcruz@panixc.com
Hi:
I visited your site recently and was astounded by the wealth of information there. I have lots of bandwidth to read your site. I noticed that you have issues for download. I Think it will be a great service to the LINUX community if you consider publishing a CDROM (maybe from walnut creek cdrom) as a subscription item.
pedro
(Yes, that is a good idea. I'll talk to my publisher about it. --Editor)
Date: Sun, 22 Dec 1996 20:24:51 -0600
Subject: Linux as router
From: Robert Binz, rbinz@swconnect.net
I have found myself trying to learn how to use Linux as a usenet server to provide news feeds to people, and to use Linux as a IRC server. Information on these topics are hard to come buy. If you have any sources on these subjects that you can point me to I would be most appreciative.
But any how, I have found an article in SysAdmin (Jan 96 (5.1)) that is titled Using Linux as a Router, by johnathon Feldman. Is it possible to reprint this article or get the author to write a new one for you?
TIA
Robert Binz
(I'll look into it. In the meantime, I've forwarded your letter to a guy I think may be able to help you. --Editor)
Date: Fri, 13 Dec 1996 03:57:09 -0500 (EST)
Subject: Correction for LG #12
From: Joe Hohertz, jhohertz@golden.net
Organization: Golden Triangle On-Line
Noticed the folowing in the News section.
A couple of new Linux Resources sites:
(Seems I had Joe's address wrong. Sorry. --Editor)
Date: Tue, 17 Dec 1996 01:19:43 -0500
Subject: One-shot downloads
From: David M. Razler, david.razler@postoffice.worldnet.att.net
Folks:
While I realize that the economies of the LINUX biz require that there be some method of making money even on the distribution of free and "free" software, I have a request for them of us who 1) are currently scraping for the cash for our Internet accounts and 2) would like to try LINUX.
How about a one-shot download? I mean, oh, everything needed to establish a LINUX system in one ZIP'ed (or tar/gz'd, though zip is a more compatible format) file, one for each distribution?
I'm currently looking to establish LINUX on my "spare" PC, a 386DX-16 w/4 meg and a scavenged 2500MB IDE drive, etc. It will be relatively slow, limited, lacks a CD-rom drive, but it's free, since the machine is currently serving as a paperweight.
I could go out and buy a used CD-rom for the beast, or run a bastard connection from my primary, indispensable work machine and buy the CDs. But I am currently disabled and spending for these things has to be weighed against other expenses (admittedly, I am certainly lucky and not destitute, it would just be better)
I could get a web robot and download umpteen little files, puzzle them out and put them together, though the load on your server would be higher.
Or, under my proposed system, I could download Distribution Code, Documents, and Major accessories in one group, then go back for the individual bits and pieces I need to build my system.
Again, I realize that running your site costs money, and that people make money, admirably little money, distributing LINUX on CDs, with the big bucks (grin) of LINUX coming in non-free software, support and book sales.
But if the system is to spread, providing a series of one-shot downloads, possibly available only to individuals (I believe one could copyright the *package* and require someone downloading to agree to use it only on a single non-commercial system and not to redistribute, but I am not an intellectual properties lawyer), to make life easier for them of us who need to learn a UNIX-style system and build one on the cheap.
dmr
Hello LG people,
here comes a short script which will check from time to time that there is enough free space available on anything which shows up in mount (disks, cdrom, floppy...)
If space runs out, a message is printed every X seconds to the screen and 1 mail message per filled device is fired up.
Enjoy!
Hans
#!/bin/sh # # $Id: issue13.html,v 1.3 2003/02/03 21:50:18 lg Exp $ # # # Since I got mysterious error messages during compile when # tmp files filled up my disks, I wrote this to get a warning # before disks are full. # # If this stuff saved your servers from exploding, # send praising email to zocki@goldfish.cube.net. # If your site burns down because of this, sorry but I # warned you: no comps. # If you really know how to handle sed, please forgive me :) # # # Shoot and forget: Put 'check_hdspace &' in rc.local. # Checks for free space on devices every $SLEEPTIME sec. # You even might check your floppies or tape drives. :) # If free space is below $MINFREE (kb), it will echo a warning # and send one mail for each triggering device to $MAIL_TO_ME. # If there is more free space than trigger limit again, # mail action is also armed again. # # TODO: Different $MINFREE for each device. # Free /*tmp dirs securely from old junk stuff if no more free space. DEVICES='/dev/sda2 /dev/sda8 /dev/sda9' # device; your put disks here MINFREE=20480 # kb; below this do warning SLEEPTIME=10 # sec; sleep between checks MAIL_TO_ME='root@localhost' # fool; to whom mail warning # ------- no changes needed below this line (hopefully :) ------- MINMB=0 ISFREE=0 MAILED="" let MINMB=$MINFREE/1024 # yep, we are strict :) while [ 1 ]; do DF="`/bin/df`" for DEVICE in $DEVICES ; do ISFREE=`echo $DF | sed s#.\*$DEVICE" "\*[0-9]\*" "\*[0-9]\*" "\*## | sed s#" ".\*##` if [ $ISFREE -le $MINFREE ] ; then let ISMB=$ISFREE/1024 echo "WARNING: $DEVICE only $ISMB mb free." >&2 #echo "more stuff here" >&2 echo -e "\a\a\a\a" if [ -z "`echo $MAILED | grep -w $DEVICE`" ] ; then echo "WARNING: $DEVICE only $ISMB mb free. (Trigger is set to $MINMB mb)" \ | mail -s "WARNING: $DEVICE only $ISMB mb free!" $MAIL_TO_ME MAILEDH="$MAILED $DEVICE" MAILED=$MAILEDH # put further action here like cleaning # up */tmp dirs... fi elif [ -n "`echo $MAILED | grep -w $DEVICE`" ] ; then # Remove mailed marker if enough disk space # again. So we are ready for new mailing action. MAILEDH="`echo $MAILED | sed s#$DEVICE##`" MAILED=$MAILEDH fi done sleep $SLEEPTIME done
Just finished reading issue #12, nice work.
A followup to the "Console Tricks" 2-cent tip:
What I like to do is have a line in /etc/syslog.conf that says:
*.* /dev/tty10that sends all messages to VC 10, so I can know what's going on whether in X or text mode. Very useful IMHO.
-- Elliot, http://www.redhat.com/
I too thought WhirlGIF (Graphics Muse, issue 12) was the greatest thing since sliced bread (well, aside from PNG) when I first discovered it, but for creating animations, it's considerably inferior to Andy Wardley's MultiGIF. The latter can specify tiny sprite images as parts of the animation, not just full images. For my PNG-balls animation (see http://quest.jpl.nasa.gov/PNG/), this resulted in well over a factor-of-two reduction in size (577k to 233k). For another animation with a small, horizontally oscillating (Cylon eyes) sprite, the savings was more than a factor of 20(!).
MultiGIF is available as source code, of course. (And I had nothing to do with it, but I do find it darned handy.)
Regards,
Greg Roelofs, http://pobox.com/~newt/
Newtware, Info-ZIP, PNG Group, U Chicago, Philips Research, ...
Regarding the posting in issue #12 of your gazette, how to backup the current messages file & recreate, here is an alternative method...
Place the lines at the end of this messages in a shell script (/root/cron/swaplogs in this example). Don't forget to make it +x! Execute it with 'sh scriptname', or by adding the following lines to your (root's) crontab:
# Swap logfiles every day at 1 am, local time 0 01 * * * /root/cron/swaplogsThe advantage to this method over renaming the logfile and creating a new one is that in this method, syslogd is not required to be restarted.
#!/bin/sh cp /var/adm/messages /var/adm/messages.`date +%d-%m-%y_%T` cat /dev/null >/var/adm/messages cp /var/adm/syslog /var/adm/syslog.`date +%d-%m-%y_%T` cat /dev/null >/var/adm/syslog cp /var/adm/debug /var/adm/debug.`date +%d-%m-%y_%T` cat /dev/null >/var/adm/debug
>In answer to the question: > > What is the proper way to close and reopen a new >/var/adm/messages > file from a running system? > > Step one: rename the file. Syslog will still be writing in it >after renaming so you don't > lose messages. Step two: create a new one. After re-initializing >syslogd it will be used. >just re-initialize. > > 1.mv /var/adm/messages /var/adm/messages.prev > 2.touch /var/adm/messages > 3.kill -1 pid-of-syslogd > > This should work on a decent Unix(like) system, and I know Linux >is one of them.This is NOT an proper way of truncate /var/adm/messages.
It is better to do:
Best of regards,
Eje Gustafsson, System Administrator
THE AERONAUTICAL RESEARCH INSTITUTE OF SWEDEN
This is a relatively minor point, but Info-ZIP's Zip/UnZip encryption code is *not* DES as reported in Robert Savage's article (LG issue 12). It's actually considerably weaker, so much so that Paul Kocher has pub- lished a known-plaintext attack (the existence of which is undoubtedly the reason PKWARE was granted an export license for the code). While the encryption is good enough to keep your mom and probably your boss from reading your files, those who desire *real* security should look to PGP (which is also based on Info-ZIP code, but only for compression).
And while I'm at it, Linux users will be happy to learn that the upcoming releases of UnZip 5.3 and Zip 2.2 will be noticeably faster than the cur- rent publicly released code. In Zip's case this is due to a work-around for a gcc bug that prevented a key assembler routine from being used--Zip is now 30-40% faster on large files. In UnZip's case the improvement is due to a couple of things, one of which is simply better-optimized CRC code. UnZip 5.3 is about 10-20% faster than 5.2, I believe. The new ver- sions should be released in early January, if all goes well. And then... we start working on multi-part archives. :-)
Greg Roelofs, http://pobox.com/~newt/
Newtware, Info-ZIP, PNG Group, U Chicago, Philips Research, ...
Greetings. Having been through hell after a recompile of my kernel, I thought I'd pass this on.
It all started with me compiling a kernel for JAVA binary support..who tell me do that. Somehow I think I got experimental code in..even worse :> Anyway, it resulted in a crash, and I couldn't recompile since then.
Well, after several cries for help, and trying all sorts of stuff, I upgraded binutils to 2.7.0.3, and told the kernel to build elf support and in elf format, and hey presto. I'd been wrestling with the problem for well over a week, and every time, I'd get an error. Unfortunately, I had to take out sound support, so I'm going to see if it'll add back in.
I have to say thank you to the folks on the linux-kernel mailing list at vger.rutgers.edu. I posted there once, and had back at least 5 replies in an hour. (One came back in 10 minutes).
As for the LG, it looks very nice seen thru Lynx 2-6 (no graphics to get messed up :>) I love the Weekend Mechanic, and the 2 cent tips mainly. Perhaps one day I'll contribute something,.
Duncan Hill, Student of the Barbados Community College http://www.sunbeach.net/personal/dhill/dhill.htm http://www.sunbeach.net/personal/dhill/lynx/lynx-main.html
I finally used the following script:
if [ ${SHELL##/*/} = "ksh" ] ; then if [[ $TERM = x"term" ]] ; then HOSTNAME=`uname -n` label () { echo "\\033]2;$*\\007\\c"; } alias stripe='label $LOGNAME on $HOSTNAME - ${PWD#$HOME/}' cds () { "cd" $*; eval stripe; } alias cd=cds eval stripe fi fiI don't use vi, so I left out that functionality.
The functional changes I made are all in the arguments to the echo command. The changes are to use \\033 rather than what was shown in the original tip as ^[, to use \\007 rather than ^G, and to terminate the string with \\c rather than use the option -n.
On AIX 4.1, the command "echo -n hi" echoes "-n hi"; in other words, -n is not a portable command-line option to the echo command. I tested the above script on AIX 3.2, AIX 4.1, HPUX 9.0, HPUX 10.0, Solaris 2.4 and Solaris 2.5. I'm still trying to get Linux and my Wintel box mutually configured, so I haven't tested it on Linux.
I have noticed a problem with this script. I use the rlogin command to log in to a remote box. When I exit from the remote box, the caption is not updated, and still shows the hostname and path that was valid just before I exited. I tried adding
exits () { "exit" $*; eval stripe; } alias exit=exitsand
rlogins () { "rlogin" $*; eval stripe; } alias rlogin=rloginsNeither addition updated the caption to the host/path returned to. Any suggestions?
Roger Booth, rbooth@bmc.com
Some further clarification is needed with respect to the X Term Titlebar Function tip in the Linux Gazette Two Cent Tips column of the January 1997 issue. With regard to the -print option to find, Michael Hammel says, "Linux does require this." This is yet another example of "Your mileage may vary." Some versions of Linux do not require the -print option. And, although Solaris may not, SunOS 4.1.3_U1 and 4.1.4 do require the -print option. Also, if running csh or tcsh, remember to escape wildcards in the file specification ( e.g. find ./ -name \*txt\* ) so that the shell doesn't attempt to expand them.
Second, for those tcsh fans out there, here is an xterm title bar function for tcsh.
NOTE: This works on Slackware 3.0 with tcsh version 6.04.00, under the tab, fv, and OpenLook window managers. Your mileage may vary.
if ( $TERM == xterm ) then set prompt="%h> " alias cwdcmd 'echo -n "^[]2;`whoami` on ${HOST} - $cwd^G^[]1;${HOST}^G"' alias vi 'echo -n "^[]2;${HOST} - editing file-> \!*^G" ; vim \!* ; cwdcmd' alias telnet '/bin/telnet \!* ; cwdcmd' alias rlogin '/usr/bin/rlogin \!* ; cwdcmd' cwdcmd else set prompt="[%m]%~% " endif
This here is the way I do it, but don't use it if your area has some regulations about redialing the same phone numbers over and over:
#!/bin/sh # A quick hack for redialing with ppp byThere. Customize as needed & be an excellent person. Ant DON'T break any laws if redialing is illegal in your area!# Tries 2 numbers sequentially until connected # Takes 1 cmdline parm, the interface (ppp0, ppp1...) # You need 2 copies of the ppp-on script (here called modemon{1,2}) with # different telephone numbers for the ISP. These scripts should be slightly # customized so that the passwd is _not_ written in them, but is taken # separately from the user in the main (a.k.a. this) script. # Here's how (from the customized ppp-on a.k.a. modemon1): # ... # TELEPHONE=your.isp.number1 # Then make a copy of this script -> modemon2 # and change this to your.isp.number2 # ACCOUNT=your.account # PASSWD=$1 # This gets the passwd from the main script. # ... # /sbin/ifconfig must be user-executable for this hack to work. wd1=1 # counter start stty -echo # echo off echo -n "Password: " # for the ISP account read wd2 stty echo # back on echo echo "Trying..." echo 'ATE V1 M0 &K3 &C1 ^M' > /dev/modem # modem init, # change as needed /usr/sbin/modemon1 $wd2 # first try flag=1 # locked while [ 1 ]; do # just keep on going if [ "$flag" = 1 ]; then # locked? bar=$(ifconfig | grep -c $1) # check for a link if [ "$bar" = 1 ]; then # connected? echo "Connected!" # if so, then exit 0 # get outta here else foo=$(ps ax) # already running? blaat=$(echo $foo | grep "/usr/sbin/pppd") if [ "$blaat" = "" ]; then # if not, then flag=0 # unset lock fi fi else # no lock, ready # to continue wd1=$[wd1+1] echo "Trying again... $wd1" if [ $[wd1%2] = 1 ]; then # this modulo test /usr/sbin/modemon1 $wd2 # does the switching else # between the 2 numbers /usr/sbin/modemon2 $wd2 # we are using fi flag=1 # locked again fi done # All done!
Mark
G'day,
Just browsing through the mailbox, and I noticed your reply to a user about HTML standard compliance and long download times. You replied that you use the spiral image (a common thing these days) inside a <TABLE>.
I hope you are aware that a browser cannot display any contents of a <TABLE> until it has received the </TABLE> tag (no matter what version of any browser - it is a limitation of the HTML tag) because the browser cannot run its algorithm until it has received all of the <TR> and <TD> tags, and it can't be sure of that until the </TABLE> linux-questions-only@ssc.comes through. I have seen many complex sites, using many images (thankfully they at least used the HEIGHT and WIDTH tags on those images to tell the browser how big the image will be so it didn't have to download it to find out) but still, putting it in a table nullifies much of the speediness that users require.
A solution I often offer the HTML designers under me is to use a <DL><DD> combination. Though this doesn't technically fit the HTML DTD (certain elements are not allowed in a <DL>) and I use an editor that will not allow illegal HTML, so I can't do it myself (without going via a backdoor - but that's bad quality in my opionion). The downside of the this is of course that you don't know what sized FONT the user has set on the browser, and the FONT size affects the indetation width of the <DD> element. But if your spiral image is not too wide, then that could be made a NULL factor. The plus to the <DL><DD> is that the page can be displayed instantly as it comes down (again..providing the developer uses the HEIGHT and WIDTH attributes on *ALL* images so that the browser doesn't have to pause it's display to get the image and work out how to lay out around the image)
Michael O'Keefe
Here's a trick I've had to use a few times.
Desperate person's text file undelete.
If you accidentally remove a text file, for example, some email, or the results of a late night programming session, all may not be lost. If the file ever made it to disk, ie it was around for more than 30 seconds, its contents may still be in the disk partition.
You can use the grep command to search the raw disk partition for the contents of file.
For example, recently, I accidentally deleted a piece of email. So I immediately ceased any activity that could modify that partition: in this case I just refrained from saving any files or doing any compiles etc. On other occasions, I've actually gone to the trouble of bring the system down to single user mode, and unmounted the filesystem.
I then used the egrep command on the disk partition: in my case the email message was in /usr/local/home/michael/, so from the output from df, I could see this was in /dev/hdb5
sputnik3:~ % df Filesystem 1024-blocks Used Available Capacity Mounted on /dev/hda3 18621 9759 7901 55% / /dev/hdb3 308852 258443 34458 88% /usr /dev/hdb5 466896 407062 35720 92% /usr/local sputnik3:~ % su Password: [michael@sputnik3 michael]# egrep -50 'ftp.+COL' /dev/hdb5 > /tmp/xNow I'm ultra careful when fooling around with disk partitions, so I paused to make sure I understood the command syntax BEFORE pressing return. In this case the email contained the word 'ftp' followed by some text followed by the word 'COL'. The message was about 20 lines long, so I used -50 to get all the lines around the phrase. In the past I've used -3000 to make sure I got all the lines of some source code. I directed the output from the egrep to a different disk partition - this prevented it from over writing the message I was looking for.
I then used strings to help me inspect the output
strings /tmp/x | lessSure enough the email was in there.
This method can't be relied on, all, or some, of the disk space may have already been re-used.
This trick is probably only useful on single user systems. On multi-users systems with high disk activity, the space you free'ed up may have already been reused. And most of use can't just rip the box out from under our users when ever we need to recover a file.
On my home system this trick has come in handy on about three occasions in the past few years - usually when I accidentally trash some of the days work. If what I'm working survives to a point where I feel I made significant progress, it get's backed up onto floppy, so I haven't needed this trick very often.
Michael
Hi !
About the topic "How to truncate /var/adm/messages", here's the way to do it with a shell script :
mv /var/adm/messages /var/adm/messages.prev touch /var/adm/messages mv /var/adm/syslog /var/adm/syslog.prev touch /var/adm/syslog kill -1 `ps x | grep syslog | grep -v grep | awk '{ print $1 }'`Happy new year !
In order to make DHCPD by ISC/Vixie to run under Linux, you should have route to host 255.255.255.255. Standard "route" from Slackware distribution does not like the string "route add -host 255.255.255.255 dev eth0". But you can add hostname to your /etc/hosts file with address 255.255.255.255, and use "route add hostname dev eth0" instead. It works.
Paul.
I'd like to congratulate Jesper Pedersen on his article on tcsh tricks. Tcsh has long been my favorite shell. But most of the features Jesper hit upon are also found in bash. Tcsh's most useful and unique features are its variable/history suffixes.
For example, if after applying a patch one wishes to undo things, by moving the *.orig files to there base names, the :r extension which means to strip the extension comes in handy. e.g.
foreach a ( *.orig ) mv $a $a:r endThe same loop for ksh looks like:
for a in *.orig; do=20 mv $a `echo $a|sed -e 's,\.orig$,,g'` doneEven better, one can use the :e extension to extract the file extension. For example, lets say we we want to do the same thing on compressed files:
foreach a ( *.orig.{gz,Z} ) mv $a $a:r:r.$a:e endThe $a:r:r is the filename without .orig.gz and .orig.Z, we tack the .gz or .Z back on with .$a:e.
Bill
I noticed a few overly difficult or unnecessary procedures recommended in the 2c tips section of Issue 12. Since there is more than one, I'm sending it to you:
#!/bin/sh # lowerit # convert all file names in the current directory to lower case # only operates on plain files--does not change the name of directories # will ask for verification before overwriting an existing file for x in `ls` do if [ ! -f $x ]; then continue fi lc=`echo $x | tr '[A-Z]' '[a-z]'` if [ $lc != $x ]; then mv -i $x $lc fi doneWow. That's a long script. I wouldn't write a script to do that; instead, I would use this command:
for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`; done;on the command line.
The contributor says he wrote the script how he did for understandability (see below).
On the next tip, this one about adding and removing users, Geoff is doing fine until that last step. Reboot? Boy, I hope he doesn't reboot every time he removes a user. All you have to do is the first two steps. What sort of processes would that user have going, anyway? An irc bot? Killing the processes with a simple
kill -9 `ps -aux |grep ^Example, username is foo|tr -s " " |cut -d " " -f2`
kill -9 `ps -aux |grep ^foo |tr -s " " |cut -d " " -f2`That taken care of, let us move to the forgotten root password.
The solution given in the Gazette is the most universal one, but not the easiest one. With both LILO and loadlin, one may provide the boot parameter "single" to boot directly into the default shell with no login or password prompt. From there, one may change or remove any passwords before typing ``init 3``to start multiuser mode. Number of reboots: 1 The other way Number of reboots: 2
That's just about it. Thanks for the great magazine and continuing contribution to the Linux community. The Gazette is a needed element for many linux users on the 'net.
Justin Dossey
Date: Wed, 4 Dec 1996 08:46:24 -0800 (PST)
Subject: Re: lowerit shell script in the LG
From: Phil Hughes, philphiphil.com
The amazing Justin Dossey wrote:
> #!/bin/sh > for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`; > done; > > may be more cryptic than ... > > but it is a lot nicer to the system (speed & memory-wise) too.Can't argue. If I had written it for what I considered a high usage situation I would have done it more like you suggested. The intent, however, was to make something that could be easily understood.
Phil Hughes
>From a newbie to another, here is a short script that eases looking for and viewing howto documents. My howto's are in /usr/doc/faq/howto/ and are gzipped. The file names are XXX-HOWTO.gz, XXX being the subject. I created the following script called "howto" in the /usr/local/sbin directory:
#!/bin/sh if [ "$1" = "" ]; then ls /usr/doc/faq/howto | less else gunzip -c /usr/doc/faq/howto/$1-HOWTO.gz | less fiWhen called without argument, it displays a directory of the available howto's. Then when entered with the first part of the file name (before the hyphen) as an argument, it unzips (keeping the original intact) then displays the document.
For instance, to view the Serial-HOWTO.gz document, enter: $ howto Serial
Keep up the good work.
Didier
I'm sure a lot of you folks out there have installed the new Xaw-XPM and like it a lot. But I've had some trouble with it. If I don't install the supplied .Xresources-file, xcalc and some other apps (ghostview is one) segfaults whenever you try to use them.
I found out that the entry which causes this, is this:
*setPixmap: /path/to/an/xpm-fileIf this entry isn't in your .Xresources, xcalc and ghostview won't work. Hope some of you out there need this.
And while you're at ghostview, remember to upgrade ghostscript to the latest version to get the new and improved fonts, they certainly look better on paper than the old versions.
Ciao!
Robin
PS: Great mag, now I'm just waiting for the arrival of my copy of LJ
Hi Guys,
I noticed the "alias for cd xterm title bar tip" from Michael Hammel in the Linux Gazette and wanted to offer a possible improvement for your .bashrc file. A similar solution might work for ksh, but you may need to substitute $HOSTNAME for \h, etc:
if [ "x$TERM" = "xxterm" ]; then PS1='\h \w-> \[\033]0;\h \w\007\]' else PS1='\h \w-> ' fiPS1 is an environment variable used in bash and ksh for storing the normal prompt. \h and \w are shorthand for hostname and working directory in bash. The \[ and \] strings enclose non-printing characters from the prompt so that command line editing will work correctly. The \O33]0; and \007 strings enclose a string which xterm will use for the title bar and icon name. Sorry, I don't remember the codes for setting these independently. (ksh users note: \033 is octal for ESC and \007 is octal for CTRL-G.) This example just changes the title bar and icon names to match the prompt before the cursor.
Any program which changes the xterm title will cause inconsistencies if you try an alias for cd instead of PS1. Consider rlogin to another machine which changes the xterm title. When you quit rlogin, there is nothing to force the xterm title back to the correct value when using the cd alias (at least not until the next cd). This is not a problem when using PS1.
You could still alias vi to change the xterm title bar, but it may not always be correct. If you use ":e filename" to edit a new file, vi will not update the xterm title. I would suggest upgrading to vim (VI iMproved). It has many nice new features in addition to displaying the current filename on the xterm title.
Hopefully this tip is a good starting point for some more experimenting. Good luck!
Lee Bradshaw, bradshaw@nlc.com
Contents: |
Date: Sat, 26 Nov 1996
Linux Security FAQ Update -- lpr Vulnerability
A vulnerability exists in the lpr program version 0.06. If installed
suid to root, the lpr program allows local users to gain access to a
super-user account.
Local users can gain root privileges. The exploits that exercise this vulnerability were made available.
lpr utility from the lpr 0.06 suffers from the buffer overrun problem. Installing lpr as a suid-to-root is needed to allow print spooling.
This LSF Update is based on the information originally posted to linux-security mailing list.
For additional information and distribution corrections:
Linux Security WWW:
http://bach.cis.temple.edu/linux/linux-security
linux-security & linux-alert mailing list archives:
ftp://linux.nrao.edu/pub/linux/security/list-archive
Durham, N.C. December 31,1996-- It was announced today that the third annual LinuxExpo Technical Conference will be held at the N.C. Biotechnology Center in Research Triangle Park, NC on April 4-5, 1997. The conference will consist of fourteen elite developers who will give technical talks on various topics all related to the development of Linux. This year the event is expected to draw 1,000 attendees who will be coming not only for the conference, but to visit the estimated 30 Linux companies and organizations that will be selling their own Linux products and giving demonstrations. The event will also include a Linux User's Group meeting, an install fair, and a job fair for all of the computer programming hopefuls. LinuxExpo '97 will be complete with refreshments and entertainment from the Class Action Jugglers.
For addtional information:
Anna Selvia, anna@linuxexpo.org
LinuxExpo '97 Technical Conference, www.linuxexpo.org
3201 Yorktown Ave. Suite 113
Durham, NC 27713
Date: Thu, 21 Nov 1996
Tired of searching sunsite or tsx-11 for some program you
heard about on irc? Well, the Linux Archive
Search (LAS) is here. It is a search engine that searches an updated database
of the files contained on sunsite.unc.edu, tsx-11.mit.edu,
ftp.funet.fi, and ftp.redhat.com. You can now quickly find out where
the files are hiding! The LAS is living at http://torgo.ml.org/las
(It may take a second to respond, its on a slow link). So give it a
whirl, who knows, you may use it a lot!
For additional information:
Jeff Trout, threshar@serve.com
The Internet Access Company, Inc.
Date: Thu, 05 Dec 1996
The very first book to appear in Holland on the Linux operating system
has gone on-line and can be found at:
http://www.cv.ruu.nl/~eric/linux/boek/
And of course from every (paper) copy sold, one dollar is sent to the
Free Software Foundation.
For additional information:
Hans Paijmans, KUB-University, Tilburg, the Netherlands
paai@kub.nl ,
http://purl.oclc.org/NET/PAAI/
Check out the new O'Reilly & Associates, Inc. Linux web site at http://www.ora.com/info/linux/
It has:
The "Unix III - Linux" show will air on the Jones Computer Network (JCN) and the Mind Extension University Channel (MEU) the week of January 20, 1997.
The scheduled times are:
It is best to call your local cable operator to find the appropriate channel.
Tom Schauer, Production Assoc. PCTV
November 20, 1996 (Bremen, Germany) - The University of Bremen announces daVinci V2.0.2, the new edition of the noted visualization tool for generating high-quality drawings of directed graphs with more than 2000 installations worldwide. Users in the commercial and educational domain have already integrated daVinci as user interface for their application programs to visualize hierarchies, dependency structures, networks, configuration diagrams, dataflows, etc. daVinci combines hierarchical graph layout with powerful interactive capabilities and an API for remote access from a connected application. In daVinci V2.0.2, a few extensions related to improving performance and usage of the previous V2.0.1 release have been made based on user feedback.
daVinci V2.0.2 is licensed free of charge for non-profit use and is immediately available Linux. The daVinci system can be downloaded with this form:
http://www.informatik.uni-bremen.de/~davinci/daVinci_get_daVinci.html
For additional information:
Michael Froehlich, daVinci Graph Visualization Project
Computer Science Department, University of Bremen, Germany
http://www.informatik.uni-bremen.de/~davinci ,
daVinci@Informatik.Uni-Bremen.DE
Date: Wed, 04 Dec 1996
Getwww is designed to download an entire HTML source tree from a
remote URL, recursively changing image and hypertext links.
From the LSM:
Primary-site: ftp.kaist.ac.kr /incoming/www 25kB getwww++-1.3.tar.gz
Alternate-site: sunsite.unc.edu /pub/Linux/system/Network/info-systems/www
25kB getwww++-1.3.tar.gz
Platform: Linux-2.0.24
Copying-policy: GPL
For additional information:
In-sung Kim, Network Tool Group,
kisskiss@soback.kornet.nm.kr
Date: Sun, 01 Dec 1996
Unifix Software GmbH is proud to announce View Designer/X, a new Motif
interface builder available for Linux. A demo version of VDX is included
on Unifix Linux 2.0.
With object oriented and interactive application development tools, the software developer is able to design applications with better quality and in shorter times.
For more information and to download the latest demo version, see:
http://www.unifix.de/products/vdx
For additional information: Unifix Software GmbH, info@unifix.de
View Designer/X, a new Motif Interface Builder for Linux has been released. It enables application developers to design user interfaces with Motif 2.0 widgets and to generate C and C++ code. The VDX provides an interactive Wysiwyg View and a Widget Tree Browser which can be used to modify the structure of the user interface. All resources are adjustable by Widget Resource Editor and by using template files the code generation of VDX is more flexible than those of other interface builders.
Bredex GmbH, Germany is distributing the View Designer/X via Web service. Please see following web page for more information and downloading the free demo version:
Dirk Laessig, dirk@unifix.de
X-Files is a graphical file management program for Unix/X-Window environment developed on Linux.
For more information and packages see:
http://pinhead.tky.hut.fi/~xf_adm/
http://www.hut.fi/~mkivinie/xfindex.html
ftp://java.inf.tu-dresden.de:/pub/unix/x-files/
For questions:
xf_adm@pinhead.tky.hut.fi
For additional information:
Mikko Kiviniemi, mkivinie@cc.hut.fi ,
jforsten@cc.hut.fi
Helsinki University of Technology