...making Linux just a little more fun!
Hi Jimmy
this sounds like something you would know the answer to.
Short answer, no. I'm cc:ing the Answer Gang -- someone might have done something similarly insane once
Running Apache and AOLServer Together
I want to do the following
Run two web sites off one server using two different http daemons
1 Apache listening on port 80
2 AOLServer listening on port 8080
The apache server will be accessed by using url http://s1.com
The AOLServer will be accessed by using url http://s2.com
The Names s1.com and s2.com are pointing at the same IP Address.
If apache gets a request for www.s1.com it deals with it.
If apache gets a request for www.s2.com it says not for me and
Reads its proxy entry, which tells it go to AOLServer on port 8080
The Proxy stuff is working on apache.
Problem apache won't do this for me (I not sure if this scenario is even
possible)
My entry in the apache conf file is as follows.
ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /s1.com http://s1.com:80/ ProxyPass /s2.com http://s2.com:8080/
Why such a ridiculous set-up (Very long story)
I know about apache Virtual Hosting option but can't use it in this
situation.
Can anyone help?
http://forums.openhosting.com/viewtopic.php?t=105
It has been posted to the following forum http://www.openacs.org/forums/message-view?message%5fid=361728 http://forums.openhosting.com/viewtopic.php?t=105
Martin O'Sullivan web: http://martinri.freeshell.org E-mail martin_osullivan@vodafone.ie
[Heather] Encountering anything that you find is such a cool Thing To Have (if you're a linux sort) that you just wish you had three of it for your birthday? Actually, hearing that somebody not only got some new at-the-fringe-of-linuxing thing like this, and how they got to using it, could indeed Make Linux Just A Little More Fun - check out our Author's FAQ and then send article ideas to articles@ where our articles team can take a look.
In the "not (yet) Linux" category: this is the cool gadget of the year - tablet computing on paper. I see some very, very interesting possibilities in the future for this thing if it gets into the mainstream.
http://www.mobilityguru.com/2005/12/19/pentop_computing_is_more_than_a_kids http://www.flypentop.com
* Ben Okopnik
[Heather] From the awwwwwwwwwwwwwwwwwwwwww department:
"This project provides 'executables' that enable you to make your own soft-toy Linux penguin. To put it straight: You can find sewing patterns and a community to sew your own soft toy or stuffed Linux Tux penguin here."
Saw this here: http://www.tenslashsix.com/?p=102 -- scroll down to the picture of the gadget sitting beside a beer bottle -- another USB powered mini-server.
It's a Blackdog (http://www.projectblackdog.com), and uses the Linux-USB Gadget stuff (http://www.linux-usb.org/gadget) to do Ethernet over USB and USB Mass Storage. It also comes with XMing (http://freedesktop.org/wiki/Xming) so you can use X from Windows.
[Heather] Anybody wanna try putting a USB gadget-computer inside of Tux and then using one of those odd pens as a real data entry tool to take good bits back to your penguin? Glory awaits!
Hi Everyone,
Found the following during my one of my aimless wandering sessions on the web and thought that it was interesting enough to share with you all.
http://www.pool.ntp.org: Public ntp time server for everyone
Quote from Site:
............... The pool.ntp.org project is a big virtual cluster of timeservers striving to provide reliable easy to use NTP service for millions of clients without putting a strain on the big popular timeservers. ............... |
I would have shared my ntp server if I was running one and since one of the requirements is that your IP has to be a static IP I can't use my home system to run one and share it (Its IP hasn't changed in a while but its not static ). But if any of you nice people feel like sharing then please feel free to join the cluster. I think its a worthwhile project.
Well this is all for now. Hope you found this useful.
Thanks,
Suramya
Hi, I have been trying to figure out exactly what the 'cwin' option to the tput command really means.
What I'm hoping that it will let me do is to create another window in the current terminal using a section of the screen to output listings from different commands that will be executed from numbered menu options. And if the output is several screens then it can be presented a few lines at a time to the user with the option to page down through the many screens of output while not disturbing the menu options at the top of the screen nor the status bars at the bottom of the screen.
If you could provide an example of how to use the 'cwin' option and 'wingo' option to the tput command I would be so happy. And I would appreciate it very much. I've read all of the documentation that I have been able to find and either the documentation for these two options doesn't exist or nobody uses these two options.
Any help that you can provide with this will be greatly appreciated.
Here is an example of how the screen would look if I could do what I wanted to do.
Please make your selection: 1. List all VxVM Volumes 2. List all VxVM Disk Groups 3. List all VxVM Disks 4. Quit Output of command selection # 2 ****************************************************************************** * datadg * * syslogsdg * * inventorydg1 * * inventorydg2 * * inventorydg3 * * [ Press the space bar to page down ] * ****************************************************************************** Current Time: 3:19 AM Hostname: server1 F1 DiskSuite F2 VxVM F3 Exit
[Heather] Your kindly editor suspects the borders of this screen have been mangled by our mailreaders, nonetheless ... it's genuinely interesting stuff. I recall that a long while back the text form of YaST (SuSE's installer and admin tool) used tput, but I don't know if this is still the case.
If anyone would like to tackle an article demystifying tput - or even modern curses programming, for that matter - drop us a line!
Thank you.
Sincerely,
Stale Ruffles
Greetings,
Once again a couple of readers have responded with very useful comments, well worth making available to other readers.
1. CUPS Password
A reader who didn't want public mention let me know that the following command takes care of my problem with the CUPS password:
lppasswd -a root -g sys
He suggests entering root's password, when asked.
2. Installation Software on External Media
And Dennis Kibbe of the Phoenix Linux Users Group pointed out that for an additional $10 Dell will in fact provide the WinXP Installation CD.
To be honest I don't know whether that isn't an option on this side of the pond or I just didn't know about it. Windows awareness is not one of my strengths.
Ignoring philosophical and ethical considerations, that certainly is a far more pragmatic approach and I almost certainly would have coughed up the $10.
3. Installation Software, part 2
Recently a colleague gave me an article dealing with the problem of installation media and the suggestion in it might be of interest to anyone in a similar situation, although how long this might remain valid is anyone's guess. Note that this addresses the operating system only, not any other software the manufacturer of the hardware might have included.
Basically the premise is that all that is needed is the branch "i386" from either some partition on the hard drive or a "recovery CD". Inside this directory is a DOS executable, "WINNT.EXE", that installs the operating system from the other contents of that directory.
Aparently there are complications in the boot process such that one needs a particular boot program, available on the CDs with earlier versions, which I of course don't have, so no way to make a bootable installation medium.
It was also mentioned that this directory should be over 420 MB in size and contain close to 6000 files. What I found was almost 800 MB and that clearly wouldn't fit on a CD. So I tar'd it together and pushed it over the network onto another machine.
There I blew away everything under '98 that didn't look like DOS, changed into the directory "i386" and then started the installer, WINNT.EXE. This produced a DOS-style screen with the heading "Windows XP Setup" and a question about the installation directory, which I left as it was. Another screen or two later it complained about not finding 593 MB of free disk space and broke off the installation. But that was really all I wanted to see -- I have no use for this software anywhere else.
I don't wish on anyone the headache of trying to teach Windows some manners. But should co-existence become necessary for you, I hope this information might be of help for however long that situation may last. And best wishes for a quick recovery.
*** DISCLAIMER ***
This procedure may be illegal where you live!
Here, in Germany, many years ago the courts decided that there is no inherent relation between software and hardware and that one can sell a used software license as legitimately as used hardware. This requires, of course, retaining no copies of the software.
From this it seems reasonably to follow that one may move any software from any hardware to any other, as long as at no time the number of valid licenses is exceeded. But prudent data processing practice dictates at least one back-up copy of all data and software. However, since over-riding copy-protection and encryption is a violation of the law here, it almost certainly is illegal to do this with software so protected.
I'm not a lawyer. You need to know the rules on your own turf.
ech
for the text, your pages d/l quick! most "help sites" sugar too much..
i found: issue76/tag/9.html ;p sigkill 13 & the 'local' runs only in a func.. i remember reading that man, earlier
..hmm latenight bragging time!
[Heather] Some not linuxy things, snipped.
moreover.. http://linuxgazette.net/issue60/issue60.html#tag/10 is down.. ..i had a question bout gpm & blocks of solid color invading my screen..!!! well, i ctrl-key it, but it makes.. hulk smash.. :sigh:
:Turns the channel:
i think ill go grab some flashgames or something.. later!
chris
[Heather] Thanks Chris, for taking a moment to write! Have fun gaming!
http://linux.slashdot.org/linux/06/01/06/1539235.shtml?tid=198&tid=106
"From the some-of-this-content-may-be-inappropriate-for-young-readers dept."
Yes, "Benchmarking Linux Filesystems Part II" got us back onto Slashdot, to a page almost entirely filled with comments bitching about how the benchmarks were done. (But, it wouldn't be Slashdot...)
[Ben] Hi, Jan-Benedict!
I'm going to CC this to the author and The Answer Gang
Hi!
I've read that article (http://linuxgazette.net/122/sreejith.html) and I wonder who reviewed that one.
[Ben] Well, David S. Richardson and I both proofed it for grammatical and stylistic errors, but unfortunately, I don't think we have anyone on the proofing team who can do good technical review for C: my own C-relevant experience, for example, was back in the days of _DOS._ Want to volunteer?
Uhm, yes, I think so.
[Heather] Hooray!
[Ben] Great! I'll contact you off-list, then.
The wiring diagrams and timing diagrams for a stepper motor are indeed correct and helpful, but the module's source code isn't, for numerous reasons. Even the minimalistic module is plain wrong--nowadays.
Let's look at the source:
* "#define MODULE"
You realized that this is 2.2.x material? We're at 2.6.x right now!
[Ben] I note that he did specify that this was for a 2.4.24 kernel. That's why, when I tried to compile the code and it failed (I'm at 2.6.13.3, myself), I let it go.
* "#include <asm/uaccess.h>"
We're driving a 8255, that's not rocket science. There's absolutely no need to write just another driver for a normal PC parport: there is one already. To be exact, there's a complete framework to drive anything that has a DB-25 parport connector outside at the box, irrelevant by what kind of chip this is driven (thing SGI machines, Amigas, PowerPC, ...). This module would only work on a PeeCee, nothing else.
* static int pattern[2][8][8]
...isn't even initialized fully. Also, some macros could probably help making all the numbers readable...
* MOD_INC_USE_COUNT / MOD_DEC_USE_COUNT Again, this is 2.2.x material and should be dead since long ago.
* Port access to the 8255
This module doesn't register its I/O space, so it could fuck up a already loaded parport driver.
* Last but not least: it doesn't even work! ...because it doesn't actually access the hardware at all!
[Heather] As noted later, it does work for Sreejith, for a limited case, which alas, you readers probably don't have.
If this had been published some 6 years ago, it would probably fall under the "this is a quick'n'dirty hack" rule, but today, I guess something like that shouldn't be published at all, because it aims towards quite a wrong direction. Not to imagine that anybody might think this is good programming style...
Well... if you can show a better way to do this, I'm sure that our readers would appreciate it - and we'd be glad to publish it as a followup to the article. Otherwise, I don't know that there's anything we can do to improve the situation.
Regards,
* Ben Okopnik *
[jra] Publish his response, and put a tag pointing to it on the original article?
[thomas] Well, yes. This is something we've always done.
[Ben] Yeah, but that's not a fix - just a problem description. I'm trying for both. Ya know: LG, all about reader participation...
[jra] True. But even a total failure can always serve as a bad example.
I've got some code around to access the ppdev API. With this, the module isn't needed at all and thus the resulting application only consists of simple and portable userland code.
[Ben] I think that, even though the implementation is broken, the underlying premise of Sreejith's article is valid; our readers would, in my opinion, find it interesting to see a simple introduction on accessing hardware by writing a module. Do you think that the article is salvageable as it is (i.e., is it possible to make the code work - regardless of whether another tool for it exists or not), or is it just broken from the start?
@Sreejith: http://lug-owl.de/~jbglaw/software/steckdose/steckdose.c is some code using the ppdev API to access the parport lines. Maybe you want to have a look at that? I'd try to write some code driving a stepper motor in full-step mode, but since I don't have one handy right now, you'd need to test that.
The code mentioned above drives a shift register connected to a parport (It is driving some home-made hardware; at the parallel outputs of the shift register, there are relays switching my computers on and off. That way I don't need to go down into the cellar to switch a machine on or off
It is quite simple:
for (each bit to be pushed serially into the shift register) { put_one_bit_on_the_serial-in_data_line(); rise_clock_line(); lower_clock_line(); } move_shift-state_into_output_latches();
Because shift registers output their falling-out bit at the end, this can be fed into the next shift register. That way, I can cascade a dozens of these chips to control 100 lines.
Maybe something like that could even be presented as an article, but to date I haven't production-level PCBs, but only hand-made ones.
MfG, JBG
Jan-Benedict Glaw jbglaw@lug-owl.de
[Heather] Ben gets an answer from the article author, with a bit of after-the-fact concern about the original reasoning, and maybe a bit of self-abashment about accepting it too close to deadline.
On Wed, Jan 18, 2006 at 02:54:43AM -0800, Sreejith Nair wrote:
Hello sir, I noticed those serious mistakes in my article.
[Ben] I would have appreciated it if you had said something about them when submitting it rather than presenting them as useful code, then.
Actually i did this experiment as my Mini project in the 4th semester of my B Tech course(June 2003). At that time i was using 2.2 kernel and i learned the basics in the same. But now i am working with Fedora core 1 (2.4.22 -1.2115.nptl). So what happened is, i just modified the code for the new kernel and rectified the compilation errors. And now i see....its a mixture of 2.2 and 2.4 things.
But it is a working code. I can control my toy stepper motor with this code.
[Ben] Unfortunately, it doesn't compile for me - even after I've taken out the hard-coded kernel location in the INCLUDE line:
ben@Fenrir:/tmp$ make cc -O2 -DMODULE -D__KERNEL__ -W -Wall -I/usr/src/linux/include -c -o stepper.o stepper.c stepper.c:1:1: warning: "MODULE" redefined <command line>:1:1: warning: this is the location of the previous definition In file included from /usr/src/linux/include/linux/bitops.h:77, from /usr/src/linux/include/linux/thread_info.h:20, from /usr/src/linux/include/linux/spinlock.h:12, from /usr/src/linux/include/linux/capability.h:45, from /usr/src/linux/include/linux/sched.h:7, from /usr/src/linux/include/linux/module.h:10, from stepper.c:3: /usr/src/linux/include/asm/bitops.h: In function 'find_first_bit': /usr/src/linux/include/asm/bitops.h:339: warning: comparison between signed and unsigned [ ~150 similar lines elided ] make: *** [stepper.o] Error 1
For testing, i was just printing the hex value to the console instead of writing to parallel port. For controlling stepper motor, the -printf("%d\n",pattern[i][j] [k]); - statement should be replaced with - outb(pattern[i][j][k],LPT_BASE); . Anyway this is a serious mistake and I deeply regret and apologize for that.
[Ben] Well, we'll let our readers know not to expect this code to work, then; publishing this exchange should do it. Fortunately, every cloud has a silver lining: Jan-Benedict Glaw, who noticed the problem initially, has agreed to review future C code for us so that this kind of thing doesn't happen again.
Nowadays, because of my workload, i am not able to explore "The Linux World" that MUCH!... My intention was not to develop a professional stepper motor driver as i know that there already exists a parallel port driver in Linux. I just wanted to share the basics of device driver coding through an example.
[Ben] Sreejith, may I ask why you wrote this article in the first place?
Actually, never mind: the above question is best treated as rhetorical. Instead, I'll just pretend that I'm having this exchange with $AVERAGE_AUTHOR - a fellow who just wrote an article that failed in the same way as yours did, and from whom I got the same above excuse when I asked him about it (and to whom, unbeknownst to him, I've slipped a bunch of truth serum in his morning tea.)
- Me: So, why'd you write this thing?
- AA: So I could get recognition and respect for being a Cool Kernel-Hacking Dude, of course! Then I'd be able to get all the chicks! Oooh, look at the pretty colors...
- Me: (making a note to decrease the dosage the next time) So what do you think is going to happen NOW, after it's become obvious that your code doesn't work?
- AA: (in a mild panic) Umm, maybe I can make some really good excuses? Maybe people who believe them will still think I'm cool...
- Me: Uh-huh. And what do you think will happen when your excuses fall through, and people discover that you not only made a mistake, but tried to cover it up?
- AA: (full-blown panic, RUN AWAY!!!)
Does this scenario look familiar?
The problem is that there's a "best effort" clause hidden in doing any kind of work for the Open Source community. The coin of Open Source is respect - and when you put out less than your best effort, then that coin might not only be a bit slow in coming, but might not appear at all - and will disappear instantly when that respect is discovered to be unearned. Note that I didn't say "will disappear when a mistake is discovered" - everyone makes mistakes. The deciding factor is in how you handle having made the mistake: making excuses such as "my intention was not to develop a professional [application]" destroys the last possibility of getting paid in that coin, whereas - for example - admitting the error honestly and taking a few minutes to produce working code that could be published as a corrective note the following month would have salvaged some of the credit.
The staff here at LG put out their best effort to edit, format, and publish the material that is submitted to us; I can guarantee you that all of it is hard work, but despite that, excuses like "well, it's not a professional publication" don't have much currency here.
[Heather] We've grown increasingly towards professional traits over the years, cover art and so on. But we've had a formal editor ever since Marjorie took over from John Fisk many years ago. Sometimes we fail to edit as professionally as we'd like - and sometimes what we are aiming for is a homey, at a real person's desk kind of feeling - and we do it for love of linux and not the money - but that shouldn't make the best effort a sad one.
[Ben] By that same exact token, we expect that our authors - especially those submitting code - have made their best effort to make sure that their code works in the current Linux environment, and have done at least some minimal testing. Perhaps that assumption was unwarranted in this case, for which I personally apologize to our readers (since I was the one who accepted the article for publication); however, that is our default expectation. I don't see how ANY interaction based on respect can imply anything else.
Just as a relevant technical note, by the way: the 2.6 kernel has been available for download since 17-Dec-2003 (according to the timestamp of http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.0.tar.bz2) - I see no reason why an article directed at kernel-related coding would cover the 2.4 kernel as its primary target.
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://linuxgazette.net *
I'm very pleased to announce that our Editor In Chief, Ben Okopnik, has married his dear Kat.
The wedding was delightful (give or take getting lost on the way there), the music was fun, the food was fine, and the nearby outdoor gardens were pretty, too. Those of us present who did not immediately have to leave again joined the happy pair afterwards at a nearby restaurant whose chef is, in my not so humble opinion, rightly famous.
It was great. Go see the Back Page for a picture of the happy pair.
Rumors that his biggest client paid for the honeymoon turn out to be halfway well founded in that they invited him to go for pay to the kind of place that he and his bride would have been delighted to go to anyway. Smiles from the universe are always appreciated
Hi all,
I saw that one can get LG either as a single html or group of html pages, I would like to have them in a self-contained ps, pdf or even an openoffice document. The simple reason is that one can do this off-line more easily. I did try to get this answer from the various knowledge bases which u have mentioned on the site but wasn't able to get even close to that. Hope u can help here & maybe also update the same in the knowledge base for future. Thanx in advance.
Shirish Agarwal
Life is a dream Enjoy it!
Creative Commons, Attribution
Non-commercial, non-derivative
[K.-H.]
There is a little commandline tool named "html2ps" which will fetch e.g.
the TWDT page and convert it into a ps file.
for the current linuxgazette this would be:
html2ps -o test.ps -U http://linuxgazette.net/121/TWDT.html
-U is supposed to generate the colored background (e.g. code) but doesn't do it for me, and -D would generate DSC info so you can go back and forward.
Using ps2pdf you can convert it again into a pdf file.
Otherwise there is always the print-to-file in your browser which generates postscript as well (at least in Linux).
Hope that helps you along....
Hey, everyone:
What do you think of the idea of "Talkback" links at the top of each article? Perhaps something like this:
<a href="mailto:tag@lists.linuxgazette.net?subject='Talkback:<article_name>'"> Discuss this article with The Answer Gang </a>
It works on several different levels, I think.
[Thomas] This was trialed for a while when LG was at SSC. It worked relatively well for some articles, except that it tended to be abused by some (c.f. my posting to TAG some years ago about someone wanting to know how to change the oil in their car.)
.
[Rick] How do you change the oil in your car?
I think it's worth trying, Ben.
Yeah, some clueless people might use it to piggyback their own question into TAG, but they can be pointed right back out (i.e., 'read "Asking Questions of The Answer Gang" at <http://linuxgazette.net/tag/ask-the-gang.html>!'), and anyone wanting to comment on a specific article can do so easily.
Thoughts?
It wouldn't hurt to try, I suppose. What's the worst that could happen? At the moment, any specific article feedback is often forwarded to TAG -- since a lot of it gets sent to the author directly. So yeah... try it.
-- Thomas Adam
[Pedro Fraile, one of the Answer Gang]
"Talkback" content at the old site did not go to the TAG list, and so was lost when the site was transformed. With Ben's suggestion, any useful comment or correction would appear in next month's issue and would so be preserved.
Yes, I like it.
[Heather] Do you like it too? Let us know! Ok, so it may be a kind of skewed sample, only people who bother to read all the way to the bottom of the mailbag are going to answer. But it's a fair question - will it be more fun to have a fast link at the top? That's what it's all about after all - Making Linux Just A Little More Fun