...making Linux just a little more fun!
Heather is Linux Gazette's Technical Editor and The Answer Gang's Editor Gal.
Heather is a hardware agnostic, but has spent more hours as a tech in
Windows related tech support than most people have spent with their computers.
(Got the pin, got the Jacket, got about a zillion T-shirts.) When she
discovered Linux in 1993, it wasn't long before the home systems ran Linux
regardless of what was in use at work.
By 1995 she was training others in using Linux - and in charge of all the
"strange systems" at a (then) 90 million dollar company. Moving onwards, it's
safe to say, Linux has been an excellent companion and breadwinner... She
took over the HTML editing for "The Answer Guy" in issue 28, and has been
slowly improving the preprocessing scripts she uses ever since.
Here's an autobiographical filksong she wrote called
The Programmer's Daughter.
Heather got started in computing before she quite got started learning
English. By 8 she was a happy programmer, by 15 the system administrator
for the home... Dad had finally broken down and gotten one of those personal
computers, only to find it needed regular care and feeding like any other
pet. Except it wasn't a Pet: it was one of those brands we find most
everywhere today...
Linux boots from RAMdisk,ASUS P5A-B motherboard with AMD-K6-2 300MHz cpu. Other people report assorted linux boot problems with this board and other ASUS boards.
I can boot my version of linux (Basixlinux 2, based on Slackware 7.1, or Basiclinux 3 with the SW71 kernel but libc5) from a 2-floppy lilo-boot version that uses RAMdisk, a loadlin-boot RAMdisk version, a loop version, or SW4.0 zipslack (UMSDOS). But if I try to boot BL2 or BL3 with loadlin from a hard drive installation, with the kernels compiled for them or with bare.i Slackware kernel, the boot process stops at the lines:
Linux NET4.0 for Linux 2.2 Based upon Swansea... Net4: Unix domain sockets 1.0 for Linux NET4.0
(The Basiclinux kernel gets me two lines further along to something about TCP).
I tried starting with FreeDOS, DR-DOS, and Win98 DOS (since I have three other computers that will boot linux with loadlin from Win9X DOS but not always from the others, and one that will boot loop linux from any DOS except Win9X). I do not have a hard drive version set up to boot with lilo. Is that likelier to work? I don't want to use lilo as I work in DOS more of the time.
I tried telling CMOS that there was no second drive because someone suggested that method to get linux to recognize a larger drive, but my drive is 3GB. I have DOS on a master drive and two linux partitions on the slave drive, with one linux in each, and RAMdisk and loop versions in DOS partitions.
I am able to mount the linux partitions when running from the RAMdisk or loop versions and then switch to run linux on them:
mount /dev/hdb1 /mnt chroot /mnt
This puts hdb1 on / and I can then use linux on the ext2 partition.
[Kapil] But this is essentially what most initrd-based start up procedures do anyway! So, though I haven't used BasixLinux, I would guess that the problem is with the start scripts on your ext2 partition in /etc/rcS.d or some such.
This is a minor nuisance and I suppose I could put it in an rc file, or just use the smaller version unless I needed the larger one.
I am writing out of curiosity - why are so many computers difficult to boot with linux?
[Kapil] The glass could also be half full! Given the variety of hardware that Linux runs on it is surprising that so many computers boot with it at all.![]()
Is there a better fix for this one? Is there a better fix for the other three besides installing Win98 DOS on them (and having to use a boot floppy to defragment the DOS partitions after that) or rebooting with a Win98 boot disk to go from DOS to linux?
I also have one Northgate 386 SX 20MHz 4.7MB RAM laptop which has no cursor in linux. Cirrus video, 256K video RAM, mono VGA. The cursor is plain white when used in color VGA. The computer in theory can output to a color monitor in 800x600 resolution.
[Kapil] Is this with or without X? The question is not clear enough. Are you in graphics mode or text mode?
Does laptop video treat software cursors oddly? A cursor appears when I use a text editor. There is a cursor while booting to DOS and in DOS.
Another 386 with identical speed, RAM and video won't boot linux at all - the screen goes black and I need to reboot. What might cause this problem?
[Kapil] Try booting with the additional option "vesafb=off". Some of the older hardware may not respond well to being switched to graphic mode.
Thanks for your help a couple of years ago getting my first linux set up
to work with both TTL and VGA monitors.
On behalf of The Answer Gang, you're welcome... (/me turns to our Gentle Readers) and anyone among our readership who'd like to jump in on the problem (our header does say "...and You!" after all) is welcome to send replies to you, and encouraged to Cc: tag (The Answer Gang) at linuxgazette.net. -- Heather
Python conferences in the US and EuropeMike sent this to his local Python user group, and to our Answer Gang. I think it's an interesting question, one all you pythonistas out there might be willing to express an opinion about. Reply to tag@lists.linuxgazette.net; Mike will let his pal know if we get some reasonable statistics, and juicy replies may end up in a future mailbag. -- Heather
I got an interesting call from a friend of mine, a PyCon regular who, as it turns out, lives in Sweden. There's been a discussion on the PyCon list about whether the $175 conference fee is too high, too low, or just right. That got her asking me what would it take to get more Americans to present a talk at EuroPython (in Sweden next July -- http://www.europython.org) and Python UK (in England next April -- http://www.accu.org/conference), and more Europeans to PyCon (in Washington DC next April -- http://pycon.org). I thought I'd throw the question out to y'all for ideas. Not everyone here is interested in Python, but the same thing applies to Linux and other free software projects.
She said that she could guess why why not many American presenters would go to Europe, but she wanted to ask somebody on this side of the pond in case there were factors she wasn't aware of. I said the main problem for Americans (besides the expense) is that most people only get two weeks' vacation per year, so they have to use the time selectively. She asked why that was, since in Sweden the minimum is six weeks and most people get nine. I said I don't know, it's just a longstanding tradition. She asked why people don't demand more. I said people are much more concerned about health care, and more vacation time is lower in their priorities.
She said that for her, the main problem with coming to American
conferences is the expense. That seems to be outside our control since
the conference fee is minimal already, and we can't do anything about
airfares or accommodation fees. 'Course the falling dollar will help.
As far as I can tell, the most important thing is just to keep these conferences going, so that even if people can't attend next year, maybe they can do the year after, or maybe some overseas people will go to one and others to the next.
Another thing that's happening in the Python world is different kinds of events are emerging. These three are traditional conferences with speakers. In Seattle we've had a couple sprints (=weekend hacking sessions) without speakers, and I gather those are happening in Europe too. So maybe the answer is not just more opportunities for speakers, but more types of events.
Any other ideas?
Re: your comment suggested an article ideaEdgar Howell is one of our article authors, see http://linuxgazette.net/authors/howell.html for his bio. -- Heather
As you noticed, the use of a wildcard in a command like mount really blew me away. The remark you added to my article compounded it. find, great. less, OK... mount?!
[Ben] [grin] Yeah, pretty amazing. It gets much more amazing when you install and enable "bash_completion"; all the... well, stuff that has multiple options becomes available at the prompt. E.g., typing "ssh " (note the space) and hitting 'Tab' twice shows me a list of all the hosts in my ~/.ssh/known_hosts; typing "mount " and hitting 'Tab' three times (since all the entries start with '/', which is displayed immediately) gives me a list of all the directories listed in "/etc/fstab"... obviously, completion happens when you have a unique string: I've been doing "ssh li<Tab><Enter>" for a session at linuxgazette.net for so long that I'd be lost without it.![]()
If you count the couple of years I had used Coherent prior to graduating to SuSE Linux, I've probably been at *nix for 10 years or so. In other words off the steep part of the learning curve, but, boy, is there ever enough curve left!
[Ben] That's the lovely thing about Unix, to me. You keep gaining these chunks of power every time you learn something - and the chunks don't get any smaller with time. It can be a little tough on the ego for the folks who think that way... but to me, it's a fantastic opportunity to squeeze any amount of juice that I may need out of a system. It's not a question of "is it possible" any longer, but "where do I find the HOWTO?" instead.
Anyhoo, I would like to encourage you to do an article on obscure uses of wildcards on the command line.
[Ben] Um. Well... the problem is in defining "obscure". To me, they're not; they're just how shells operate. To someone else, they may well be obscure. Say... maybe looking at it in broader terms would be useful - an article, or even a series on CLI usage in general might be pretty good!
I'm sorta swamped for the moment - and actually "owe" about three articles to myself- but that one sounds like a really good idea.
Like ignoring the consequences of SuSE's apparent elimination of the need for mount -- there are still questions in my mind but, then, I bounce back and forth between root and any of several users a lot and may have messed things up -- what would "mount *" do?
[Ben] It would give you an error.![]()
Try to mount every /dev? Cycle through /etc/fstab? root can mount stuff not in /etc/fstab. Permissions. Users. Mind-boggling.
[Ben] Essentially, you've answered your own question: "mount *" would just be too ambiguous. E.g., "ssh " or "ssh ben@" is not at all ambiguous: the host name is what has to come after either one of them, and it makes sense that hitting the completion key (Tab) would "complete" them or show the possible options. I assume you know that 'Tab' works to complete program names at the CLI, right? Filenames, too - "vi ~/.bash_p<Tab>" pulls up my "~/.bash_profile" every time.
Keep up the good work
[Ben] Thanks, Edgar! Heck, you might want to write the article yourself: read the Bash man page, and take a look at the "/etc/bash_completion" script. That should give you a good start.
LG #109 - LaundretteI had just settled in of a Saturday evening with a wee dram of Irish whiskey, a good Henry Clay cigar and Linux Gazette #109. I had worked my way to "Return of the Linux Laundrette" and reached the section "Re: [LG 87] help wanted #4". This piece caused me to drop my cigar (due to uncontrollable grinning, giggling and guffawing), setting my sweatpants on fire.
http://linuxgazette.net/109/lg_laundrette3.html#nottag2/14 for the
terminally lazy
I'm fine, thanks - I extinguished the blaze by spilling my libation in my lap - followed, of course, by the water chaser. Be advised that I will be taking legal advice re: financial recovery for the loss of the whiskey...
Well, Ben and I have our own sideline business (http://linuxgazette.net/107/misc/laundrette/lg_hitsquad.html), so I can say with some confidence that it won't come to that, though some recovery may occur at some later date.
I don't know how you people manage to produce such an outstanding combination of useful Linux information, non sequiturs and a, ah, rather <veering> approach to humor (my kind!) - but I certainly hope you keep doing it for a long time to come.
Well, I'll be compiling it for a while to come: it's a lot of fun to go back over the offtopic threads every month, especially since there are so many of them --
Dec 01 08:44:05 <editorgal> lucky sucker, the recent gang must be a treasure trove for laundrette bits. Dec 01 08:45:29 <jimregan> I felt kind of duty bound to take over the laundrette... cos most of the time all I do is perpetuate those threads [though I should have said 'perpetrate' :) ] Dec 01 08:45:39 <editorgal> lol
Sincerely,
Mark W. Tomlinson
Thanks for writing,
Jimmy
Math bug in Advanced Features of netfilter/iptables articleHi Rich, all,
Advanced Features of netfilter/iptables by Barry O'Donovan [November
2004 (#10
] was a very informative article.
Thanks! It's always good to hear positive feedback.
But my "math flag" flew from my pocket when I saw his example for using the random module.
So did mine on reading the published article. I had actually planned to point it out with an Octave example demonstrating the difference between the right and wrong answer in this months article, but when it came to writing it I discarded the example as it didn't fit with my layout and completely forgot to add it as erratum.
If there is one thing I have learnt about statistics (and I've learnt quite a lot between my degree which was top heavy on stats and my research where I use the damn stuff every day) is that if the answer is simple, then it's just plain wrong!
If you wish to divide the packets evenly among the four servers then the example should look like this:
|
............... -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m random --average 25 \ -j DNAT --to-destination 192.168.0.5:80 -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m random --average 33 \ -j DNAT --to-destination 192.168.0.6:80 -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m random --average 50 \ -j DNAT --to-destination 192.168.0.7:80 -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -j DNAT --to-destination 192.168.0.8:80 ............... |
The reason is that, after 25% of the packets are NATed by the first rule, only 75% of them will be seen by the second rule. A third of them would equal 25% of the total. Likewise, the third rule will see only half of the total and half of that is 25% of the total.
Correct. A subtle and simple mistake that might cause many a sys-admin a prolonged headache!
When speaking of mistakes and statistics, I'm always reminded of a few quotes:
|
............... "There are two kinds of statistics: the kind you look up and the kind you make up." "I gather, young man, that you wish to be a Member of Parliament. The first lesson that you must learn is, when I call for statistics about the rate of infant mortality, what I want is proof that fewer babies died when I was Prime Minister than when anyone else was Prime Minister. That is a political statistic." "You know how dumb the average guy is? Well, by definition, half of them are even dumber than that." "Statistics in the hands of an engineer are like a lamppost to a drunk-they're used more for support than illumination." "Numbers are like people; torture them enough and they'll tell you anything." "There are three kinds of lies: lies, damn lies, and statistics." "A statistician is a man who comes to the rescue of figures that cannot lie for themselves." "First get your facts; then you can distort them at your leisure." ............... |
Ahhhh.... statistics. So easy to love and hate all at once!
Cheers, Barry
P.S. Thanks also to John Macdonald and one of our French translators, Emmanuel Araman, who also pointed this out to me.
Re: Linux Gazette: checking inI hadn't sent this to TAG - it was a semi-private query - but, for general info, I was checking in with all our Indian correspondents:
I sent the message out last night; so far, the first five people have responded. My best hopes and wishes go out to the rest, and to all.
[Breen] Thanks for that, Ben. Please let us know as you hear from more of our Indian friends.
I surely will, Breen. So far, we've got Vinayak's name to the five who had responded previously; Sayamindu Dasgupta's address bounced, but I found a phone number for him at http://peacefulaction.org which he listed in his author profile. He's OK; seems he's in Kolkata (West Bengal), and everything is all right there.
Folks, please keep them on your good wishes list or in your prayers, as appropriate. It may be a small thing in the face of something this huge, but... it's something. As Pramode said, "there are still human beings alive who can feel the sorrow in another person's eyes - that's the only consolation."
[Ben] Are you all OK? I'd appreciate a response if you get a chance. I'd imagine that many others here are just as concerned; I think that a lot of people may just be... too stunned by the magnitude of this to come up with a coherent response, and unsure of their own degree of connection to you all. Me, I figure that we're all human beings - and that no man is an island.
My heart goes out to you and all your countrymen in this difficult, terrible time.
[Kapil] Thanks for checking. Yes. It is truly a devastating event here. Relief agencies are doing what they can but every bit counts.I'm going to be letting people around here (northern Florida) know that they can contribute to the Red Cross/Crescent India, and am going to send a contribution myself. [sigh] Sunil mentioned that there's now another warning out.
[Kapil] The strange aspect of the tragedy is that people in Chennai who were more than about 500 metres from the coast were almost unaware that anything had happened. Since we live somewhat inland we were quite unaffected.[Nod] Tsunamis are like that. They're slow and quiet, definitely so at first; the traditional way to commit suicide during one is to follow the ocean as it recedes from the shore.
Folks - everyone - imprint this in your brain forever: if you ever see the ocean receding, RUN like hell for the high ground. You at least stand a chance of surviving, then.
[Kapil] P.S. There is no word for "tsunami" in any of the local languages which perhaps gives an idea of how unexpected the event was.[Vinayak Hegde] You can add me to the list.![]()
With great pleasure! I just went through our list of authors, and emailed everyone that was in India; you're just not listed as an author, so no contact info came up. Glad to hear you're OK, too!
[Vinayak Hegde] Thanks. Actually I am listed as a author. http://linuxgazette.net/authors/vinayak.html
[blink] Then I simply missed you. Ooops.
[Vinayak Hegde] I live far away from the coast (in Bangalore). We did mobilise help and have donated a lot of clothes/medicines for relief work. Though we are safe in center of the Indian peninsula, we were shocked by the images that were shown on television and splashed on the front pages of the newspapers. I also read that 5 endangered tribes living in the Andaman and Nicobar islands were wiped out forever and a few islands were washed away (literally).[sigh] Damn. The only thing I'd ever heard about Andaman islanders was the fanciful stuff from Conan Doyle... and now, they're gone. Forever.
Contention from various quarters notwithstanding, this world is not particularly friendly to man. I realize that it does no good to rail against the weather, but... blood and hell, man! This is just appalling.
[Vinayak Hegde] Yeah. It's good to know that I am not the only Sherlock Holmes Fan on this List The Andamani Pymgy had a major role to play in "The Sign of Four". Who could forget the thrilling story??![]()
- Link to the "Times of India" article here:
- http://www.freerepublic.com/focus/f-news/1309884/posts
Oh, indeed. And what a picture he draws! Reminded me quite a lot of Jack London's "South Sea Tales", or perhaps "Adventure", and his descriptions of the Salomon islanders.
Any news about the latest warning that Sunil mentioned?
[Raj Shekar] Thanks a lot for writing. I am in Delhi, which was quite far from where the tsunami stuck. I will be making a donation to the Prime minister's fund and also write in to the local LUG to see if we can do more than just sitting. One of the members of the mailing list is working with the people who have been hit and has written down the things they need:
https://ssl.cpsr.org/pipermail/india-gii/2004-December/009559.html
- Children's clothes in decent form
- Medicines - Paracetamol, ORS packets, Doxycycline, Dettol, bandages
- Blankets - a few thousands
- Gloves & masks to help volunteers clear the debris & dead bodies.
- Money - to buy essentials, water pots (which will be bought closer to the areas)
Editor's note: Paracetomol is known as Acetominophen in the US, and might be under that name in other countries. -- HeatherI hope I will be able to find some (honest) agency who will be willing to take donations of medicine and blankets.Thanks again for caring[Jimmy] Wikipedia have an international list: http://en.wikipedia.org/wiki/Donations_for_victims_of_the_2004_Indian_Ocean_earthquake[Hiran Ramankutty] I am absolutely fine. By god's grace I am not near the vicinity of the Tsunami. But hearing about the disaster itself gives enough sight of what would have happened.Pray for all Tsunami victims.[Krishnakumar R] I am fine. I had come home (Kerala in southern India) for a 10-day holiday. But as my native place is far from coastal area, I was not affected.I can also vouch for Pramode. C . E , that he is safe, as I had met him in person day-before-yesterday.Ben, I really appreciate the concern and the kindness you extend to all of us. Thank you very much.It is during the dark times like this that we understand how precious our lives are; which we usually take for granted. Lets all extend our help in whatever way we can, to the victims of this tragedy.[Ashwin N] I am fine. I stay in Bangalore which is very far from the coast.This truly has turned into a catastrophe of immense proportion. Entire fishing communities have been washed away in some places![]()
Rajith is OK; by extension, Maxin B. John (whom I missed due to the name...) must be OK as well - they co-authored an article last month, so I figure they're in close touch.
[Rajith R] Thanks for checking in. I am ok and I live in Trivandrum. Even tough it is near sea here there were no problems.
As of press time there our very few of our Indian authors and TAG members who have not checked in - Raghu J Menon, and Krishna G Pai. Raghu lives in Kerala, and somehow it seems like everyone knows Pramode (hey Pramode, check in on 'em will ya? Thanks buddy). If you have news of our friends, please let us know.
May this New Year be better than our last, and whatever troubles we suffer draw us closer rather than tear us apart. With love to you all -- Heather
Firewall| 13:04 <@darksatanic> | I usually use it for debugging firewalls. |
| 13:04 <@darksatanic> | watch -n1 iptables -nvL \| sed -ne /^Chain INPUT/,/^$/p |
| 13:05 <@darksatanic> | There's a 2¢ tip for you... |
| 13:07 <@darksatanic> | The sed bit prints out just the chain you want. |
| 13:08 <@darksatanic> | My rules for the firewall are just a tad too big to fit on the screen, |
| 13:09 <@darksatanic> | so I use that (and things like it) to show only the chains I want. |
Cygwin from a CD[Jimmy] This is a follow-up to http://linuxgazette.net/109/lg_tips.html#tips.2
Whoops. Having just looked back over the .reg file, I see that I have the path for X's fonts entered differently to the rest of the file: this /is not/ the reason why X doesn't work from a CD.
Saw this on Slashdot today: XliveCD (http://xlivecd.indiana.edu) is a CD image that autoruns an X session when put into a Windows machine (it's based on Cygwin).
Tip of the Day: regular expressionsForwarding to you a good tip by Robert Whitinger. If you ever run dry and need fresh tips for upcoming LGs let me know - we've got a ton of these fun ones.
[Ben] Thanks, Dave - we're always looking for 2-cent tips like these! I believe Heather has mentioned this in the Mailbag recently.
(And please keep up the great work!)
[Ben] [grin] Much appreciated; we'll do our best. Keep on reading, and let your friends know about us; the more folks read (and write for) us, the better we get.
best, dave
|
............... I don't know about you, but I've spent a lot of time learning all the intricacies of the preg_... pcre functions. But whenever I go to the shell environment, the rules are different and so are the results. Today, I found `pcregrep` and it behaves exactly like the perl compatible regular expression from php and perl since it does in fact use the same engine. Now I have only one regex syntax to know in detail, and my regexs work the same everywhere. Now, I can say things like:
............... |
Adding custom headers in Thunderbird[Jimmy] This is a follow-up to a 2c Tip in LG #109: http://linuxgazette.net/109/lg_tips.html#tips.1
I stumbled across your article on mozilla/thunderbird headers (I'm only an irregular reader)
I had a look an the "mheny" extension, because I like the idea of
customising the viewed headers, but I found that it CAN also control
the headers used at composition time. Not sure if you "summarized this
out" of your article, or didn't find it to start with
Within the option dialog for mheny extension, select custom headers from the tree on the left, then pick composition from the drop list on the right, and you can select existing fields or add/remove custom fields, which then show up when you compose a message.
However (and I think this means it still doesn't fit your need) you can't add a default value for a field.
[Brian] And that's the bingo value: I did try mnenhy, but what I really want is a constant X-blah header containing a specific value every time I send an email via Mozilla Thunderbird.
Still a useful find, thanks ...
[Brian] But you got farther than I did, thanks for the heads up, I'll work some more with mnenhy when I get a chance. Of course, that I just spelled the name of the extension right twice only shows that I had to look it up twice, inside of a minute or two.
[Jimmy] I came across this: http://www.picklematrix.net/archives/000969.html it turns out it /is/ possible to add values to headers in Mozilla
add something like this to your prefs.js (not user.js):
user_pref("mail.identity.id2.headers", "tag");
user_pref("mail.identity.id2.header.tag", "X-gazette-tag: Jimmy");
(id1 is the 'local folders' identity)
Counting bracesi am learning from your website "Linux Gazette" by which i am finding it easy to learn unix.
but i am having problems compiling and debugging the following program ... can you please help me out with its solution.
using UNIX filters and awk to write a shell script to filter out comment statements in a C program
a shell script to count the number of parentheses and braces in a C program
a shell script to recognize function calls in a C program
a shell script to generate code to do profiling of a C program (to insert counters to the C program)
using filter or just grep, sed and awk)
hoping for some guidence sincerely Amod Damle (ILLINOIS INSTITUTE OF TECHNOLOGY-CHICAGO)
[Sluggo] The first thing you should see is the TAG Posting Guidelines http://linuxgazette.net/tag/ask-the-gang.html in the FAQ section. There you'll see we don't do people's homework for them. How do we know it's homework? You don't want to do a useful task: who cares how many braces a C program has? You choose the tools first and then the strategy, and you insist on using kludgey tools. If I really wanted to count braces, I would write a Python program.
#!/usr/bin/env python
"""count-braces.py
Usage: count-braces.py <filename
Print the number of {}() characters in the input file.
"""
import re, sys
braceRx = re.compile( R"[{}()]" )
text = sys.stdin.read()
hits = braceRx.findall(text)
print len(hits)
[Ben] Jeez. Pythoneers. Always making things more complicated.![]()
perl -0wne'print y/{()}//' file.c
JPEG to PSReaders who wish to convert JPEG to Postscript for inclusion in a TeX/LaTeX document (or for any other reason) may want to use:
convert file.jpg eps2:file.eps ^
Note the 2! This is better than the default "convert file.jpg file.eps" and performs the same function as "jpeg2ps" (which is in Debian non-free).
Explanation: The default postscript level for PS conversion is 1 which produces large and bad conversions since it produces pixelised bitmaps. In PS Level 2 and Level 3 the conversion of JPEG is inbuilt so the above procedure just adds a bit of postscript header stuff to the unchanged jpeg file. In other words this conversion is lossless.
You can also use "eps3" as the tag but beware that may be reasonably new postscript printers that are not level 3 compliant. (Ghostscript is level 3 compliant).
Setting the Clock on Linux[Jimmy] This is a follow-up to http://linuxgazette.net/109/lg_mail.html#mailbag.1
The following script is my interface to netdate. I modified the script found at website listed in the script. You have to be root to set the system and hardware clocks, yet you can query the time servers as a regular user.
Walt Reinemer
See attached netdate.sh.txt
SMTP-time despammingJust saw this at Freshmeat; sounds really sweet, particularly the per-user configuration capability. Hopefully, the world is heading this way...
|
............... Mail Avenger 0.5.1 by xxx - Sun, Nov 21st 2004 02:48 PDT About: Mail Avenger is a highly-configurable, MTA-independent SMTP server. It allows you to reject spam during mail transactions, before spooling messages in your local mail queue. You can specify site-wide default policies for filtering mail, but individual users can also craft their own policies by creating avenger scripts in their home directories. It includes many features not supported by other SMTP servers, including mail-bomb protection, integration with kernel firewalls, TCP SYN fingerprint and network route recording, SMTP-level analysis of client implementations, SMTP callbacks to verify sender addresses, per-user mail scripts that run during SMTP transactions, virtual domain to user mapping for the purposes of filtering, SPF (sender policy framework), dynamic SPF query construction in mail filter scripts, support for easily issuing multiple concurrent, asynchronous DNS and SPF queries from filter scripts, and the ability to run spam filters such as spamassassin on message bodies before replying to SMTP DATA commands. Changes: A critical memory handling bug was fixed in the avenger.local and deliver utilities. ............... |
starting X automatically without [gkx]dmAs past discussions in TAG have shown, I'm definitely not a fan of the various display managers; I believe that they take away, or obscure, too much of the control that a user has over X. However, starting X automatically from your ~/.bash_profile doesn't seem like a very smart move either: any time you get a login shell (e.g., logging into another console), you'd be firing off a new instance of X - or at least trying to, since it would die with a list of error messages.
The answer to this dilemma is a conditional start for X - in other words, we only want to execute it if it's not already running, i.e. only on the first login. To do this, just add the following line to the end of your ~/.bash_profile:
ps ax|grep -q "[ ]`which X`" || startx
For those who just have to know ([grin] I certainly would, if I were you): the above expression pipes the list of running processes, which is the output of the "ps" command, to 'grep', which searches it for the presence of a running X. To make the search more precise, the command substitution (`which X`) returns the full pathname to X as the search string. The character class preceding the search string ([ ]) is there to make 'grep' ignore its own entry in process table (an old 'grep' trick), and the "-q" option of 'grep' makes it return only a success/failure exit code instead of the actual matched string. The OR operator, '||', ties it all together into an expression that says "either X is running OR (execute) startx".
whois.schi,
i was told to email this address about a useful website:
http://www.whois.sc
I use this whois website a lot because of the information it gives. If you sign up you can see all the domains that a server has.
thanks,
Jared Belkus
Just in case you're a sysadmin thinking, geez, just how many sites am I running on this machine again... did I miss any during that upgrade... -- Heather
|
...making Linux just a little more fun! |
The Answer Gang
![]() By Jim Dennis, Karl-Heinz Herrmann, Breen, Chris, and... (meet the Gang) ... the Editors of Linux Gazette... and You! |
We have guidelines for asking and answering questions. Linux questions only, please.
We make no guarantees about answers, but you can be anonymous on request.
See also: The Answer Gang's
Knowledge Base
and the LG
Search Engine
Greetings from Heather Stern
HTML page selectorFrom Sluggo
Here's a nifty HTML device for previous/next/goto page links similar to MS Access's record selector.
I had to use the "display:inline" style on the form to keep it from jumping to the next line. I also used that for the <DIV> to keep the gray background from spreading the entire screen width.
Attachments: snapshot3.png, pageLinks.html, pageLinks.css
BTW, the 'iv' program is a great fast-starting image viewer.
See attached pageLinks.html
See attached pageLinks.css
[Ben] _Nice!_ I'll be playing with that gadget. Thanks, Mike! As to "iv", well...
ben@Fenrir:~$ su -c 'apt-get install iv' Password: Reading Package Lists... Done Building Dependency Tree... Done Package iv is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: ida E: Package iv has no installation candidate
In the spirit of exchange: if you want really nice pull-down (or pull-out) menus and don't mind JavaScript, take a look at Tigra Menu (http://www.softcomplex.com). A really nice, free implementation that works fine with every browser I've tested (which even the best CSS-based menus I could write - or find - don't.)
It looks like that's a different program. The 'iv' I found was in
Gentoo and its homepage is http://wolfpack.twu.net/IV
The Debian 'ida' program is from http://linux.bytesex.org/fbida
(http://packages.debian.org and the copyright file didn't list the home page, so I googled "ida graphics software" and found a listing at http://www.freebsdsoftware.org/ports.php?c=graphics&n=ida that links to the above page with the correct domain name and author's name (Greg Knorr). But the Debian package says the original is the Debian source, so maybe he's a Debian developer. Or maybe Debian no longer lists the external home page in the copyright file?
AMD64 ShuttleFrom Mike Orr
Answered By: William Park, Jimmy O'Regan, Huw Lynes
Searching for alternatives to my 450 MHz Master of Slowness. I could get a motherboard+chip for my empty case. Or I could get what I'm currently drooling over, a Shuttle. There's an Athlon 64 jobbie for $359 (SN85G4):
[Huw] Downsides to the shuttle (I have a P4 one myself):
you pay a premium for the form factor and they can have heat problems.
they are noisier than you would expect. it's built on the nforce3 chipset.
The ad seems to say it includes the CPU, although I'm surprised it
doesn't say the speed.
This compared to the $150-200 I'd spend on a regular motherboard and
CPU. Which seems the better deal? Gentoo has an Am64 version. Does
the 64 bit make enough difference to justify the $60 over a regular
Athlon?
[William] Unless you need 4GB+ memory, then you probably don't need 64-bit. Since you're asking such question, you definitely don't need it. :-)
I would advise against Shuttle. They have heat problem, and their power supply is not the quality stuff.
[Huw] x86_64 is a better design than the old x86. Hypertransport makes enough of a differerence that an x86_64 system is pound for pound faster than a P4 system. But it really shines when you throw a lot of RAM at it. Being able to seamlessly address more than 2GB of memory is a very good thing. Of course with your budget that's just academic. If you still want one for the cool factor (which is justification enough IMHO) then get a motherboard based on one of the via chipsets not the nForce3. I'm basing this on what a dog the nForce2 was so it may not be entirely fair, plus I have a cheap via based Athlon64 at work that installed Fedora Core 1 (x86_64) out of the box with no fuss. This was decidedly different behaviour from some of the weird Opteron chipsets I've had to deal with.
What would be the most politically correct video card for this puppy?
Meaning, which manufacturers are doing a good job of making their
specs open? Matrox G400 has been my reliable standby, but I had
good luck with an nVIDIA chip recently, and my current computer has an
ATI 3D Rage IIC.
[William] Use what you have.
[Huw] Sadly there are no politically correct graphics cards. Capitalist running-dogs like myself prefer nVidia. Mainly because their engineers are helpful.
<mind control> Buy the Athlon64, you don't need it, but you want it. </mind control>
[Jimmy] Aw, you're not even trying. "Buy the Athlon64 now for the coolness, or invest in it for the ability to seamlessly address more than 2GB of memory" -- offer a choice that isn't, because the brain only listens to the 'or'. Standard sales trick.
[Huw] The 2GB limit is a major pain though. A certain badly written renderer which we shall not name has a favourite trick whereby it runs full speed at the 2GB per process limit and then dies in a small shower of zombied process. When the 64bit version comes out it'll have to find a new trick.
My main concerns are --
1) Speed
[Huw] x86_64 is definately faster than straight x86 but I'm not sure it's worth the price difference given that you are not going to be doing anything to take advantage of it's extra features. Personally I'd buy a P4 and spend the difference on a DVD-RW.
2) Noise
[Huw] The shuttles are not silent. The new PSU's are much quieter than the old ones. I know this because I was sufficiently irritated with the old one to upgrade. They are quieter than a standard off the shelf PC though.
3) Size
I don't anticipate having more than 640 MB of memory, so the 2 GB doesn't apply. I thought Shuttle had solved the heat problem in their later designs; if that's not the case, that's another strike against it.
[Huw] The shuttle and its ilk are definite winners here.
Depends what's in the case. I have a P4, 512MB RAM, 120-GB PATA drive, CD-RW/DVD and a Fanless nVidia 5200. I haven't had any heat issues but I'm not sure I'd want to fill the spare PCI slot or put in a second hard drive. If you want to pack a lot of kit in then you are probably better off looking at more generic case designs.
Any gentle readers out there willing to give comparative heat and noise and raw high end power notes on the obviously smaller mini-itx form factor, write to The Answer Gang! -- Heather
/dev/ubFrom
Answered By Frodo
A few days ago, I changed to kernel 2.6.9 on one of my machines and suddenly none of the sd devices were made for my usb harddisks. Turned out, 2.6.9 now uses the /dev/ub/ structure instead... took me a while to figure that one out... lol
Low Performance USB Block driver (BLK_DEV_UB)
It does not seem to be enabled by default... guess I accidentally enabled it, but it actually does seem to work a bit better with some of my devices, when using USB 2.0 instead of USB 1.1
(some external harddisks seem to not be happy with the way Linux used to handle USB 2.0)
[Heather] ooh so it isn't merely cosmetic. ok.
am trying to find out, what exactly happened
what I do know, is that the "old" way did a usb to scsi thingie...
config BLK_DEV_UB tristate "Low Performance USB Block driver" depends on USB help This driver supports certain USB attached storage devices such as flash keys. If unsure, say N.
might just make it a lil warning:
"If you happen to enable BLK_DEV_UB, your USB attached storage devices will
no longer be known as /dev/sdxn (where x is a letter and n a number), but as
/dev/ub/x/partn."
From: http://hulllug.principalhosting.net/archive/index.php/t-48985.html
> You're using the UB driver. Does it work if you turn that off and use the > usb-storage driver instead? Damn, you are right - this is a new driver... I didn't notice that, i did rely on hotplug to load the correct modules. Removed the ub driver and everything is fine now. That means - just unloadin ub and loading usb-storage didn't work. I had to remove it from the kernel config and rebuild the modules. Actually usb-storage was the only module being rebuilt. Looks like usb-storage's functionality is different if ub is built."
btw, about the linux-usb.org link... I know that page... but there seem to
be quite a few external hard disks (WD, for instance) and cases for hard
disks, that do not work too well with linux' usb2.0 driver afterall...
quite probably the fault of those devices... but it stinks anyway :)
[Heather] having to rebuild usb-storage? aw man, that does suck. can you keep both forms of it around or does it subtly affect other things too? (not to be tested with usb data you care about mind..)
nah, it seems to replace part of the usb stuff...
(well - usb-storage)
the rest seems unaffected
[Heather] A bit of binary diff on the other usb modules might be in order :/
Now I know where the device files are, I have no problem with it... it "just
works" G
LG in developing countriesFrom Sluggo
Answered By: Ben Okopnik, Ramon van Alteren, Offer Kaye, Brian Bilbrey, Kapil Hari Paranjape
Dear readers, your editors have been discussing the changing PC/Internet environment since LG's early days, and we're wondering what's the minimum level of hardware and bandwidth now in the remoter parts of Africa, Latin America, and Asia? Are Pentium/K6 computers above 300 MHz universal now? Are people still downloading the FTP files because they can't afford the hour online to read LG interactively on the web? Or is that no longer an issue? If we started allowing articles to have more supplemental files, more images, more tarball examples, would that cause an undue burden to any readers or does it not matter?
[Kapil] There seem to be two separate questions --
1. How hard is it to maintain a mirror of LG if the bandwidth/hardware requirement is upped?
Speaking only from my experience this should not be a problem in India providing that only "biggish" sites like ours try to maintain a mirror.
2. How hard will it be to read LG if the bandwidth/hardware requirement is upped?
As long as there is a low-bandwidth low-hardware version of LG that is available, you can always up the requirement for a high-end version.
So what is low-bandwidth?
A. Speaking only for India. Most places still have only a dial-up phone link. This link takes them to an ISP who will probably give them a share of 64K-512K link to one of the hubs in the bigger cities which are then linked quite well to the rest of the internet and each other (the hubs that is).
And what is low-hardware?
B. In a recent meeting to disburse funds to Indian universities for the purchase of computers, I heard that some of these place still have 486's. However, with the recent drop in prices of entry level Pentium class machines (to approximately half the earlier price) this should change in a year or so. At the same time working hardware has a way of trickling down over here so it is not impossible to find even a 386 in some places.
However, the use of GNU/Linux in India at this level is still very low. Since (whether we like it or not) LG is only read by people with some familiarity with *nix, the above data may not be entirely relevant.
For years we got letters every few months asking for an e-mail or print
version of LG. That was unfeasable for us to provide, so we steered
people toward the FTP version, TWDT, and TWDT.txt instead. The mirrors
complained whenever we regenerated the FTP files or made bulk updates to
back issues, because of the bandwidth it cost them. One student wrote
from a school in Africa, saying they all read LG from a shared copy
downloaded at the school, but the school couldn't afford the online time
to read it interactively on the web. Others said they paid by the
minute or megabyte for their Internet connection, and each megabyte was
a significant choice.
Yet now we hear that Pentium-level computers are widely available in the poorer parts of Latin America, many governments are switching to Linux, and community wireless networks are sprouting up in villages in India and Africa. It's been over a year since we've gotten a bandwidth complaint from a reader or a mirror. Does that mean this is no longer an issue? Or that those readers now have more local resources for Linux information/help and no longer rely solely on LG? Or that we lost those readers/mirrors during the move from SSC and they never found our new address? Unfortunately, the the nature of this problem means that those who are the least connected are the ones least able to write in and tell us about it, so we need to hear from others from those countries and regions who can tell us what the situation is.
On Wed, Dec 08, 2004 at 11:35:51AM -0800, Mike Orr wrote:
Dear readers, your editors have been discussing the changing PC/Internet
environment since LG's early days, and we're wondering what's the
minimum level of hardware and bandwidth now in the remoter parts of
Africa, Latin America, and Asia?
[Ben] (A shovel and a pitchfork for minimum hardware and a wheelbarrow for bandwidth - but note that even these are not available in all areas. :) The term "minumum level" contains assumptions that render the answers to this question less than useful.)
How? The question about whether most people have a 300 MHz Pentium or
better was an attempt to see whether most readers have a computer
capable of running a modern graphical browser and KDE comfortably.
[Ben] "Minimum", in this venue, always starts at zero. Asking what the "minumum" hardware is will have people responding with their stories of woe about building TCP/IP stacks with hay and mud, and being too poor to get quality mud. Phrasing the question as you have predetermines the field of answers, since people who do not consider their hardware as "minimum" will not respond, and so you'll get the answers that only reinforce the point you're trying to make as opposed to the true state of the situation - a perfect example of the "statistics" that Barry was talking about just a few days ago.
[Offer Kaye] "Running KDE comfortably" on a 300 MHz Pentium?! You must be joking... Have you tried opening a recent version of KDE? It's a hog - both memory and CPU. I have an 1800+ AthlonXP with 512MB of RAM, and even so KDE is sloooow to start up and apps take a while to open, including Firefox (a browser considered both modern and "light").
Yes but you have to draw a line somewhere. KDE 3.2 is reasonable but not
snappy on my 450 MHz Duron, but KDE 3.3 on the same machine is so slow it
makes Windows look fast by comparision. It may not be KDE's fault: the
first is on Debian and the second on Gentoo, and the system startup/shutdown
on the Gentoo side is much slower too. I just bought a 2600 AthlonXP
chip (decided to wait a year or two on the Shuttle), so we'll see how
much that helps.
BTW, I got a Foxconn micro ATX motherboard to go with it. Hadn't heard of that brand before, but it had a VIA chipset and Award BIOS so I figured it was more standard than the mobo next to it with an nVIDIA chipset. I paid $6 more for less, haha: two memory slots instead of three, three PCI slots instead of five or six. But I thought back to when have I ever used more than three PCI cards simultaneously, and the answer was "never". Presumably the nVIDIA chipset would have been compatible enough since it wasn't nVIDIA video, but I figured why take chances and did I want my money going to a company that offers binary-only drivers? The salesman reassured me that a micro ATX mobo would fit into a regular ATX case; we'll see.
It's interesting how the prices of chips and motherboards have reversed. My standard rule has been to buy whatever combination is currently selling for $150. In the past that's meant a $50 chip and $70 motherboard. But this time it's a $99 chip and a $55 motherboard. They did have $50 chips but they were AMD Seperon. I haven't heard of those before. They came out a couple months ago as a replacement line for the Duron. Gentoo doesn't mention them as a supported platform although I assume they're compatible.
Tom's Hardware says the Sempron is replacing both the Duron and the 32-bit Athlon. http://www.tomshardware.com/cpu/20040728/index.html
[Brian] BTW, I've got one of the top end Sempron's, a 3100+, running on an Asus K8N mobo (nForce3 chipset). The motherboard itself is bloody amazing. Socket for the processor. Heatsink over the single (or composite? can't tell) chipset. A few small (8-12 pin) smc glue logic chips, batches of electrolytic caps, sm resistors, and lots of connectors. But overall, the impression is of a barren field... picture here:
http://www.orbdesigns.com/bpages/2004/images/100_0265.JPG
The 3100+ Sempron is a 64-bit A64 with 32 bits lopped off, and half the L2 cache, sort of the modern day equivalent of the 386SX, I guess.
The other components in the system are a 160G Seagate Barracuda 7200.7 HD, an old 4x DVD+RW burner, and 512M of RAM.
Still, the board/processor combination is fast, supported well by the 2.6.9 kernel. The ethernet is on the chipset, and runs with the forcedeth driver, which is making some good strides now that nVidia decided that since a reverse-engineered driver was available in spite of their non-assistance, they might as well help make it better. Audio is acceptable as AC97/i810 equivalent. I'm running an ATI 9200 Video card, and the whole thing is wrapped up in an Antec Sonata case.
I've thrown Debian Sarge, Xandros, Fedora Core 3, and a couple of *BSD variants at it, all have run. OpenBSD has no driver for the ethernet ported yet. Everything else just worked, and it's the fastest "cheap" system I have.
It's not as robust as the 2.5 year old dual Athlon box, but true SMP just keeps trucking when a single processor box starts wheezing.
So, I'd count this report as a positive recommendation for the nForce3/Sempron combination on recent (2.6 kernel based) distros.
The Sempron is just the Athlon renamed, which explains why there's only a $5 difference between the same-speed chips. Seems AMD's marketers were getting nervous about the brand-name dilution effect of having their luxury chip (the AMD 64) and their proletarian chip (the Athlon) both called "Athlon", afraid that consumers wouldn't notice the difference and would, ahem, fail to appreciate the advantages of the higher-end chips. (Although "higher-end" is open to debate, since the price of the 64-bit chips is pretty close to their same-speed 32-bit counterparts.)
AMD also seems to be preparing to ditch Socket A by designing a Sempron that will fit in their AMD 64 motherboard (socket 754), as well as versions for future Intel socket designs.
So, given that 64-bit doesn't mean squat on machines with less than 4 GB memory, what happens in 2038 when the UNIX clock rolls over? Will we all have to switch to 64-bit anyway or else?
I'm putting this all in my huge case from two years ago, the one whose mobo was apparently water-damaged in my fire. Maybe I can get the neon tubes in front to light up this time. I looked through my old receipts to figure out what speed chip was in there without prying off the heatsink. Cyrix/66, AMD Duron/150.... Was it really that slow? The mobo manual said it could take a chip up to 1800. At the time I thought, "That's three times faster than I'll ever need...."
I put the "300" on in case somebody should come up with a Pentium/70 or something. The bandwidth question should be obvious. If I've put in unhelpful assumptions without realizing it, please tell me what they are so the questions can be improved.
[Ben] In my opinion, there's no way to get an accurate picture of what the situation really is unless you travel to India, Africa, South America (however you choose to define it), etc., and spend a few months traipsing a wide area and taking a census - and even that data would be of limited use since it's a constantly-changing variable.
So, in short, my problem with the way the question is phrased is that the answers to it *can't* give any new insight. They can, however, be used to stack the cards. I'm not accusing you of doing this, but I am saying that this form of the question is not useful.
However - dear readers, please feel free to let us know what challenges, if any, you've encountered in your LG-reading experience. Our purpose is to deliver the greatest amount of high-quality content to you, and to "make Linux a little more fun"; this implies and requires access to that content. We can't buy you all new computers and high-speed network access - I just rattled the change in my pocket, and had to admit to myself, bitter as it may be, that it just wasn't enough - but if there's something we can do to improve access to LG, we'd love to hear your ideas.
Through the magic of email plus my own desire to make LG serve as many people as possible, this editor's door is always open. Come on in.
[Jimmy] But beware the curmudgeons! And please be aware that an opinion given with the utmost brutal honesty is the /start/ of the discussion, not the end. Don't make me quote the 'Haggle' scene again.
[Ramon] I've just returned from Uganda for a Development project on Linux and Open Source software in general. Apart from giving a course on Linux system administration I helped setup a local mirror with open source software and more importantly documentation. Among the documentation was the Linux Documentation Project (LDP) including The Linux Gazette.
Due to poor bandwidth offerings in Uganda we've resorted to updating this mirror using a portable harddisk that gets filled in Europe and sent through diplomatic snailmail to Uganda on a quarterly basis.
I don't think hardware is that much an issue. In Uganda the issue definitly is bandwidth. I work for a foundation that partners with a rural university, bandwidth there is 64k down / 16k upload for the entire university which has to be shared with 400+ students and 50+ staff.
Internet slows down to a crawl during the daytime........ (500B/s or less)
Common offerings from local ISP's are 16Kbit links for $50/month, if you're living in the capital, otherwise you're out-of-luck or dependant on local NGO's with internet access / cyber cafes.
Unlike India, telephonelines are non-existant. Nearly everyone has a mobile phone, normal phone lines are only present in some government buildings, large companies and possibly NGO's. The quality of the phonelines is horrible.
Although I'm not entirely sure, I think that the entire country has something in the order of a 4-6Mbit link to the rest of the internet.
At an ICT-conference I visited somebody quoted a $8000 figure for a 1Mbit internet link to me.....
We (eacoss) currently operate the only local open source mirror in Uganda and we're unable to update it through the internet. We would not be affected that much by this change because of the update-method for our mirror however other people in the eastern african region might.
That said, the other point that kapil raised, also holds true for Uganda and Eastern Africa in general. Linux/Opensource software is not (yet) widely used. The EACOSS foundation (www.eacoss.org) is trying to promote that, however reality is that most people are using windows.
This is changing (rather fast) however with M$ and other big companies starting to enforce copyright protection schemes, and licence costs generally way beyond a local year income.
There is a desperate need for more knowledge on Linux/Open source and more advanced knowledge on networking, software developement, etc in general, so the gazette could definitly fill a gap.
[Ben] Thank you, Ramon: it's always good to get info from people in the field. The most interesting part for me was that my own estimate of how things were in that part of the world was very close to what you've reported.
As to the "sneaker-net" method of information transport into Uganda, it reminds me of the old joke: "never underestimate the bandwidth of a station wagon full of magtapes." It may be slow, but it's still valid.
Linux-friendly hardwareFrom Sluggo
Answered By: Jimmy O'Regan, John Karns, Thomas Adam, Karl-Heinz Herrmann, Ben Okopnik
Is there a FAQ somewhere of hardware manufacturers' track records regarding open specs and cooperating with free software?
I.e., the Tux-friendly seal of approval. Not for things that are just passively compatible with Linux, but for manufacturers who take steps to cooperate.
I can see a possible logo, although it's not quite the right message:
[picture of Tux, with a gun hanging on the side. "Cooperate, or the penguin gets it"]
If not, it would be good to have one in LG, as a way to reward good manufacturers and punish bad ones. I'll write it up if people can send me facts and links. Off the top of my head...
CPU, MOTHERBOARD, HARD DRIVE:
(not much to say; I think they're as open as we can expect)
BIOS:
(what issues here? flashable under Linux? is the open BIOS project still active?)
LinuxBIOS (http://www.linuxbios.org) seems to be under relatively active development. Their status page (http://www.linuxbios.org/status/index.html) is pretty impressive.
(LinuxBIOS is a port of Linux that runs in place of a BIOS. It's mainly used in clusters, and boasts a record boot time of 3 seconds). -- Jimmy
VIDEO:
I think Matrox has been cooperative. nVIDIA has their notorious binary drivers.
[Heather] ATI has been somewhat cooperative, in that they allow information out after their boards are old enough. This is decent but I've encountered their proprietary driver not supporting an old enough board while the X11 community still hadn't gotten the open source support filled in, reducing one to raw VESA support. Wah. Temporary problem, timing just sucked is all.
PRINTERS:
I think Epson has been cooperative, but many Canon printers are Windows only. Lexmark had their offensive DMCA clause for toner cartridges.
[Thomas]
> PRINTERS -- Lexmark had their ^^^^^^^^ ^^^^^^^
Nah... I just don't see how those two are related. :P
[Karl-Heinz] Well -- I like my Optra E312. speeks PCL and Postscript. The latter better then some monster-printers of varying manufacurers I've seen in offices.
CD/DVD:
could be more open but that's more of a legal issue and pressure from Hollywood than of manufacturers stonewalling.
MODEM:
winmodems bad. Is there a software-only modem for Linux? My friends with Macs like to gloat about their software modems, although the counterargument was why distract your main CPU when you can have a dedicated chip doing the work.
[Jimmy] There is support for an IBM softmodem in the kernel, and there was a project to get some Lucent modems working, though that pretty much fell by the wayside. There is a software modem available, though it only goes as far as 28.8 (the author shifted focus to other nifty things like tcc, qemu, and ffmpeg).
[John] The lucent modem / Linux situation seems to parallel that of the nVidia graphics cards, in that proprietary binary modules link to the kernel using the same or similar methods. Although hardware UART modems will undoubtedly remain preferrable for Linux users, I've always had pretty good luck with the Lucent modems. As winmodems go, they're probably one of the easier varieties to deal with. Not to say that they won't be a pain when you find yourself dealing with a combination of kernel and libgcc for which they haven't issued an update, but for me, that's happened only once in the 8 yrs or so that I've been dealing with them.
[Jimmy] No, there actually is some open source software that accesses Lucent modems from user-space. It doesn't work as a modem, but the author just wanted to be able to use it as a phone. Someone else tried to couple that work with the software modem I mentioned, but I don't know if it works at all.
There hasn't really been any work done in this area for years though.
Sigh I'll hunt through my jungle of bookmarks
LinModem: http://fabrice.bellard.free.fr/linmodem.html (last updated in 1999)
[Heather] The reason that hasn't been notable work on a true softmodem for Linux is because right around the time it was getting some progress, the genius who was making the progress, Tony Fisher, died of cancer -- a terrible loss apparently for linguistics fans as well. See http://linmodems.org and search downward for "generic modem". The university had great respect for him and still maintains the software link, so what he had is downloadable at: http://www-users.cs.york.ac.uk/~fisher/modem
|
............... What's done:
............... |
LTModem: http://www.close.u-net.com/ltmodem.html (Last modified: Sat Sep 30 22:40:31 BST 2000)
|
............... The current functionality (0.9.9) is: Finds a Lucent PCI winmodem and reports information on this. Goes offhook and detects the dial tone. Dials using pulses or dtmf. Here in the UK the dtmf dialling works, you can hear the call being answered. Try "ltmodem -d 011223344" (replace 011223344 with the number of your favourite ISP) and listen to the modem at the other end answering the call! Detects the answer tone of the phone at the other end, or busy tone if it is engaged. Picks up incomming calls. Command line mode allows control of modem interactively or via a script file. Includes fixes for Pavel's voice stuff, just need some more detailed instructions on how to use it! This includes turning you computer into an expensive telephone and full duplex voice transmission. Reads ROM check sum and does basic I/O for DSP RAM. Monitors/Sets either data in the PCI registers or at the I/O ports, monitoring at configured intervals. ............... |
Pavel Machek (the Pavel mentioned earlier) is also one of the primary authors of Gnokii.
SOUND, ETHERNET, ETC: ?
[Ben] Just saw something related to Mike's earlier question about hardware compatibility:
Being realistic about Linux hardware compatibility By: Robin 'Roblimo' Miller
http://www.newsforge.com/article.pl?sid=04/11/29/1559244&from=rss
installing a pcmcia-network card in Suse 9.0From Santeri.Ketola
Answered By: Ben Okopnik
Hi!
I installed last summer Suse Linux 9.0 with KDE to my laptop(thinkpad 600e, 233mzh pentium 2). I haven't used a linux before, and it seems to work fine except some points that might be more complicated in laptops than in normal pc's.
[Ben] I think that's true for pretty much any OS - the hardware in laptops, other than perhaps memory and hard drives, is nearly all proprietary (i.e., you can't run out to your local computer store and buy an, e.g., video card for your Toshiba or Dell), and this has obvious results.
In my apartment house they use the already existing phone-cable to access
internet, therefore i needed to buy a pcmcia card(smc 8041tx v.2) and a
HomePNA converter(A-Link HomePNA) to gain access to the internet.
[Ben] This card is supported under pcmcia-cs, at least according to http://pcmcia-cs.sourceforge.net/ftp/SUPPORTED.CARDS . The easiest thing to do would have been to install the package from ftp://ftp.suse.com ... unfortunately, you went a different route. The next easiest thing, in my opinion, would be to reverse what you've done, then install the package.
Keeping on with trying to install from source is not something I would recommend for you, particularly because this is a standard package; what you'll have, if you do manage to succeed, is a system in which the PCMCIA package is a) not recognized by the packaging system, and is b) not upgradeable - except through more source-based installation - as a result. In other words, you'll be creating a permanent headache for yourself.
I began installing it with these instructions:
|
............... SMC Networks, Inc.
SMC 10/100 PC Card (SMC8041 V.2)
Linux Driver Installation
Installation Guide:
1. Please download the pcmcia package (3.1.29 or higher vision)
from the follow url:
ftp://www.sunsite.unc.edu/pub/Linux/kernel/pcmcia
2. Install the package:
Copy the pcmcia packagefile into /usr/src/linux/
and uncompress it:
tar zxvf pcmcia-cs-3.1.29.tar.gz
3. Config the pcmcia package
Change the directory into pcmcia
cd pcmcia-cs-3.1.29
then config and install it
make config
make install
4. Edit the /etc/pcmcia/config
Add following to the config file
device "SMC 80412"
class "network" module "pcnet_cs"
and add the following configuration:
card "SMC 80412"
version "SMC" , "8041TX-10/100-PC-Card-V2", "", ""
bind "pcnet_cs"
5. Restart the pcmcia service
/etc/rc.d/init.d/pcmcia restart
Then the SMC 10/100 PC Card (SMC8041 V.2) adapter will start to work.
............... |
As i reached the third point, this happened:
[Ben] The problem you're having, incidentally, is not a complex one:
dhcppc23:~ # /usr/src/linux/pcmcia-cs-3.1.3/Configure make
Ack! The PCMCIA distribution is incomplete/damaged!
Unpack again -- and try using a Linux filesystem this time.
Configuration failed.
dhcppc23:~ #
[Ben] The tarball you have may have been damaged, or you may need more software. The easy way to tell is usually my examining the log file produced by "make"... but, again, note that this is all theoretical for the moment: the right thing to do is reverse what you've done so far and install the actual "pcmcia-cs" package.
I have tried the command "make config" but nothing happens. And as the error
message tells, i tried unpacking the package several times, but the message
repeats. As i completed the instruction points 4 and 5, the light turned on
in the pcmcia card, but there is still no connection.
My questions are; firstly, how to configure the card properly and secondly, how to tell the firewall to mind the pcmcia card, or does the firewall detect all interaction from my computer and the rest of the world?
[Ben] I've addressed the first question already; as to firewalls, they work with interfaces, not hardware. In other words, a firewall doesn't really care what kind of hardware you have - what it needs to know about is rules for, e.g. "eth0".
I know that these
questions might seems somewhat simple or just plain stupid,
[Ben] Not at all. You've done a fine job of describing what you need, the environment in which you're working, and the problem you're having. Answering your question was easy and pleasant as a result.
but this system
is totally new for me, and it seems fun and full of possibilities, but the
internet access is vital for me. As in your instructions you advised to be
funny, but hopefully this email provides you at least some giggles about us
rookies;)
[Ben] Hey, it's all about making Linux a little more fun.
That's why we're here!
I managed to get the internet working properly for two days... and the only
inconvenience was getting the suse installation cd from my dad per post. Your
instructions we're precise and helpful. I reversed the driver kit i had begun
installing, got the right kit from ftp.suse.com, and yast installed it all
for me. The only thing that i needed to do was to reboot (i thought this was
only necessary in wondows giggles)..and lights went on!
[Ben] [chuckle] You didn't really need to reboot - there's almost never a need to do that in Linux, unless you've recompiled the kernel or something - but there are times when it may be easier to do that than all the "modprobe" invocations with mysterious module names.
I even istalled Opera right away, went like a dream, and shockwave as
well..and my laptop purrs like kitten. i only hope i wont overheat it too
much because i've been so much online;) Next project is installing gimp 2 but
that's only a minor glitch..it's fun learning and now it's so much easier
thanks to you and the internet!
Thank you once again for your swift and precise instructions.
[Ben] Excellent! It's a pleasure to help, particularly some like yourself who takes the time to let us know the results. Glad we could be of service!
hi howtoopen .tgz or all zipFrom ronen
Answered By: Suramya Tomar, Ben Okopnik
hi
howtoopen .tgz or all zip you now
thanks
ronen
[Suramya] tar -zxf filename.tgz
or
unzip filename.zip
Next time try to be a bit more clearer in your request. It would make it easier for us to answer your question.
[Ben] [ top-posting reversed so that time won't flow backwards. Suramya, please don't provide bad examples for our readers.
]
Interestingly enough, earlier today Jimmy pointed me to a couple of sites in Hebrew that looked like translations of some LG articles - and beziqint.net is an ISP in Israel. Coincidence? Maybe...
guides.co.il and linmagazine.co.il -- Jimmy
In general, our foreign correspondents do a fine job of asking good questions; ronen, obviously, has missed on that count (I originally received his email at our "tag-kb" address, which is used for contacting the KnowledgeBase maintainer.) However, since his question is of broad interest to new Linux users, we'll let him off with a term in a chroot(1) jail and a careful reading of "Asking Questions of The Answer Gang" at http://linuxgazette.net/tag/ask-the-gang.html for future reference - and I'll see if we can make this into a useful exchange. (I'm feeling particularly pedantic today; as a net.friend once said, "it gets me chicks.")
So, to ask the question that ronen (theoretically) was trying to ask:
|
............... Hi there, Answer Gang! I'd like to know how to open .tgz and .zip files under Linux. The standard documents are confusing, searching the Internet gives me too many results, and I don't know where else to look. I'd appreciate your help. ............... |
Why, hi there, ronen! Nice of you to ask in such a clear, understandable, and polite manner and give me a chance to pontificate on the topic!
There are a number of ways to deal with compressed files in Linux. One that's probably easiest for the new user is to use Midnight Commander's "VFS" (Virtual File System) feature - you simply place the highlight on the name of the compressed file you want and press the 'Enter' key. This will let you look inside the file and copy out anything you want. The default VFS setup handles bzip, bzip2, gzip, compress, ar, zip, jar, xpi, zoo, lha, and arj compressed formats (assuming that you have the appropriate decompression software installed.) You can run Midnight Commander by typing "mc" at the command line, either in the console or in an xterm window if you're running X.
If you want to do it manually, typing the name of the appropriate decompressor (possibly followed by options) and the name of the file to decompress at the command line should do it - but beware of "file scatter", i.e., what happens when the person who created the file did not use a directory structure to contain all the files. These will now be scattered all over the directory into which you've decompressed them - usually the current one. In general, it's a Good Idea to list the files before decompressing the archive - or look into the file with Midnight Commander, as mentioned above - just so you know what to expect.
Some examples of listing syntax for various decompressors:
# Gzipped tar file tar tzf file.tgz # tar file compressed with bzip2 tar tjf file.tar.bz2 # zipfile unzip -l file.zip # ARJ file unarj l file.arj
Typing the name of the decompression program followed by '-h' or '--help', just as is suggested at the very top of "Asking Questions of The Answer Gang" at (http://linuxgazette.net/tag/ask-the-gang.html), will show you the option list for that program.
You can also use one of several GUI decompression tools, such as "guitar" (cute name, eh?) which act somewhat similar to WinZip in Windows; you may find that environment to be more familiar and comfortable. Do realize, however, that you'll be missing out on a lot of the capabilities available at the command line; GUIs are cute, but the CLI is powerful.
Perl, WWW::Mechanize, and Mailman administrationFrom Ben Okopnik
Answered By: Jimmy O'Regan
...or, "The Evolution of a script".
This started as a complaint about Mailman's administration interface. Over the course of 5 days in November, Ben and I bashed out a script to automate the deletion of mail that was held up by Mailman (spam, in other words), and Ben taught me some Perl along the way. -- Jimmy
Yeah, I dislike the damned thing as well. I wonder if Monsieur O'Regan would be willing to cruft up a screen-scraper that would automate the procedure?
[Jimmy] Sure -- I was looking for something I could set WWW::Mechanize on anyway. Does anyone have a sample setup I can be let loose on, because Mandrake seem to have done a wonderful job of fucking up everything related to email.
Awesome! Thanks, Jimmy; that damn thing is a regular pain. I wish
there was a way to tell Mailman to just delete every single one of them,
but I've never found a way to do so. This way, I can maybe cron it up
and forget about it.
See the attached file for a sample. The only things that need to happen are
a) The "Action to take" needs to be switched to "Discard", and b) "Submit all data" needs to be triggered.
It's actually something I need to learn about at some point, so I'll be very interested in what you code up.
[Jimmy] Give this script a whirl:
See attached www-mech-1.pl.txt
I changed the action of the page to submit to a simple PHP script
See attached simple-dump.php.txt
All it does is check that a username and password have been passed, and if so, regurgitate everything the script sent. It seems to work, based on the HTML in that sample. If it doesn't work, uncomment the two 'print' statments and send me the results.
[Jimmy] Mailman's auth mechanism uses cookies, starting from http://linuxgazette.net/mailman/admindb/tag
See attached www-mech-2.pl.txt
#print $mech->response();
This is probably not what you want - you'll just get a hashref as a result. However, just in case it is, for some reason, I'm sending the output along (but I'll be tweaking the script so that it does produce something useful from the above.)
[Jimmy] I forgot to remove that from the original, when I thought I was using basic authentication; it prints a hashref, but it also prints the HTTP status code. Not something to rely on, but it worked well enough to let me see where I was going wrong (I was forgetting to prepend 'Basic ' to the base64 encoded user/pass pair).
What it looks like is that the script is pulling down the content, but
then it's not doing anything with it.
[Jimmy] After that form is submitted, is there any sort of 'Are you sure?' step?
Nope. It just shows you a result page that essentially says "there
aren't any new messages".
I only had a few minutes this morning, but - the stuff in the "if" clause never happens. I put in a print statement above it and inside it, and the one above prints stuff like
See attached annoyed-senderaction.log.txt
just fine, but nothing from the inside (which would have been prefixed with '--->'.)
Don't know why; the regex is right...
[Jimmy] maybe try changing it to /(senderaction-[^">]*)/ -- it can't hurt.
Ah - that got inside:
See attached inside-senderaction.log.txt
However, it still fails to delete the buggers.
I suspect that the
normal submission process sends something more than just the radio
button values to the CGI, whereas you skip everything else:
next unless $token->return_attr('type') =~ /radio/i;
At least in my limited perception; I don't know the module at all.
Around here, Ben wondered what the PHP script was for -- Jimmy
Err... sorry, I've lost the context. What is this page, where does it
go, and what do I need to do with it?
[Jimmy] Sorry, forgot myself. That was there to make sure the script was sending the right values: '3' for reject.
Oh. I don't have PHP - no way to test that; however, you've seen the
output from Data::Dumper by now, and that gives you everything.
[Jimmy] Well, you said already that it's not getting inside the if statement, which is strange. If it was that there was a missing value that needed to be submitted to the form, that'd be one thing, but as it is, only the default stuff is getting submitted.
Hang on... the first submit works, but that doesn't use {name => adminpw, value => "}, it's {adminpw => "}; so maybe I should have the array made up of {$regex_match => 3}. I'm not so hot with using anything other than scalars, so you may need to fix the syntax inside the if statement.
See attached www-mech-3.pl.txt
[Jimmy] OK, try again:
See attached www-mech-4.pl.txt
|
............... # This may need sytax correction
$name->{"$1"} = 3;
............... |
Looks OK, although quoting is deprecated unless you need interpolation. However, it still doesn't work; see the appended output (again, from Data::Dumper.)
Looking at it, specifically the data that's sent back, I see what looks like a problem (I've added some newlines to clarify the view):
|
............... $VAR12 = bless( {
'_content' => '
senderaction-%2522pearl%2Bdeleon%2522%2540genetikayos.com=0
&senderforwardto-%2522pearl%2Bdeleon%2522%2540genetikayos.com=tag-owner%40linuxgazette.net
&senderfilter-%2522pearl%2Bdeleon%2522%2540genetikayos.com=3
&senderaction-abcd21ruby%2540hotmail.com=0
&senderforwardto-abcd21ruby%2540hotmail.com=tag-owner%40linuxgazette.net
&senderfilter-abcd21ruby%2540hotmail.com=3
[snip]
............... |
Seems like '3' is somehow getting assigned to the wrong bit; it should be on the "senderaction" statements, but is ending up on the "senderfilter".
[Jimmy] I think I have it this time...
See attached www-mech-5.pl.txt
Well... still doesn't work. Time for me to stop being lazy, then, and
actually look it up myself. :)
|
............... while (my $token = $p->get_tag('input'))
{
next unless $token->return_attr('type') =~ /radio/i;
if ($token->return_attr('name') =~ /(senderaction-[^">]*)/)
{
$name->{$1} = 3;
}
}
# Eek! is this \%name or %name?
$mech->submit_form(form_number => 1, fields => \%name);
............... |
Neither; you've never defined a %name hash. What you've got is a reference named $name pointing to an anonymous hash. "fields" does indeed expect a hashref, though. So,
$name->{$1} = 3;
should be simply
$name{$1} = 3;
and %name should be declared in a "my" somewhere; "fields" should point to "\%name".
Ahhh... now it works. Very cool!
[Jimmy] Yeah, I knew there was something I wasn't getting there; thanks for the explanation. I think I still have a mark on my forehead from when I realised I was trying to send an array where a hash was expected.
So, just so I'm sure, is the final version this?
See attached www-mech-6.pl.txt
I've added a little processing to make sure that an empty page doesn't
cause any errors, and a little noise so it'll tell me that it's doing
its job.
See attached www-mech-7.pl.txt
[Jimmy] Reminds me of something I read once -- something like "a program is complete when there's nothing left to take away, not when there's nothing left to add".
Yep, the Rodin school of programming. I'm certainly an adherent.
[Jimmy] I'll just chalk it up to the perils of cut 'n' paste programming.
No worries; that's one of the ways to learn. If you're not making
mistakes, you're not learning - right? I have to keep repeating that to
myself, especially since I'm teaching my first full yoga class today. :)
Seems to work fine without TokeParser.
See attached admreqrm.pl.txt