
Editor: Michael Orr
Technical Editor: Heather Stern
Senior Contributing Editor: Jim Dennis
Contributing Editors: Ben Okopnik, Dan Wilder, Don Marti
,
http://www.linuxgazette.com/
|
...making Linux just a little more fun! |
From The Readers of Linux Gazette |
devfs problemHello!
I just switched from Gnome 2.0 to KDE 3.1 and I notice that the settings for the devices created by devfsd aren't save between reboots. So I read through the docs and I saw that I have to create some dev-state dir. Well, I already have that dir in /lib and devfsd is set to save the settings (in /etc/devfsd.conf). And if I change the permissions on some devices (/dev/dsp for example), the change is also visible in /lib/dev-state directory. However, after I reboot, the same problem. I don't have permissions. And this is really annoying me.
So any suggestions are greatly appreciated!
P.S. I am using Mandrake 9.0 with the default kernel.
Thanks!
Regards,
Stelian I.
traffic shaping for the internal network; tc filter for source addresses?Hi!
I've got my home LAN behind a cable modem, masqueraded to the outside world. The masquerading machine runs RedHat 7.3. What I'm trying to achieve is equally share the bandwidth between the machines (about 7) following this algorithm: if only one host is making a connection at a given time, it gets the whole bandwidth; when a second connection from a second masqueraded machine arrives at the gateway, the bandwidth is equally divided between the two machines; if a third machine makes a connection, the bandwidth is split in three equal shares and so on. Now if one of the machines that has already opened a connection, makes a second one, I would want this connection to be allocated inside the machine's share, not as a separate member participating in the bandwidth division. Following this idea, if someone has 4 open downloads, someone else 7 and a third machine only 1, then bandwidth should be divided only by three and not 12.
I've already read about SFQ, qdiscs and tc filter from the 'Advanced routing HOW-TO' but I couldn't find any info on how to shape/police traffic dynamically and based on ip source addresses. I do not want to split the bandwidth into seven slices from the beginning since not everybody is online all the time and this would waste available bandwidth for the others. I'd rather have the traffic shaped depending on how many internal hosts wish to access the internet at a given time.
I'm not really interested in providing differentiated traffic based on content (interactive, bulk, etc.) just a fair sharing of bandwidth, ignorant of how many download managers/ftp's each and everyone is running, and not allowing anyone to suffocate the shared internet connection with his/her requests.
Thank you very much in advance for the time taken to
answer this,
Radu Negut
PS/2 port still live after shutdownHi everyone.
When Linux shutsdown with halt -p, my pc will turn off, but Linux won't switch off the power to my PS/2 port. It is turned on when X starts, but when X shuts down, or the PC is shut down, the port remains on - and my Optical Mouse stays on. Light remains glowing, etc.
.... However, Windows 98SE will shut this down properly every time. I have kernel 2.4.20 and have tried enabling ACPI and APM. And of course I have an ATX PSU, and nothing weird enabled either in cmos or jumpered.
I know that some boards just have power going through PS/2 ports after soft shutdown as a feature/bug, but Win98SE manages to shut down this one ok.
If someone knows how to fix this, I would really appreciate your help.
Thanks in advance.
D.Radel.
PS. Sorry for mentioning that other OS in this email.
Only USB mouse/keyboard recognized by KDE.Greetings.I installed Red Hat Linux 8.0 on my desktop computer. I used my PS/2 keboard and mouse to install the software from CD images downloaded from Red Hat. After software installation completed my computer rebooted to the KDE login screen. My PS/2 keyboard and mouse does not work. Only a USB keyboard and mouse work. When I boot my system into run level 3 my PS/2 keyboard works. How do I configure my system so that I can use my PS/2 mouse and keyboard with KDE?
Any information is appreciated. Thanks.
linux statistics
Hi all,
are there any reputable statistics available on the web comparing linux,
*nixes and windows on the enterprise server market? Can somebody give
some pointers or links? Any reputable articles would also be welcome. I've
been rummaging the web the whole day but couldn't find anything useful.
Thanks.
What a great service you have done meDear Mike,
After my first article was published, about thirty people downloaded my console interface library. In the few days since you published my second, over ninety people have come for it. If only ten percent of those try to write an editor like I described, you will have turned my dream into a reality.
When I cycled into the city to log on at the daycentre this morning, I had been in the countryside for a week. I had no idea I had been published because I expected it would be in the March edition. I agreed with your comments about C++ not being the universal language I made it out to be and was going to rewrite it with your suggestions in mind.
Unless the author says he plans to do a revision, I assume the article is finished when I receive it. -- Mike
Now I realise it's gone out and I've seen the response, I don't care how
bigotted people think I am
I cannot thank you enough.
Your faithfully, Stephen Bint
We have encouraged Stephen to write or be involved in more articles; you'll see some of the results when they're ready for publication. -- Heather
Thanks for the encouragement. It was good to hear what the article is doing for you. -- Mike
Mike,
Thank you for pointing out that I gave the misleading impression, that C++ is the first language of all Linux users in my article, The Ultimate Editor (LG#87). Obviously Linux users vary widely in their choice of first language.
It would be a boon to the users of any language, especially beginners, to have an editor which is extensible in their own language. C++ users seem to be the only group who do not have one yet.
Stephen Bint
The Ultimate EditorDear Editor,
I can not fully understand the article "The Ultimate Editor" in Feb. LG. Having migrated from DOS to Linux without passing MSWindooze I have to ask what is wrong with the Linux text editors such as joe, xedit, gedit, gxedit, xeditplus, kedit, kwrite, kate, vim, gvim, cooledit, any more?, yes I am sure.
I have seen the text editor in Windooze and thought it a joke compared with some of the Linux text editors mentioned.
May be Stephen Bint should try them all first before picking up more cigarette butts in the gutter thus damaging his lungs and consequently his brain.
Regards
Peter Heiss
Well, I can understand the article. I can also disagree with it, but first I have to understand it. The title seems destined to invite flames (perhaps he's asking for a light for those soggy gutter butts).
He doesn't like the Linux text/console editors he's tried. He doesn't bother to lay out the criteria against which he's rating them. Other than that it's simply an announcement of a library which is built over the top of SLang which, of course is built over the top of ncurses.
It would be easy to cast aspersions, even to question my fellow editors on the merits of including this article. However, I'll just let the article speak for itself. I'll ask, why doesn't xemacs support mouse on the console or within some form of xterm (xemacs does support ncurses color, and menus)? How about vim?
Personally I mostly use vim or xemacs in viper (vi emulation) mode. There are about 100 other text editors for Linux and UNIX text mode (and more for X --- nedit being the one I suggest for new users who don't want to learn vi --- or who decide they hate it even after they learn it).
-- Jim Dennis
I hope that Stephen's comment in the previous portion clarifies what he was really thinking. On the cigarette analogy, he has roll-your-own papers in his pocket, of a C++ variety, but needs someone to share loose tobacco. Then everyone sharing this particular vice can enjoy having a smoke together... downwind of folk who already like their text-editors :D Yes, folk who are used to seeing their brand down at the liquor store are likely to think making your own cigarettes is either quaint or nutty. But it's a big world out here, and the open source world is built by folk who like to roll their own... -- Heather
Let's remember that when Stephen complains, he doesn't just whine and expect others to do things his way. Rather, he takes it upon himself to contribute code that does whatever it is he's complaining about. See I Broke the Console Barrier in issue 86. That was the main reason I published The Ultimate Editor, even though I strongly objected to his assumptions that (1) C/C++ are the only worthwhile languages and (2) emacs should be flogged over the head for not using menus and keystrokes à la DOS edit. The second bothered me enough to insert an Editor's note saying there are other issues involved. The first didn't bother me quite as much, so I sent the author a private e-mail listing the C/C++ objections and asked him to consider a follow-up article or Mailbag letter that took them into account. And it worked: we had a great discussion between Stephen and the Editors' list about C/C++ vs scripting languages, and that led to some excellent article ideas.Also remember that Stephen is homeless, and his Internet access is limited to an hour here, an hour there on public-access terminals. A far cry from simply sitting in front of your computer that happens to be already on. So he is putting a high level of commitment into writing these articles and programs, higher than many people would be willing to do. It's unfortunate that his limited Internet access prevented me from knowing at press time that he had decided on a last-minute revision to tone down the article and make it more balanced, but c'est la vie. -- Iron
editor's comment...In Linux Gazette ( a most excellent ongoing effort, btw):
On behalf of the staff and the Gang, thanks! -- Heather
http://www.linuxgazette.com/issue87/bint.html
there's an editorial aside:
The Ultimate Editor would be what emacs should have been: an extensible
editor with an intuitive mouse-and-menu interface. [Editor's note: emacs
was born before mice and pulldown menus were invented.]
AFAIK, nope
Or at least, not exactly! This would be better:
|
............... [Editor's note: emacs was born before mice and pulldown menus were *widely known outside research institutes*.] ............... |
Though of course, RMS was at a research institute, so may have known of
mice by then
For mouse references, see (amongst many other possibilities):
http://www.digibarn.com/friends/butler-lampson/index.html
or any of the Engelbart stuff. Mice were pretty well known by '72, Emacs dates from '76: TECO (Emacs' predecessor) does however date back almost to the invention of the mouse - I haven't found out exactly when TECO was initiated, around '64 I guess (but see
http://www.ibiblio.org/pub/academic/computer-science/history/pdp-11/teco/doc/tecolore.txt
if the question is really of interest).
I think, strictly speaking, that the editor macros were by their nature trapped in the environment of the editor they were macros for : TECO. So it isn't precisely right to say that TECO was emacs' predecessor; "parent" or "original environment" maybe, but I don't believe TECO was intended to be a general purpose editor ... much less the incredible power beyond that, that the emacs environment grew into after taking off on its own.
Not all menus are pull-down, nor should a mouse be required to reach pull-down menus... a matter of style and usability. For my own opinion, I feel that emacs does have menus; they just don't always look the part. -- Heather
This is all, I agree, excessively pedantic - I've also offered my services
as occasional proofreader
JR
Thanks to everybody who offered to proofread. We now have some twenty voluteers. -- Iron
wordsmithing in GibberishDear Ben,
This is with reference to "Perl One-Liner of the Month: The Case of the Evil Spambots" which was published in th LG#86. I especially enjoyed you defination of Gibberish.
Here is something I found in my fortune files. I am pretty sure wordsmithing in the Marketroid language is done using this procedure. Please keep up the good work of giving underhand blows to the Marketroid.
|
............... Column 1 Column 2 Column 3 0. integrated 0. management 0. options 1. total 1. organizational 1. flexibility 2. systematized 2. monitored 2. capability 3. parallel 3. reciprocal 3. mobility 4. functional 4. digital 4. programming 5. responsive 5. logistical 5. concept 6. optional 6. transitional 6. time-phase 7. synchronized 7. incremental 7. projection 8. compatible 8. third-generation 8. hardware 9. balanced 9. policy 9. contingency The procedure is simple. Think of any three-digit number, then select the corresponding buzzword from each column. For instance, number 257 produces "systematized logistical projection," a phrase that can be dropped into virtually any report with that ring of decisive, knowledgeable authority. "No one will have the remotest idea of what you're talking about," says Broughton, "but the important thing is that they're not about to admit it." - Philip Broughton, "How to Win at Wordsmanship" ............... |
Cheers Raj Shekhar
Point of SaleGene's HTML-only email barely escaped the spam trap, when Mike recognized that it was a followup to Issue 87, Mailbag #2
Folks, while our main publication form is HTML, we have our own style guidelines and pre-processing to do; if you're not submitting a full article, we greatly prefer plain text. -- Heather
There's always the real thing.
ViewTouch is genuine killer app. My life's work resulted in the sales of millions of computers in the 26 years since I first started writing and using POS software. I invented many of the concepts in use today worldwide in retail software, including virtual touchscreen graphics to represent the universe of retail business operations. Much of what we are doing today will become standard in the future. ViewTouch is the original and longest-lived. Thanks for your comments.
Gene Mosher
Hello, Gene - I remember talking to you when I wanted to install VT for
a client in Florida a few years back (they backed out of the deal by
trying to rip me off, but, erm, I had the root password. We parted ways,
and they're still without a POS last I heard.
As I'd mentioned, I
really like the look and feel of your app; however, good as it is, not
being Open Source limits its applicability in the Linux world. If I
remember correctly, that was the upshot of our discussion here.
Just for the record, folks - Gene was very friendly and very helpful despite the fact that the client had not yet bought a license from him; given his help, the setup (at least the part that I got done before the blow-up) was nicely painless.
Ben Okopnik
We also got a request for aid finding a POS from a fellow with a pizza parlor; luckily, Linux folk have already dealt with Pizza, although it's worth following the old articles over at LJ and seeing how that project moved along. We're still looking for news or articles from people using or developing open source Point of Sale, and I re-emphasize, we mean physical cash registers, not just e-commerce. E-commerce apps we've got by the boatload, on sale and in "AS IS" condition. -- Heather
April/May/June scheduleI will be out of town March 18 - April 3 at the Python conference and Webware sprint (and visiting New York, Chicago, and Columbus [Ohio]), Heather will be busy the week before Memorial Day (May 26), and I'll be gone Memorial Day weekend.
This means I'll need to finalize the April issue by March 14, so the article deadline is March 10. I've let the recent authors know.
May's issue will be normal.
For June, the article deadline will be May 19 (a week early).
|
...making Linux just a little more fun! |
By The Readers of Linux Gazette |
make in future? I'm confused *now*hai,
I am subbu and I encounterd this problem when i ran
make - filename.
How to fix this problem?Can you help me.
make: *** Warning: File `makefile.machine' has modification time in the future (2003-01-28 07:07:00 > 2003-01-28 00:09:19) make: Nothing to be done for `all'. make: warning: Clock skew detected. Your build may be incomplete.
I guess that my real-time clock has set incorrectly. how to correct it.
I appreciate your time.
thanks,
subbu
Ugly HTML had to be beaten up and reformatted. Please send messages to The Answer Gang in text format. -- Heather
[Mike] The message means what it says: 'make' found a file that "was" modified in the future. That may or may not be a problem, and if it is, it may or may not be significant. Do you know by other means whether 'makefile.machine' should have been updated? I.e., did you modify any file related to it?
How did that file get on your machine in the first place? Did you copy or untar it from another computer in a way that would have preserved the foreign timestamp? If so, then the clock on the other computer may be wrong.
To check your own computer's clock, see the 'date' and 'hwclock' commands. 'date' shows and sets Linux's time; 'hwclock' shows and sets the real-time clock. First set Linux's time correctly, then use 'hwclock --utc --systohc' to reset the hardware clock.
If your hardware clock is pretty unreliable (as many are), you can use 'hwclock --adjust' periodically (see "man hwclock"), run ntp or chrony to synchronize your time with an Internet time server, or put the kernel in "eleven-minute mode" where it resets the hardware clock every eleven minutes. (Answer Gang, how do you activate eleven-minute mode anyway?)
[Ben] In the "hwclock" man page:
This mode (we'll call it "11 minute mode") is off until something turns it on. The ntp daemon xntpd is one thing that turns it on. You can turn it off by running anything, including hwclock --hctosys, that sets the System Time the oldfashioned way.
Also, see the "kernel" option under "man ntpd".
H/W detection in Debian ?In reference to: Issue87, help wanted #1 -- Heather
You could try installing libdetect, and then running /usr/sbin/detect (detect is also used by Mandrake). Aside from that, the only thing I can suggest is filing bugs with Debian.
ppp over nullmodem cable - Linux client, win2k RAS serverIn reference to: Issue87, help wanted #2 -- Heather
The problem is the authentication on the Win2K side. Check out http://msdn.microsoft.com/library/default.asp?url=/library/en-us/apcguide/htm/appdevisv_8.asp Basically, since I assume the RAS server is running etc, you just need to enter this command on NT:
netsh ras set authmode NODCC
Last month Linux Magazine (UK - http://www.linux-magazine.com/issue/26/index_html) ran an article on setting up Direct Cable Connections with NT. I'll send on the details when I find where I left the magazine. You may try searching http://linux-magazin.de since Linux Magazine is a translated version of that.
http://www.tldp.org/HOWTO/Modem-Dialup-NT-HOWTO-9.html
This page may also be of use.
kernels? make your own!In reference to: Issue87, help wanted #1 -- Heather
Solution: stop using redhat, debian, mandrake kernels, download a fresh kernel from kernel.org and build with that.
The other answer, is to look in you Makefile, and check the line beginning with "EXTRAVERSION=" If you add your own name to that line, and run make, you brand the kernel and modules with that name. Hope that fixes your problem.
"Sean Shannon" <sean@dolphins.org>
Tue, 4 Feb 2003 10:48:20 -0500
The hardest part in compiling a kernel is making the ".config" file. Some things to check:
[Thomas Adams] Yep -- good idea.
[Thomas Adams]
Well, I usually do something like:
alias beep='echo -e "\a"' make modules && for i in $(seq 10); do beep; done && make bzImage && for i in $(seq 10); do beep; done
[Thomas Adams] or /dev/sda if s/he has a SCSI
To install the new kernel:
Copy the new kernel and system map to the “boot” directory
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.16-22-custom cp /usr/src/linux/System.map /boot/System.map-2.2.16-22-custom
Edit file: “/etc/lilo.conf”. Add a new “image” section (add everything below )
See attached customkernel.lilo.conf.txt
[Thomas Adams] Often called a "stanza". Be careful though. I'd be more inclined to "label" this as "linux-test" so that it doesn't infringe on the "old" version of the kernel. Remember that up until this point, you're still testing (a trial run) the new kernel.
Activate the change as of next re-boot
/sbin/lilo
Install new System.map
rm /boot/System.map ln -s /boot/System.map-2.2.16-22-custom /boot/System.map
Reboot the system to build module.dep file
shutdown -r now
[Thomas Adams] Hmmm, deprecated. "Init 6" is a better way.
Reboot the system after the login prompt appears Enter “alt-ctrl-del” key combination
Reboot performed because modules.dep is created on first boot (if not, try running the "depmod" command manually then reboot)
[Thomas Adam] Not necessary. "depmod" is ran through all of the init levels on a modern Linux system......
Good luck. Sean Shannon
[Jim Dennis] Most of this can be automated down to just two lines:
make menuconfig
make clean dep bzImage modules modules_install install
... note the list of multiple targets all on one line. Make install will look for an executable (usually a shell script) named /sbin/installkernel (or even ~/bin/installkernel) and call that with a set of arguments as documented in ... (/usr/src/linux) arch/i386/boot/install.sh
Here's a relevant excerpt:
# Copyright (C) 1995 by Linus Torvalds # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin # "make install" script for i386 architecture # Arguments: # $1 - kernel version # $2 - kernel image file # $3 - kernel map file # $4 - default install path (blank if root directory) # # User may have a custom install script if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
So this can put the approprite files into the appropriate places and run /sbin/lilo or whatever is necessary on your system.
I like to copy .config into /boot/config-$KERNELVERSION Also, in my case the script as to mount -o remount,rw /boot since I normally keep /boot mounted in read-only mode. The script remounts it back to ro mode after running /sbin/lilo.
For new kernels you can save some time in menuconfig by preceding that make with:
cp /boot/config-$RECENTKERNELVERSION ./.config.old make oldconfig
... which will set all the new config options to match any corresponding settings in the old config. Then you can focus on the new stuff in menuconfig.
Another useful tweak for some people is to edit ... (/usr/src/linux) .../scripts/Menuconfig and find the single_menu_mode variable:
# Change this to TRUE if you prefer all kernel options listed # in a single menu rather than the standard menu hierarchy. # single_menu_mode=
... for those that don't like to have to expend extra keystrokes popping in and out of subsections of the menuconfig dialogs.
Sadly this particular featuer as changed (at least by 2.5.59) with the inclusion of a new kconfig system (instead of menuconfig).
You can get a collapsible try of menu options in the new system using: make menuconfig MENUCONFIG=single_menu (However, it it starts with all branches collapsed. <grump!>![]()
Ipchains vs. IptablesIn reference to: Issue87, help wanted #6 -- Heather
if you use ipchains, then you should look at masquerading and port-forwarding.
following command
ipmasqadm portfw -a -P tcp -L $4 4662 -R 192.168.1.100 4662
should do the trick.
rgds Patrick De Groote
Bruce Ferrell <bferrell@baywinds.org>
Sat, 22 Feb 2003 17:30:34 -0800
if you're using ipchains you need something like this:
/usr/sbin/ipmasqadm portfw -a -P tcp -L <EXTERNAL ADDRESS> 11900 -R <INTERNAL ADDRESS> 11900
The point is, whether you use a variable or hardwire in an address, you need to specify both sides of the forwarding connection. Also note that the two examples selected a different port to play on, but the principle is the same. I hope that leaving both examples in makes it all clearer to readers. -- Heather
Jim Kielman <jimk@midbc.com>
05 Feb 2003 23:30:27 -0800
I ran into a similar problem with a client that had to have PCAnywhere access to one of the computers on his network. My solution was to use "ipmasqadm portfw" to forward the ports PCAnywhere needed to access. The server is running Debian potato with a stock 2.2.20 kernel. Here is what I use:
ipmasqadm portfw -a -P tcp -L <internet IP> 4162 -R <mldonkey IP> 4162 ipmasqadm portfw -a -P udp -L <internet IP> 4162 -R <mldonkey IP> 4162 ipmasqadm portfw -a -P tcp -L <internet IP> 4161 -R <mldonkey IP> 4161 ipmasqadm portfw -a -P udp -L <internet IP> 4161 -R <mldonkey IP> 4161
internet IP = the IP address of the computer connected to the internet.
mldonkey IP = the IP address of the computer running mldonkey.
I don't know if you need both udp and tcp, but it works for me. Hope this helps.
Regards
Jim Kielman
a new languageIn reference to: Issue 86, 2c Tips #3 -- Heather
John Karns:
Cool - thnks for the pointer. I think I'll check it out. I knew that
some IDE's exist for Linux, but never really took the time to look at one.
Note we're pointing to his gathered list of numerous "integrated development ennvironments" - the previous entry pointed to his description answering that (1) yes we have them, lots and lots; and (2) that if you think you're seeking one, you should make sure you are solving the right problem first. -- Heather
Key Remapping....Is it possible to remap the <tab> key to another key on the keyboard?? One of my co-workers has a broken left pinky and is going insane not being able to use the tab key to complete commands.
I done a fair amount of searching to no avail... any help would be greatly appreciated.
[Mike] Grr, I just read yesterday about somebody turning Scroll Lock into another Escape key, now where was it...?
You can remap any key using the "loadkeys", "showkey" (singular) and "dumpkeys" commands. That's on the console. You have to do additional steps for X. See the Keyboard and Console HOWTO
http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO.html
Thanks for the quick reply. Helps a lot.
James
Palm magicI was desperatly trying to use my palm with the evolution mailer, recompiled everything but the kitchen sink to get Gnome2 and Gnome1.4 capplets and applets totlaly mixed up in the end, it was working, but gnome was broken, so now I'm repairing Gnome2, and then try to write the apropriate spells for my Paml connetion
Halb uses the Sorceror distro, which refers to compiling its scripts and packages as "casting spells". -- Heather
[Ben] I've found the "appropriate spells" for the Palm - for my M-125 with the USB cable, at least - to be "jpilot" and "coldsync". "jpilot" is really well done, except for the selection interface in the "Install" menu (select a file, click "Add". Select next file, click "Add". And so on for, say, 50 files.) "coldsync" works at a lower level - it's great for reinitializing user info, a quick install with or without synching, and generally tweaking Palm comms. As an example, among the files that I carry on the Palm, I have The Moby Shakespeare collection (all of The Bard in one file) and Gibbon's "Decline and Fall of the Roman Empire", volumes 1-6; both rather large (~5MB). "jpilot" refused to load them (segfaulted). So did my brother's Wind*ws Palm desktop. "coldsync", however, when used with the "slow sync" option, managed it just fine. KDE's palm app, though, is severely broken (to its credit, it mentions that in the initial screens); it hosed my Palm so hard that I had to do a hard reset, and re-init the user (another thing that "jpilot" couldn't handle.)
Yes, well thanks for the info, Jpilot and stuff works like a charm (Palm M105 the small one), but I wanted to Sync my mailadresses in evolution........ wich is based upon gnome 1.4 (c)applets, which are horible to get to play nice with the Gonme2.0 install.
Good to know about the big files though...
Initial thoughts on ratpoisonFor those of you who don't know, ratpoison is a light (very light) window manager. (http://ratpoison.sourceforge.net). The basic scheme is to have all apps fullscreen, using screen-like key bindings to switch between windows. I've been using it for about an hour or so now (Hint: Look at the sample.ratpoisonrc in the doc directory. Don't end up hacking the source code to change the prefix key like I did.), and I'm liking it. The best thing, of course, is the tons of screen real estate you get without any window title bars, borders, etc.
If you like doing everything with the keyboard or you want tons of screen real estates, give ratpoison a whirl.
Also see this article on freshmeat: http://freshmeat.net/articles/view/581
rc.local in debianIf you aren't using RHL, simply edit /etc/rc.d/rc.local
Atul
but there is no such file in debian . what file should I edit in debian ?
thanks in advanced.
The Linux Oracle has pondered your question deeply.
And in response, thus spake the Oracle:
echo '#!/bin/sh' > /etc/rc.local chmod 744 /etc/rc.local RL=`grep ':initdefault:' /etc/inittab | cut -d: -f2` echo "LO:$RL:once:/etc/rc.local" >> /etc/inittab killall -HUP init
You owe the Oracle a better understanding of why subverting the SysVInit architecture is fundamentally a bad idea in the first place.
recording sounds on linux for windowsHi!i'm rayho, i would like to ask how to receive sound from the microphone and then transmit the sound from the linux os to the window os system.Also,I'm not understand where the sound source is stored in which file in the linux os and what hardware and software do i need to do this transmition.Thankyou for your help!!
[Halb] Hi there,
This may sound a bit simple but I would do it like this:
- record your sound with anything that works (grecord or something)
- save as any file format you like (wav, mp3, ogg)
- copy this file over to the windoze box (samba)
- play file on windows (media-player, realplayer,..)
needed Hardware:
- 2 pc with networking cards (rj45, Wlan,..)
- microphone
- loudspeakers (? I looked this one up in dict.leo.org)
needed software:
- Linux (any flavour you like)
- Windoze
On the other hand, you might not want to transport single files, but want to do some kind of Internet audio broadcasting or something. You might want to look into
- http://www.shoutcast.com
- http://www.peercast.org ( p2p radio based on the gnutella protokol, I don't know about the license, but source is available)
- http://streamerp2p.com/streamer.htm ( p2p radio GPLed)
What did you have in mind?
Secure Password Authorization - NTCR ?Neil Belsky wrote:
NTCR is another name for NTLM, which is supported by fetchmail.
Fwd: Terminating Misbehaving ProgramsI receieved this tip for inclusion in my HOWTO
http://geocities.com/lunatech3007/doing-things-howto.html
However as it a bit advanced for a newbie's howto I did not include it. i am forwarding it to you.
Regards
Raj
[C.R. Bryan III] Subject: Doing Things in GNU/Linux
Good stuffSomething I can put on a firewall machine when I put it onsite (since I leave Apache in for a status.cgi page anyway)
In the section "Terminating Misbehaving Programs":
If the afflicted machine is on a network with another Linux machine, or a Windows machine with PuTTY, there are additional steps that can be taken before hitting the Big Red Two-by-Four switch. (My network runs RHL 6.2 on older boxes, old as in P133, so I get practice in this every time Netscape walks into a Java site and freezes.)
- Shell into the afflicted machine. Use ssh if you've got it, telnet otherwise. If VNC is installed at both ends, maybe you can use that. Just because the local desktop is frozen doesn't always mean that all desktop functioning is frozen. If the machine won't log you in, obviously it's game-over, so at that point you have to reset the box. Often, though, especially on older boxen, it's just X that's either frozen or in a really deep thrashing session, and you can get a shell prompt. Root-to-root ssh is most convenient.
- Get root on the afflicted box with su.
- Try to kill off just the program that's freezing things, and try to do it nicely.
a. If you can get X apps to forward, or you can get a VNC window open, you can bring up kpm (the KDE process manager), which, with all the information presented, allows you to pinpoint just the app to kill with a right-click. Try several times to get it to go away, starting with Hangup, then Terminate, then Kill. The more of a chance you give the program to clean up its exit, the less garbage you'll leave lying around in the system.
b. If you know the name of the program that has gotten hung, and only one instance of it is running, use killall. Let's assume for example that it's netscape:
# killall -HUP netscape
# killall -TERM netscape
# killall -KILL netscape
Killall does just that, kills off every instance of a program that it finds. That's appropriate for netscape, since it has a session-manager core which is usually the part that's locked up. If you've got a dozen xterms open, and ytree running in half of them, though, killing off every ytree might not be what you want; often, it's the helper-app that ytree launched that's frozen up (lynx, for instance) and you can killall that.
c. Use top and other shell tools to zero in on which process to kill, then use kill. (Here I don't have that much experience: when I need to use top and kill, it's on a firewall without X, where all the running processes fit in an xterm/ssh window, so it's simple to fish out the pid to kill.)- If it won't kill, or you can't figure out who to kill, or things just seem hosed at the X level, as long as you can get root on a shell command-line, you can tell it:
# init 3;init 5
...and that'll do what ctrl-alt-bs would do, restart X to a graphic login. Your underlying filesystem will have cores and DEADJOEs left lying around from the X-level programs that had to abort, but you won't have to fsck everything on a dirty boot.- If you think you might have stuck ports and locks from the killed X-level processes, and the machine doesn't have duties that would prevent it, or if X won't come back up, you can do a clean reboot to put things back in order, probably in less time than it'd take to find and free the stuck resources...
# shutdown -r now
That'll take down the X level, giving the X programs a chance to clean up after themselves, then the rest of the machine, and your filesystem will be unmounted and rebooted cleanly.
Bottom line: if you can shell or VNC into the frozen machine, there are things you can do to avoid losing data in the innocent processes you're running in X or corrupting your filesystem. You can even do some of these things from Windows if you have the right tools (telnet, ssh, PuTTY, VNC), as long as you have two or more machines on the same network.
How much of this you think might be appropriate to a newbie-help, I don't know, but that's my experience, anyway![]()
Two sound cardsIn reference to: Issue 87, 2c Tips #1 -- Heather
Hello,
Great how you tackled this problem. I have a simple Sounblaster 16 card. This card (with this chipset) appeared to be multichannel.
I play online games on the internet (Tribes2) and we use for communication a voice communication program (Teamspeak2). I also want to hear the sound of the game. Teamspeak2 is able to use a different channel (dsp0/dsp1).
So i adress the gamesound to dev/dsp1 and the voice communication to /dev/dsp0. I couldn't get it working with alsa drivers, but others with different soundcards can. So i used the OSS driver. It works great with only one soundcard.
If a program only wants to adress the default /dev/dsp (dsp0) and you want to let it use /dev/dsp1 you can change the link /dev/dsp --> /dev/dsp1
More information on http://www.teamspeak.org
Linux is a very stable platform for games and there is now a (free) voicecommunication program too.
Greetings from Heather SternWhew! One thing I can say, there was a lot of good stuff this month. There's so many good things to say and I just can't edit them all.
But don't you worry. We've got something for everyone this month. Newbies can enjoy a list of a bunch of apps designed to help setup be a little more fun (or at minimum, a little less headache). The intelligencia can see what the Gang thinks of some academic notions for the future of kernels. And everyone hungering for more about routing has something keen to get their teeth into. Experimenters... nice trick with two monitors, here.
In the world of Linux there's more to politicking than just the DMCA guys trying to get us to stop ever looking at "their" precious copyrighted works ever again. Among the Linux kernel folk there's snatches here and there of an ongoing debate about source code control systems. You see, BitKeeper has the power to do grand things... but for people who have not decided that they hate CVS, it's a bit of a pain to pull out small patches. For people who don't qualify to use BitKeeper under their only-almost-free license (you can't use it if you work for someone who produces a competing sourcecode control system, if I read things right ... thus anyone who works for RH shouldn't, et al.) this is a bad thing.
For that matter I'm a bit of a programmer myself, but if I'm going to even glance in the kernel's direction, I need much smaller peices to chew on, and I really didn't want to spend the better part of a month learning yet another source system. (Not being paid for doing so, being a guiding factor in this case.) I had to thrash around the net quite a bit to get a look at the much smaller portion of the whole.
So some of the kernel gang wrote some scripts to help them with using the somewhat friendly web interface (folks, these definitions of "friendly" still need a lot of work) and Larry threatened to close down bkweb if that bandwidth hit got too high. In my opinion, just about the worst thing he could have said at that moment - it highlights why people are trying to escape proprietary protocols - they want features, but Linux folk, having tasted the clean air of freedom, don't want to be locked indoors just because a roof over their code's head is good to have at times.
Don't get me wrong. Giant public mirrors of giant public projects are great things, and as far as I can tell BitKeeper is still committed to a friendly hosting of the 2.5.x kernel source tree, among a huge number of other projects. Likewise SourceForge. But we also need ways to be sure that the projects themselves can outlast the birth and death of companies, friendships, or the interest of any given individual to be a part of the project. The immortality of software depends on the right to copy it as much as you need to and store it anywhere or in any form you like. If the software you are using isn't immortal in this sense then neither are the documents, plans, hopes, or dreams that you store in it. More than the "viral freedom" clauses in the GPL or the "use it anywhere, just indemnify us for your dumb mistakes" nature of the MIT and BSDish licenses, this is the nature of the current free software movement. And you can quote me on that.
Readers, if you have any tales of your own escapes from proprietary environments into Linux native software, especially any where it has made your life a little more fun, then by all means, we'd love to see your articles and comments. Thank you, and have a great springtime.
How can I turn on pc into two (effecively)?From Chris Gibbs
Answered By Jimmy O'Regan, Jim Dennis
Hi ya,
I have a dual headed system. I am not really happy with xinerama cause having a different resolution on each monitor does not make sense for me, and having two seperate Desktops for a single X session seems limiting. Neither solution works well for apps like kwintv.
But this is linux! I don't just want to have cake and eat it I want the factory that makes it! What I really want is to have a ps2 mouse and keyboard associated with one monitor and associate a usb mouse and keyboard with the other monitor and have ability not just to run X from each, but to have text mode available also.
Idea also being I could have text mode session and X session at the same
time, that way I can have kwintv fullscreen and play advmame in svga
mode full screen at the same time
So how do I initialise the second video card (one pci, one agp) so I can make it tty2 monitor or similar?
[Jimmy] Google
http://www.google.com/linux?hl=en&lr=&ie=UTF-8&oe=utf-8&q=two+keyboards+two+mice+two+keyboards&btnG=Google+Search
came up with these links: http://www.ssc.com/pipermail/linux-list/1999-November/028191.html http://www.linuxplanet.com/linuxplanet/tutorials/3100/1
Am I greedy or wot?
[Jimmy] Nah, cost effective. "Able to maximise the potential of sparse resources". Some good CV-grade B.S.
These links are to articles about X, I already know I can have X however
I want it accross the monitors. Thats easy...
What I want is seperate text mode consoles, so at risk of repeating myself how do I initialise the second video card for text mode (not for X) and how do I associate it with specific tty's
[Jimmy] Well, you could set up the first set for the console and use the second for X Okay, not what you asked
. So, to your actual question.
The device should be /dev/fb1, or /dev/vcs1 and /dev/vcsa1 on older kernels. You should have better luck with a kernel with Framebuffer support - according to the Linux Console Project (http://linuxconsole.sourceforge.net) there's hotplug support & multiple monitor support. The Framebuffer HOWTO has a section on setting up two consoles (http://www.tldp.org/HOWTO/Framebuffer-HOWTO-14.html). The example focuses on setting up dual headed X again, but it should contain what you need - "an example command would be "con2fb /dev/fb1 /dev/tty6" to move virtual console number six over to the second monitor. Use Ctrl-Alt-F6 to move over to that console and see that it does indeed show up on the second monitor."
[JimD] It's serendipitous that yhou should ask this question since I just came across a slightly dated article on how to do this:
http://www.linuxplanet.com/linuxplanet/tutorials/3100/1
Some of the steps in this process might be unnecessary in newer versions of XFree86 and the kernel. I can't tell you for sure as I haven't tried this. Heck, I haven't even gotten around to configuring a dual headed Xinerama system, yet.
There's More Than One Way To Detect ItFrom Joydeep Bakshi
Answered By Rick Moen, Dave Bechtel, Heather Stern
[Heather] All this is in response to last month's Help Wanted #1
1) kudzu is the DEFAULT H/W detection tool in RH & harddrake in MDK.
is there anything in debian?
[Rick] As usual, the Debian answer is "Sure, which ones do you want?"
- discover
- Hardware identification system (thank you, Progeny Systems, Inc.), for various PCI, PCMCIA, and USB devices.
[Dave]
apt-get update; apt-get install discover
(' apt-cache search discover ': )
discover - hardware identification system
discover-data - hardware lists for libdiscover1
libdiscover-dev - hardware identification library development files
libdiscover1 - hardware identification library
[Heather] Worthwhile to also search on the words "detect" and "config" and "cfg" since many of the configurators or their helper apps have those words in their package names.
discover only detects the h/w, but kudzu does one task extra that is it also
configure the h/w. do u have any info. whether the latest version of discover
do this auto-config. ? ( I am in debian 3.0).
[Rick] I'm unclear on what you mean by "configure the hardware". Discover scans the PCI, USB, IDE, PCMCIA, and SCSI buses. (Optionally, it scans ISA devices, and the parallel and serial ports.) It looks (by default) for all of these hardware types at boot time: bridge cdrom disk ethernet ide scsi sound usb video. Based on those probes, it does appropriate insmods and resetting of some device symlinks.
What problem are you trying to solve?
[Heather] For many people there's a bit of a difference between "the machine notices the hardware" and "my apps which want to use a given piece of hardware work without me having to touch them." In fact, finishing up the magic that makes the second part happen is the province of various apps that help configure XFree86 (SaX2/SuSE, Xconfigurator/RedHat, XF86Setup and their kindred) - some of which are better at having that magical "just works" feeling than others. Others are surely called on by the fancier installation systems too. Thus Rick has a considerable list below.
For ide, scsi, cdrom it all seems rather simple; either the drives work, or they don't. I haven't seen any distros auto-detect that I have a cd burner and do any extra work for that, though.
PCMCIA and USB are both environments that are well aware of the hot swapping uses they're put to - generally once your cardbus bridge and usb hub types are detected everything else goes well. or your device is too new to have a driver for its part of the puzzle. You must load up (or have automatically loaded by runlevels) the userland half of the sypport, though. (package names: pcmcia-cs, usbmgr)
There are apps to configure X and one can hope that svgalib "just works" on its own since it has some effort to video detection built-in. If you don't like what you get, try using a framebuffer enabled kernel, then tell X to use the framebuffer device - slower, but darn near guaranteed to work. svgalib will spot your framebuffer and use it. My favorite svgalib app is zgv, and there are some games that use it too.
I know of no app which is sufficiently telepathic to decide what your network addresses should be, the first time through. However, if you're a mobile user, there are a number of apps that you can train to look for your few favorite hosting gateways and configure the rest magically from there, using data you gave them ahead of time. PCMCIA schemes can also be used to handle this.
[Rick]
- kudzu, kudzu-vesa
- Hardware-probing tool (thank you, Red Hat Software, Inc.) intended to be run at boot time. Requires hwdata package. kudzu-vesa is the VBE/DDC stuff for autodetecting monitor characteristics.
- mdetect
- Mouse device autodetection tool. If present, it will be used to aid XFree86 configuration tools.
- printtool
- Autodetection of printers and PPD support, via an enhanced version of Red Hat Software's Tk-based printtool. Requires the pconf-detect command-line utility for detecting parallel-port, USB, and network-connected printers (which can be installed separately as package pconf-detect).
- read-edid
- Hardware information-gathering tool for VESA PnP monitors. If present, it will be used to aid XFree86 configuration tools.
[Heather] Used alone, it's an extremely weird way to ask the monitor what its preferred modelines are. Provided your monitor is bright enough to respond with an EDID block, the results can then be used to prepare an optimum X configuration. I say "be used" for this purpose because the results are very raw and you really want one of the apps that configure X to deal with this headache for you. Trust me - I've used it directly a few times.
[Rick]
- sndconfig
- Sound configuration (thank you, Red Hat Software, Inc.), using isapnp detection. Requires kernel with OSS sound modules. Uses kudzu, aumix, and sox.
[Dave] BTW, Knoppix also has excellent detection, and is also free and Debian-based: ftp://ftp.uni-kl.de/pub/linux/knoppix
[Heather] Personally I found his sound configuration to be the best I've encountered; SuSE does a pretty good job if your card is supported under ALSA.
When you decide to roll your own kernel, it's critical to doublecheck which of the three available methods for sound setup you're using, so that you can compile the right modules in - ALSA, OSS, or kernel-native drivers. Debian's make-kpkg facility makes keeping extra packages that depend directly on kernel parts - like pcmcia and alsa - able to keep in sync with your customizations, by making it easy for you to prepare the modules .deb file to go with your new kernel.
[Rick]
- hotplug
- USB/PCI device hotplugging support, and network autoconfig.
- nictools-nopci
- Diagnostic and setup tools for many non-PCI ethernet cards
- nictools-pci
- Diagnostic and setup tools for many PCI ethernet cards.
- mii-diag
- "A little tool to manipulate network cards" (examines and sets the MII registers of network cards).
2) I have installed kudzu in debian 3.0 , but it is not running as a
service. it needs to execute the command kudzu manually.
[Rick] No, pretty much the same thing in both cases. You're just used to seeing it run automatically via a System V init script in Red Hat. If you'd like it to be done likewise in Debian, copy /etc/init.d/skeleton to /etc/init.d/kudzu and modify it to do kudzu stuff. Then, use update-rc.d to populate the /etc/rc?.d/ runlevel directories.
Finally the exact solution. I was searching 4 this looong.
Rick, can't understand howto give u thanks.
take care.
moreover it couldn't detect my epson C21SX printer. but under MDK 9.0
kudzu detected the printer .
[Heather] Perhaps it helpfully informed you what it used to get the printer going? Many of the rpm based systems are using CUPS as their print spooler; it's a little smoother under cups than some of its competitors, to have it auto-configure printers by determining what weird driver they need under the hood. My own fancy Epson color printer needed gimp-print, which I used the linuxprinting.org "foomatic" entries to link into my boring little lpd environment happily. Some printers are supported directly by ghostscript... which you will need anyway, since many GUI apps produce postscript within their "print" or "print to file" features.
[Rick] Would that be an Epson Stylus C21SX? I can't find anything quite like that name listed at:
http://www.linuxprinting.org/printer_list.cgi?make=Epson
I would guess this must be a really new, low-end inkjet printer.
The version of kudzu (and hwdata) you have in Debian's stable branch (3.0) is probably a bit old. That's an inherent part of what you always get on the stable branch. If you want versions that are a bit closer to the cutting edge, you might want to switch to the "testing" branch, which is currently the one named "sarge". To do that, edit /etc/apt/sources.list like this:
deb http://http.us.debian.org/debian testing main contrib non-free deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free deb http://security.debian.org testing/updates main contrib non-free deb http://security.debian.org stable/updates main contrib non-free
Then, do "apt-get update && apt-get dist-upgrade". Hilarity ensues.![]()
(OK, I'll be nice: This takes you off Debian-stable and onto a branch with a lower commitment on behalf the Debian project to keep everything rock-solid, let alone security-updated. But you might like it.)
a nice discussion. thanks a lot.
[Rick] All of those information items are now in my cumulative Debian Tips collection, http://linuxmafia.com/debian/tips . (Pardon the dust.)
ok, thanks a lot. u have clarified evrything very well. now I must not have
any prob. regarding auto-detection in deb..
Great site !
[Heather] For anyone looking at this and thinking "Oy, I don't already have debian installed, can I avoid this headache?" - Yes, you probably can, for a price. While debian users from both commercial and homegrown computing environments alike get the great upgrade system, this is where getting one of the commercial variants of Debian can be worth the bucks for some people. Note that commercial distros usually come with a bunch of software which is definitely not free - and not legal to copy for your pals. How easy they make it to seperate out what you could freely tweak, rewrite, or give away varies widely.
- Libranet
- http://www.libranet.com
Canadian company, text based installer based on but just a little more tuned up than the generic debian one. Installs about a 600 MB "base" that's very usable then offers to add some worthwhile software kits on your first boot.
- Xandros
- http://www.xandros.com
The current bearer of the torch that Corel Linux first lit. Reviews about it sing its newbie-friendly praises.
- Lindows
- http://www.lindows.com
Mostly arriving pre-installed in really cheap Linux machines near you in stores that you just wouldn't think of as computer shops. But it runs MSwin software out of the box too.
- Progeny
- http://www.progenylinux.com
More into offering professional services for your corporate or perhaps even industrial Linux needs than particularly a distribution anymore, they committed their installer program to the auspices of the Debian project. So it should be possible for someone to whip up install discs that use that instead of the usual geek-friendly textmenu installer.
If you find any old Corel Linux or Stormix discs lying around, they'll make an okay installer, provided your video card setup is old enough for them to deal with. After they succeed you'll want to poke around, see what they autodetected, takes some notes, then upgrade the poor beasties to current Debian.
In a slightly less commercial vein,
- Knoppix
- http://www.knopper.net/knoppix
[Base page in German, multiple languages available] while not strictly designed as a distro for people to install, has great hardware detection in its own accord, and a crude installer program available. At minimum, you can boot from its CD, play around a bit, and take notes now that it has detected and configured itself. A runs-from-CD distribution. If you can't take the hit from downloading a 700 MB CD all at once - it takes hours and hours on my link, and I'm faster than most modems - he lists a few places that will sell a recent disc and ship it to you.
- Good-Day GNU-Linux
- http://ggl.good-day.net
LWN's pointer went stale but this is where it moved to; the company produced sylpheed and has some interesting things bundled in this. It also looks like they preload notebooks, but I can't read japanese to tell you more.
And of course the usual Debian installer discs.
Anytime you can ask a manufacturer to preload linux - even if you plan to replace it with another flavor - let them. You will tell them that you're a Linux and not a Windows user, and you'll get to look at the preconfiguration they put in. If they had to write any custom drivers, you can preserve them for your new installation. Likewise whatever time they put into the config files.
There's a stack more at the LWN Distributions page (http://old.lwn.net/Distributions) if you search on the word Debian, although many are localize, some are specialty distros, and a few are based on older forms of the distro.
Linux Kernel Maintainability: Bees Can't FlyFrom Beth Richardson
Answered By Jim Dennis, Jason Creigton, Benjamin A. Okopnik, Kapil Hari Paranjape, Dan Wilder, Pradeep Padala, Heather Stern
Hello,
I am a Linux fan and user (although a newbie). Recently I read the paper entitled "Maintainability of the Linux Kernel" (http://www.isse.gmu.edu/faculty/ofut/rsrch/papers/linux-maint.pdf) in a course I am enrolled in at Colorado State University. The paper is essentially saying that the Linux kernel is growing linearly, but that common coupling (if you are like me and cannot remember what kind of coupling is what - think global variables here.) is increasing at an exponential rate. Side note, for what it is worth - the paper was published in what I have been told is one of the "most respected" software journals.
I have searched around on the web and have been unable to find any kind of a reply to this paper from a knowledgeable Linux supporter. I would be very interested in hearing the viewpoint from the "other side" of this issue!
Thanks for your time, Beth Richardson
[JimD] Basically it sounds like they're trying to prove that bees can't fly.
(Traditional aerodynamic theories and the Bernoulli principle can't be used to explain how bees and houseflies can remain aloft; this is actually proof of some limitations in those theories. In reality the weight of a bee or a fly relative to air density means that insect can do something a little closer to "swimming" through the air --- their mass makes air relatively viscous to them. Traditional aerodynamic formulae are written to cover the case where the mass of the aircraft is so high vs. air density that some factors can be ignored.).
I glanced at the article, which is written in typically opaque academic style. In other words, it's hard to read. I'll admit that I didn't have the time to analyze (decipher) it; and I don't have the stature of any of these researchers. However, you've asked me, so I'll give my unqualified opinion.
Basically they're predicting that maintainance of the Linux kernel will grow increasing difficult over time because a large number of new developments (modules, device drivers, etc) are "coupled" (depend on) a core set of global variables.
[Jason]
Wouldn't this affect any OS? I view modules/device drives depending on a core
as a good thing, when compared to the alterative, which is depending on a wide
range on varibles. (Or perheps the writers have a different idea in mind. But
what other alterative to depending a core would there be other than depending on
a lot of things?)
[Ben] You said it yourself further down; "micro-kernel". It seems to be the favorite rant of the ivory-tower CS academic (by their maunderings shall ye know them...), although proof of this world-shattering marvel seems to be long in coming. Hurd's Mach kernel's been out, what, a year and more?
[Kapil] Here comes a Hurd of skeletons out of my closet! Being a very marginal Hurd hacker myself, I couldn't let some of the remarks about the Hurd pass. Most of the things below have been better written of elsewhere by more competent people (the Hurd Wiki for example, http://hurd.gnufans.org) but here goes anyway...
The Mach micro-kernel is what the Hurd runs on the top of. In some ways Hurd/Mach is more like Apache/Linux. Mach is not a part of the Hurd. The newer Hurd runs over the top of a version of Mach built using Utah's "oskit". Others have run the "Hurd" over "L-4" and other micro-kernels.
The lack of hardware and other support in the existing micro-kernels is certainly one of things that is holding back the common acceptance of the Hurd. (For example neither "mach" nor "oskit" have support for my video card--i810--for which support came late in the Linux 2.2 series).
Now, if only Linux was written in a sufficiently "de-coupled" way to allow the stripping away of the file-system and execution system, we would have a good micro-kernel already! The way things are, the "oskit" guys are perenially playing catch-up to incorporate Linux kernel drivers. Since these drivers are not sufficiently de-coupled they are harder to incorporate.
[JimD] This suggests that the programming models are too divergent in some ways. For each class of device there are a small number of operations (fops, bops, ioctl()s) that have to be supported (open, seek, close, read, write, etc). There are relatively few interactions with the rest of the kernel for most of this (which is why simple device driver coding is in a different class from other forms of kernel hacking).
The hardest part of device driver coding is getting enough information from a vendor to actually implement each required operation. In some cases there are significant complications for some very complex devices (particularly in the case of video drivers; which, under Linux sans framebuffer drivers, are often implemented in user space by XFree86.)
It's hard to imagine that any one device driver would be that difficult to port from Linux to any other reasonable OS. Of course the fact that there are THOUSANDS of device drivers and variants within each device driver does make it more difficult. It suggestst the HURD needs thousands (or at least hundreds) of people working on the porting. Obiviously, if five hundred HURD hackers could crank out a device driver every 2 months for about a year --- they'd probably be caught up with Linux device driver support.
Of course I've only written one device driver for Linux (and that was a dirt simple watchdog driver NAS system motherboard) and helped on a couple more (MTD/flash drivers, same hardware). It's not so much "writing a driver" as plugging a few new values into someone else's driver, and reworking a few bits here or there.
One wonders if many device drivers could be consolidated into some form of very clever table-driven code. (Undoubtedly what the UDDI movement of a few years ago was trying to foist on everyone).
[Kapil] One the other side Linux "interferes too much" with user processes making Hurd/Linux quite hard and probably impossible---but one can dream...
[JimD] Linux was running on Mach (mkLinux) about 5 years ago. I seem to recall that someone was running a port of Linux (or mkLinux) on an L4 microkernel about 4 years ago (on a PA RISC system if I recall correctly).
It's still not HURD/Linux --- but, as you say, it could (eventually) be.
Linux isn't really monolithic, but it certainly isn't a microkernel. This bothers purists; but it works.
Future releases of Linux might focus considerably more on restructing the code, providing greater modularity and massively increasing the number of build-time configuration options. Normal users (server and workstation) don't want more kernel configuration options. However, embedded systems and hardware engineers (especially for the big NUMA machines and clustering system) need them. So the toolchain and build environment for the Linux kernel will have to be refined.
As for features we don't have yet (in the mainstream Linux kernel): translucent/overlay/union filesystems, transparent process checkpoint and restore, true swapping (in addition to paging, might come naturally out of checkpointing), network console, SSI (system system image) HA clustering (something like VAX clusters would be nice from what I hear), and the crashdump, interactive debuggers, trace toolkit, dprobes and other stuff that was "left out" of 2.5 in the later stages before the feature freeze last year.
I'm sure there are things I'm forgetting and others that I've never even thought of. With all the journaling, EAs and ACLs, and the LSM hooks and various MAC (mandatory access contol) mechanisms in LIDS, SELinux, LOMAC, RSBAC and other patches, we aren't missing much that was ever available in other forms of UNIX or other server operating systems. (The new IPSec and crypto code will also need considerable refinement).
After that, maybe Linux really will settle down to maintenance; to optimization, restructuring, consolidation, and dead code removal. Linus will might find that stuff terminally boring and move on to some new project.
[JimD]
What else is there to add the kernel?
[Pradeep] Like my advisor says, Every thing that is never thought before.
Lot of people feel the same about systems research. I am planning to specialize in systems. What do you guys think about systems research? Is is as pessimistic as Rob Pike sounds? http://www.cs.bell-labs.com/who/rob/utah2000.pdf
[Dan] Some would say, "streams". (he ducks!)
[JimD] LiS is there for those that really need it. It'll probably never be in the mainstream kernel. However, I envision something a like a cross between the Debian APT system and the FreeBSD ports system (or LNX-BBCs Gar or Gentoo's source/package systems) for the kernel.
In this case some niche, non-mainstream kernel patches would not be included in Linus' tarball, but hooks would be found in a vendor augmented kbuild (and/or Makefile collection) that could present options for many additional patches (like the FOLK/WOLK {Fully,Working} OverLoaded Kernel). If you selected any of these enhancements then the appropriate set of patches would be automatically fetched and applied, and any submenus to the configuration dialog would appear.
Such a system would have the benefit of allowing Linus to keep working exactly as he does now, keeping pristine kernels, while making it vastly easier for sysadmins and developers to incorporate those patches that they want to try.
If it was done right it would be part of UnitedLinux, Red Hat, and Debian. There would be a small independent group that would maintain the augmented build system.
The biggest technical hurdle would be patch ordering. In some cases portions of some patches might have to be consolidated into one or more patches that exist solely to prevent unintended dependency loops. We see this among Debian GNU/Linux patches fairly often --- though those are binary package dependencies rather than source code patch dependencies. We'd never want a case where you had to include LiS patches because the patch maintainer applied it first in his/her sequence and one of its changes became the context for another patch --- some patch that didn't functionally depend on LiS but only seemed to for context.
I think something like this was part of Eric S. Raymond's vision for his ill-fated CML2. However, ESR's work wasn't in vain; a kbuild system in C was written and will be refined over time. Eventually it may develop into something with the same features that he wanted to see (though it will take longer).
As examples of more radical changes that some niches might need or want in their kernels: there used to be a suite of 'ps' utilities that worked without needing /proc. The traditional ps utils worked by walking through /dev/kmem traversing a couple of data structures there. I even remember seeing another "devps" suite, which provided a simple device interface alternative to proc. The purpose of this was to allow deeply embedded, tightly memory constrained kernels to work in a smaller footprint. These run applications that have little or no need for some of the introspection that is provided by /proc trees, and have only the most minimal process control needs. It may be that /proc has become so interwoven into the Linux internals that a kernel simply can't be built with out it (that the build option simply affects whether /proc is visible from userspace). These embedded systems engineers might still want to introduce a fair number of #defines to optionally trim out large parts of /proc. Another example is the patch I read about that effectively refines the printk macro as a C comment; thus making a megabyte (uncompressed) of prink()' calls disappear in the pre-processor pass.
These are things that normal users (general purpose servers and workstations) should NOT mess with. Things that would break a variety of general purpose programs. However, they can be vital to some niches. I doubt we'll ever see Linux compete with eCOS on the low end; but having a healthy overlap would be good.
[JimD]
Are there any major 32 or 64
bit processors to which Linux has not been ported?
[Ben] I don't mean to denigrate the effort of the folks that wrote Hurd, but... so what? Linux serenely rolls on (though how something as horrible, antiquated, and useless as a monolithic kernel can hold its head up given the existence of The One True Kernel is a puzzle), and cooked spaghetti still sticks to the ceiling. All is (amazingly) still right with the world.
[Jason] You know, every time I get to thinking about what the Linux kernel should have, I find out it's in 2.5. Really. I was thinking, Linux is great but it needs better security, more than just standard linux permissions. Then I look at 2.5: Linux Security Modules. Well, we need a generic was to assign attributes to files, other then the permission bits. 2.5 has extened attribues (name:value pairs at the inode level) and extended POSIX ACLs.
[Ben] That's the key, AFAIC; a 99% solution that's being worked on by thousands of people is miles better than a 100% solution that's still under development. It's one of the things I love most about Linux; the amazing roiling, boiling cauldron of creative ideas I see implemented in each new kernel and presented on Freshmeat.
The damn thing's alive, I tell ya.
[Kapil] What you are saying is true and is (according to me) the reason why people will be running the Hurd a few years from now!
The point is that many features of micro-kernels (such as a user-process running it's own filesystem and execution system a la user-mode-linux) are becoming features of Linux. At some point folks will say "Wait a minute! I'm only using the (micro) kernel part of Linux as root. Why don't I move all the other stuff into user space?" At this point they will be running the Hurd/Linux or something like it.
Think of the situation in 89-91 when folks on DOS or Minix were jumping through hoops in order to make their boxes run gcc and emacs. Suddenly, the hoops could be removed because of Linux. The same way the "coupled" parts of Linux are preventing some people from doing things they would like to do with their system. As more people are obstructed by those parts---voila Linux becomes (or gives way to) a micro-kernel based system.
Didn't someone say "... and the state shall wither away".
[Heather] Yes, but it's been said:
"Do not confuse the assignment of blame with the solution to the problem. In space, it is far more vital to fix your air leak than to find the man with the pin." - Fiona L. Zimmer
Problems as experienced by sysadmins and users are not solely the fault of designs or languages selected to write our code in.
...and also:
"Established technology tends to persist in the face of new technology." - G. Blaauw, one of the designers of System 360
...not coincidentally, at least in our world, likely to persist inside "new" technology, as well, possibly in the form of "intuitive" keystrokes and "standard" protocols which would not be the results if designs were started fresh. Of course truly fresh implementations take a while to complete, which brings us back to the case of the partially completed Hurd environment very neatly.
[JimD] Thus any change to the core requires an explosion of changes to all the modules which depended upon it. They are correct (to a degree). However they gloss over a few points (lying with statistics).
First point: no one said that maintaining and developing kernels should be easy. It is recognized as one of the most difficult undertakings in programming (whether it's an operating system kernel or an RDBMS "engine" --- kernel). "Difficult" is subjective. It falls far short of "impossible."
Second point: They accept it as already proven that "common" coupling leads to increasing numbers of regression faults (giving references to other documents that allege to prove this) and then they provide metrics about what they are calling common coupling. Nowhere do they give an example of one variable that is "common coupled" and explain how different things are coupled to it. Nor do they show an example of how the kernel might be "restructured with common coupling reduced to a bare minimum" (p.13).
So, it's a research paper that was funded by the NSF (National Science Foundation). I'm sure the authors got good grades on it. However, like too much academic "work" it is of little consequence to the rest of us. They fail to show a practical alternative and fail to enlighten us.
Mostly this paper sounds like the periodic whining that used to come up on the kernel mailing list: "Linux should be re-written in C++ and should be based on an object-oriented design." The usual response amounts to: go to it; come back when you want to show us a working prototype.
[Jason]
Couldn't parts of the kernel be written in C, and others in C++? (okay,
technically it would probably all be C++ if such a shift did occur, but
you can write C in a C++ compiler just fine. Right? Or maybe I just don't
know what I'm talking about.)
[Pradeep] There are many view points to this. But why would you want to rewrite parts of it in C++?
Popular answer is: C++ is object-oriented, it has polymorphism, inheritance etc. Umm, I can do all that in C and kernel folks have used those methods extensively. The function pointers, gotos may not be as clean as real virtual functions and exception handling. But those C++ features come with a price. The compilers haven't progressed enough to deliver the performance equivalent to hand-written C code.
[Dan] At one point, oh, maybe it was in the 1.3 kernel days, Linus proposed moving kernel development to C++.
The developer community roundly shot down the idea. What you say about C++ compilers was true in spades with respect to the g++ of those days.
[Pradeep] What is the status of g++ today? I still see a performance hit when I compile my C programs with g++. Compilation time is also a major factor. g++ takes lot of time to compile especially with templates.
[JimD] I'm sure that the authors would argue that "better programming and design techniques" (undoubtedly on their aggenda for their next NSF grant proposal) would result in less of this "common" coupling and more of the "elite" coupling. (Personally I have no problem coupling with commoners --- just do it safely!)
As for writing "parts" of Linux in C++ --- there is the rather major issue of identifier mangling. In order to support polymorphism and especially function overloading and over-riding, C++ compilers have to modify the identifiers in their symbol tables in ways that C compiler never have to do. As a consequence of this it is very difficult to link C and C++ modules. Remember, loadable modules in Linux are linkable .o files. It just so happens that they are dynmically loaded (a little like some .so files in user space, through the dlopen() API --- but different because this is kernel space and you can't use dlopen() or anything like it).
I can only guess about how bad this issue would be but a quick perusal of the first C++ FAQ that could find on the topic:
http://users.utu.fi/sisasa/oasis/cppfaq/mixing-c-and-cpp.html
... doesn't sound promising.
[JimD] I'm also disappointed that the only quotations in this paper were the ones of Ken Thompson claiming that Linux will "not be very successful in the long run" (repeated TWICE in their 15 page paper) and that Linux is less reliable (in his experience) than MS Windows.
[Jason]
I'm reminded of a quote: "Linux is obsolete" -- Andrew Tanenbaum. He said this
in the (now) famous flame-war between himself and Linus Torvalds. His main
argument was the micro-kernels are better than monolithic kernels and thus Linux
was terribly outdated. (His other point was that linux wasn't portable.) BTW, I
plan to get my hands on some Debian/hurd (Or is that "GNU/hurd"?
) CDs so I
can see for myself what the fuss over micro-kernels is all about.
[JimD] Run MacOS X --- it's a BSD 4.4 personality over a Mach microkernel.
(And is more mature than HURD --- in part because a significant amount of the underpinnings of MacOS X are NeXT Step which was first released in the late '80s even before Linux).
[Ben] To quote Debian's Hurd page,
|
............... The Hurd is under active development, but does not provide the performance and stability you would expect from a production system. Also, only about every second Debian package has been ported to the GNU/Hurd. There is a lot of work to do before we can make a release. ............... |
Do toss out a few bytes of info if you do download and install it. I'm not against micro-kernels at all; I'm just slightly annoyed by people whose credentials don't include the Hard Knocks U. screaming "Your kernel sucks! You should stab yourself with a plastic fork!" My approach is sorta like the one reported in c.o.l.: "Let's see the significant benefits."
[JimD] These were anecdotal comments in an press interview --- they were not intended to be delivered with scholastic rigor. I think it weakens the paper considerably (for reasons quite apart from my disagreement with the statements themselves).
What is "the Long run?" Unix is a hair over 30 years old. The entire field of electronic computing is about 50 or 60 years old. Linux is about 12 years old. Linux is still growing rapidly and probably won't peak in marketshare for at last 5 to 10 years. Thus Linux could easily last longer than proprietary forms of UNIX did. (This is not to say that Linux is the ultimate operating system. In 5 to 10 years there is likely to be an emerging contender like EROS (http://www.eros-os.org ) or something I've never heard of. In 15 to 20 years we might be discussing a paper that quotes Linus Torvalds as saying: "I've read some of the EROS code, and it's not going to be a success in the long run."
(We won't even get into the criteria for "success" in Ken Thompson's comment --- because I think that Linux' current status is already been a huge success by the standards of it's advocates and to the chagrin of it's detractors. By many accounts Linux is already more "successful" than UNIX --- having been installed on more systems than all UNIX predecessors combined --- an installation base that is only recently rivaled by MacOS X in the UNIX world)
routing to internet from home . Kernel 2.4From Jose Avalis
Answered By Faber Fedor, Jason Creighton, Benjamin A. Okopnik, John Karns
Hi guys and thanks in advance fro your time. I'm Joe From Toronto.
I have this scenario at home.
3 WS with Winxx
1 Linux redhat 7.3
1 DSL Connection (Bell / Sympatico)
I would like to use the linux machine as a router for the internal PC> Could you help me with that, please???
[Ben] OK, I'll give it a shot. You have read and followed the advice in the IP-Masquerade HOWTO, right? If not, it's always available at the Linux Documentation Project <http://www.linuxdoc.org>, or possibly on your own system under /usr/doc/HOWTO or /usr/share/doc/HOWTO.
The Linux Machine has 2 NIC eth0 (10.15.1.10 | 16 ) is connected
to the internal net (hub) , while the other ETH1 (10.16.1.10 | 16) is
connected to the DSL Modem.
[Ben] You have private IPs on both interfaces. Given a DSL modem on one of them, it would usually have an Internet-valid address, either one that you automatically get via DHCP or a static one that you get from your ISP (that's become unusual for non-commercial accounts.) Looks like you have a PPPoE setup - so you're not actually going to be hooking eth0 to eth1, but eth0 to ppp0.
as you can see in the following text, everything is Up and run and
I can access internet from the Linux machine.
[Jason] This may see like a stupid question, but do the internal PCs have valid internet address? (i.e., those outside the 10.*.*.*, 172.16.*.*-172.31.*.* or 192.168.*.* ranges) If they don't, you need to do IP masquerading. This is not all that hard, I could give a quick & dirty answer as to how to do it (Or you could look at the IP-Masquerading-HOWTO, for the long answer), but I'd like to know if that's your situation first. Yes, I am that lazy.
![]()
ifconfig says
See attached jose.ifconfig-before.txt
See attached jose.ping-before.txt
The problem is that when I try to access the internet from the internal lan. I can't access it.
[Ben] Yep, that's what it is. That MTU of 1492 is a good hint: that's the correct setting for PPPoE, and that's your only interface with a Net-valid IP.
[John] The adjusted MTU for PPPoE (from the usual 1500 to 1492) is necessary, but can cause problems with the other machines on the LAN unless they too are adjusted for MTU.
[Ben] Right - although not quite as bad as the gateway's MTU (that one can chase its own tail forever - looks like there's no connection!)
[John] I've been stuck with using PPPoE for about a month now, and have found the Roaring Penguin pkg (http://www.roaringpenguin.com) to work quite well, once it's configured. I seem to remember reading that it does the MTU adjustment internally, and alleviates the headache of having to adjust the rest of the machines on the LAN to use the PPPoE gateway (see the ifconfig output below).
[Ben] Oh, _sweet._ I'm not sure how you'd do that "internally", but I'm no network-programming guru, and that would save a bunch of headaches.
[John] Especially nice if one of the LAN nodes is a laptop that gets carried around to different LAN environments - would be a real PITA to have to reset the MTU all the time.
# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:40:F4:6D:AA:3F
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21257 errors:0 dropped:0 overruns:0 frame:0
TX packets:14201 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:4568502 (4.3 Mb) TX bytes:1093173 (1.0 Mb)
Interrupt:11 Base address:0xcc00
Then I just tacked on the firewall / masq script I've been using right along, with the only change being the external interface from eth0 to ppp0. PPPoE is also a freak in that the NIC that connects to the modem doesn't get an assigned IP.
[Ben] Yep, that's what got me thinking "PPPoE" in the first place. Two RFC-1918 addresses - huh? An MTU of 1492 for ppp0 and reasonably short ping times to the Net - oh.