
TAG 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! |
|
Article IdeaDear Answer Gang,
After 20 years with Microsoft, I see the revolution brewing on the horizon (at least I think I do). Assuming the role of Nortradamous, the movement promoted, sponsored, and pushed by Microsoft to institute subscription based software has prompted a revolution in the future. Being one of those people who has been making a living off of the computer industry for many years, becoming bilingual feels like I landed on Alpha Centauri <grin> Of course, I expected that jumping into the underlying mechanics of Linux would bring on lots of anxiety and frustrations. As the result, the thought that if I'm experiencing some difficult times, my customers would go out of their minds.
In the past when major transitions came about (i.e.., DOS & Windows 3.1 to Win 95), major publications produced issues with brief task oriented tips. I personally found these to be excellent and it got me up to speed quickly. I'm aware of the "How To's" but I would hardly classify them as "Tips." I believe the time is right to begin a section devoted to "Windows Defectors." The section should specifically address the typical daily activities of the Windows user and how to configure Linux to operate like Windows. If you would like, I have references to many of the Windows Tips that have been published since Win 95 hit the street as well as copies of the articles and issues in which they were published.
I believe that within the next two to three years, you will be inundated with so many defectors that they will become a power influence on your perspective. I am also aware that the traditional view of the Linux community would prefer to maintain as much distance as possible between themselves and Windoze, but take heart, there's a silver lining to that cloud. If I squint real hard, that lining may be platinum ... hard to tell from here.
It's pretty obvious that some in the Linux community already recognize the signs of this brewing revolution and have made great strides in Gnome and especially, KDE. I first began surveying the potential of Linux back in version 5.2 Redhat, then 7.2, and now 9.x. The Linux community certainly has been busy and come a long way (Redmond must be having fits). I look forward to the day when Adobe PhotoShop is available for Linux. I suspect that would be like winning a Grammy or Oscar.
The kinds of things to cover would be how to get the dynamic mounting of all drives to function like they do in Windows. Automatic unmounting when media is removed and remounted when media is inserted.
Later, Dalton Seymour
The staff here at LG had a mixed reaction...
I left the message intact above for reading convenience, though our conversation about it is below is in TAG style.
But what we want to know from you, dear readers, is whether you would like to see a column specifically for issues dealing with Windows analogies, or if you'd prefer to see them scattered into Two Cent Tips or The Answer Gang or as inidividual articles where most applicable. Should this fellow spin up his own great little site and have y'all who live in both worlds join the party? Tell us :D -- Heather
...and frustrations. As the result, the thought that if I'm experiencing some difficult times, my customers would go out of their minds.
[Thomas Adam] Hmmm, that is only because they have become too dependant on using one product, Microsoft.
I've seen people who only play in one desktop environment get lost in others without it being that particular beastie; the problem is singlemindedness, not who it comes from. -- Heather
...devoted to "Windows Defectors" ... If you like, I have references to many of the Windows Tips that have been published...
[Thomas Adam] Trying to do what you are suggesting, boiling down information into "tips", is not an easy thing to do.
%%%%% And thanks ever so much to you among the readers who send us boiled down Two Cent Tips! %%%%%%
No, but it could be a fun and worthwhile thing to try. Some of the tips found in MSwin's "tips" in the registry aren't all that short. -- Heather
[Thomas Adam] Windows has the advantage in that tips work, soley because there is only one "layer" to Windows -- only one GUI. Because Linux has many different "layers" in that sense, often trying to diagnose a problem and thus producing a tip, often requires intimate knowledge of the user's system and the underlying Hardware, etc.
I have to disagree. For one thing - I worked for Norton years ago, and even win3.1 had other managers available - HP had one, we had NDW, Compaqs shipped with this weird tabbed thing, and so on. There were a couple of shareware apps to hack what we X using folk would call the basic widget set, scrollbars, borders and so on.
For the modern era Windows you might look into LiteStep, or into KDE for Windows. (I'm not sure K for MSwin replaces the manager, but since the tech exists to do that I hope they do.) And some mini explorer I saw mentioned on a shareware site, whose name I forgot.
While it's true that a problem often has layers, a set of first things to try can still be good too. And, as I spent so many years in MSwin based tech support teaching others, Windows has those layers to dig through, too. The analogous tip may not end up resembling the first one much - but the analogous problem it's solving may be more similar than you think. -- Heather
We do have a "unifying" interface: the command line. The CLI, on the other hand, provides no hints to the uninitiated and is The Source Of All Goodness, where the real work of tweaking the system gets done... -- Ben
...the Linux community would prefer to maintain as much distance as possible between themselves and Windoze, but take heart, there's a silver lining to that cloud. If I squint real hard, that lining may be platinum.
You're restricting yourself to metals there. It'll be cotton candy and gemstones, and other things, because different people will take the fluffy silver lined cloud as a starting point and head in different directions from there. The goth kids who like darkness will figure out some way to improve the storminess without raining on everyone else's parade. And so on. -- Heather
Well, we've had this kind of discussion (or at least fairly similar to
it) here before, and it's not an uncommon topic. It usually comes from
the folks who are new to the Linux community, and unaware of how it (the
community/system/flow of information/etc.) works. Believe me, none of us
have anything against educating ex-Wind0ws users about Linux... but we
can't do it by using the Micr0s0ft model. Nor - with very few exceptions
that a) make good sense, b) can transfer to _our_ model, and c) are Free
(and usually free as well) - would we want to.
}}}}
People who don't want to tweak their thoughts to the do-it-yourselfer model will wait until they like the Linux boxen they see on the shelf in WalMart.
The models aren't directly allergic to each other, they just kind of interlace and don't understand each other. -- Heather
[Thomas Adam] Indeed, Ben. Many people who I talk to about making "the switch" are often put off by the black-and-white terminal screen. They cannot seem to realise that despite this, there are increasing GUI's out there that offer the functionality that Windows user's crave: control from the GUI.
There are. But the fact that they at present work on underlying text files, means when the GUIs break down - either don't work, or prevent someone from getting at the unusual control combination the GUI-tool's author didn't think of - then they can be dealt with "under the hood". Short of hand hacking registry entries there's no close equivalent in Windows. -- Heather
Mind you, there is at least one good idea in what you say - in fact, I was already thinking about doing something like this on my own, although the details are different. I think that a "Basic Linux tips" site would be a useful thing... but I would also say that it should definitely be a separate entity from the Linux Gazette. The main reason is that it would be a toe-in-the-water type of resource - for people who had never used Linux before - while the LG readership, at least the folks who contact us on a regular basis (and, as always, in my estimate) are beyond that point. In fact, where I see LG positioned is - to draw a parallel - at the point to which I try to get my students in the various intro programming classes I teach: enough knowledge to know what questions to ask. That is a key turning point in the knowledge curve, the "knee" at which that curve breaks over and starts accelerating. With Linux, that point is not too far away from the origin; however, it is not at the origin, which is the point you're talking about.
Personally, I believe that Knoppix <http://knoppix.org/> is just about the best intro to Linux that a new "defector" can have. With even a little bit of prior computer experience, the average Joe (or Joettecan be surfing, sending e-mail, and using a word processor just a couple of minutes after firing it up. I believe that it's much better to get someone _doing_ and then nailing down the specifics than trying to teach the technical detail without any referent (my brain works OK in both of those scenarios, but in my experience as a teacher I find that most folks do far better with the former approach.) -- Ben
...much better to get someone doing and then nailing down the specifics...
Yep -- I'll second that!
"Joelle" let's say![]()
Heh. I just ran yet another internet lounge, mostly running Knoppix, and I can tell that most of the "I'm lost" kind of questions were not as much about "this isn't windows!" as "uh, where's a web browser?" or where was the chat thingy. -- Heather
I look forward to the day when Adobe PhotoShop is available for Linux. I suspect that would be like winning a Grammy or Oscar.
<Smile> I suggest you take a good look at The GIMP (Gnu Image Manipulation Program) and the "Grokking the Gimp" book available free on the net and as a Linux package ("grokking-the-gimp" under Debian.) Photoshop can't even compete, although they've made some nice improvements in the recent years. As an aside, I've been using The GIMP for several years, recently got into the above manual, and have been shocked, re-shocked, and triple-shocked by how much flexibility, how huge a variety of tools, and how much RAW POWER lies hidden behind that "simple" little interface (and that I've just passed by, unknowingly, all these years.) I wouldn't go back to using Photoshop for anything less than large amounts of money, and would still use the GIMP for my own graphical editing. -- Ben
IIRC, Michael Hammel, who used to write "The Graphics Muse" is extensively helping the promotion of GIMP. He writes some columns in a local Linux magazine here in England that I saw recently.
Yeah, well, if you bump into him tell him I'm pretty fond of it nowadays.
Photoshop has all these cool extra filter thingies you can buy in the store. I'm not sure that Kai Power Tools is the only package. Its strengths are rather different from the GIMP but I wouldn't say "can't compete". GIMP began aiming in Photoshop's direction, but the people who really use it took it to other places. So if Kai starts selling Kai's Power GIMP Fu, then we'll be winning the Oscar.
See also a Two Cent Tip about CMYK for the GIMP in this issue, thx Ben :D -- Heather
external bootinghi i am in terested in bying an external harddisk and was wondering if i could install linux on that and windows xp on my internal one then dule boot as windose xp as default Thanks!
We get dual boot questions all the time, of different sorts. Would someone out there, who is a real experimenter in dual or multiple booting, write us a nice juicy article using a bunch of the tips and techniques that are obviously out there? I mean, sure, we can keep pointing folks to the howto's and the TAG Knowledgebase until we turn into signposts. But having a real, got my grubby hands on it example to walk through, perhaps including why you're such an experimenter, would... make linux a little more fun ! -- Heather
sendmail ignores MX recordHi,
i have sendmail v 8.8.7 running on a RedHat 7.2 box. A few days ago I downgraded sendmail as I have several other boxes running on that version (by the way, they work perfectly).
Now, when I try to send mails to anywhere else but local accounts, the only way I can do this is via "sendmail -v User@Domain". If I use mail or any other mail- program or even "sendmail user@domain", sendmail does not deliver the mail but prints the following message into /var/log/maillog:
"Jul 15 16:53:00 redhat-box sendmail[19121]: QAA19121: from=root, size=37, class=0, pri=30037, nrcpts=1, msgid=<20030715145 3.QAA19121@redhat- box.mydomain>, relay=root@localhost Jul 15 16:53:00 redhat-box sendmail[19123]: QAA19121: to=User@Domain, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, relay=Domain., stat=Deferred: Name server: Domain.: host name lookup failure".
Instead of using the correct relay it uses the domain I want to send my mail to as a relay.
The weird thing is that as well "sendmail -v" as "sendmail -bt" with /mx entered resolve the MX record correctly.
Another weird thing is that a DNS-query is also done by my redhat-box when I try to use "sendmail User@Domain". It seems that in this case sendmail retrieves the same info from the DNS but stops processing it correctly somewhere between my attempt and the actual delivery.
After several days of debugging and searching forums I don't have any clue what sendmail wants to tell me here. I would be really grateful (and impressed) if anyone can help me with this.
Thanks in advance.
And.... you're the next contestant on "Stump The Answer Gang"Just kidding. Hey folks, if any of you out there know what he should look into next, let us know (and don't forget to cc him too). Or if you can write up a good fun article about Troubleshooting Sendmail For The Dazed And Bemused - that'd be great. We know, there's a lot of books about sendmail, but that's why we're looking for something a little smaller. Remember it should be fun and take a look at our article submission guidelines. -- Heather
Perl/Tk GUI BuilderHey Gang,
Does anyone know of a Perl/Tk GUI builder? The only things I've found on Google are specperl and Guido, neither of which are supported any longer. Specperl is okay, but I've got to make so many changes to the generated code that it would be a lot of work if I needed to make changes to the GUI (and I do!).
Even a commercial app would be fine (from what I've seen, most of ActiveState's stuff doesn't run under Linux).
Do Perl/Tk people really build the interfaces by hand still? That can get pretty tedious...
Ok readers, now's your chance. Show us where the cool toys are, or put together an article about your TK hacking plans in perl that shows how you're having some fun with it. Either that, or maybe someone out there can rescue these benighted apps-- Heather
How to run chat with several phone numbers .I need to create a chat file that would run with several phone numbers, if phonenum1 is busy then go to phonenum2, and so on. I also would like to add the phone numbers dynamically because sometimes we need to dial out with long distance and need to add either the outside line number 9. Since these requirements vary, is there a way to use variables that can be passed to the chat script ? Thanks.
Joao Coelho
We're looking for a noble reader who really knows how to make computers chat. For those who haven't caught on, a chat script is used to tell the pppd setup how to complete the connection. Usually this is from a small system to their ISP, but just plain peering can be done too.
I think if it were me I'd use wvdial as a front end...
PPP experts, drop us a note if you can help out here. -- Heather
BiDi Problems in WINE + SMARTDRAW
#sorry about my english... i'ved learned that by myself.. so ..
# U can make some modifications < of course.. it's gpl..> in my english
mistakes
So I did, just a little, though usually we leave questions alone so people have a sense of how the querent meant things-- Heather
Hiya guys..
I have a problem ( d' aah)
I've tried to use SmartDraw under wine.. and then.. after I configure everything.. It works! At least, I think that, when I see SmarrtDraw starting.. showing the initial WELCOME.. etc.. but.. when he tries to show me the initial screen < to chose the objects of my diagram> BUMMER! My wine DIES.
my log is so big.. and every thing happens about BiDi...
#] warn:font:GetCharacterPlacementW The BiDi algorythm doesn't conform to Windows'
And then.. BiDi throws a lot of junk < i suppose> in my memory causing some HEAPS Faults:.
#] warn:heap:HEAP_IsRealArena Heap 0x40db0000: block 0x408acf is not inside heap
there's not an upgrade for BiDi available.. and.. since November 22.. BiDi has been going crazy... with some programs that request some kind of.. font.. i don't know...
The HEAP Faults problem.. I solved myself making a bigger "X:/temp" and includding a new path for junk.. but.. WINE couldn't pass through BiDi, when it get a crash.. cause the BiDi NEVER stops to send some.. THING. < i don't know what either.> to the memory.. that fills up.. whatever is your /temp size! < mine is 2 G!>
I just don't know what to do! I'm really really lost.. and.. I need to make wine work... it's not for the program itself.. it's for the HONOR! AHUuhauahh
DO you guys know ANYTHING about that Suddenly Crashing?!? Or.. incompatibility ? Or whatever you call it... ...
Tnkx so much for reading my crappy email...
PS:. .. HEEEEEELP!
Daniel Carneiro do Nascimento
Squid and FTPHi there,
I use squid as a proxy server (default configuration) and it seems that i can't connect to ftp sites through it. Do I have to do anything?
Nickos, Greece
It appears that this is an FAQ in the land of Squid, number 12.17 -- "Can I make my regular FTP clients use a Squid cache?"
Nope, its not possible. Squid only accepts HTTP requests. It speaks FTP on the server-side, but not on the client-side.
The very cool wget will download FTP URLs via Squid (and probably any other proxy cache).
However, it would be fun to have an article about somebody using Squid and/or other site caching software in powerful ways to make their site's view of the web more fun. There are a bunch of add-ons at Freshmeat for it, so I'm sure someone out there has a great example for us to follow. Don't forget to read our author submission guidelines. -- Heather
create new lilo boot loader - on 2nd driveHi people, I have a problem......
I'm actually trying to mirror the hard disks using RAID 1 in Red Hat 9.It can work perfectly but the bug is that i can only boot up the first hard disk, i suppose lilo is stored as th MBR in it. The second hard disk during booting up, shows LI and i boot it using a bootup diskette instead. I'm wondering how to implement lilo in the second HDD in such a way that it auto boots up just like the 1st HDD.Is it possible?
Is it true that only 1 MBR could be used will it work on 2 MBR in 2 respective hard disks?
I visited the Boot+Raid+Root+ Lilo How to documentation: & i tried this method to boot up second HDD..but there's error
it is known as a raid LILO config file pair that I implemented:
See attached geraldine.lilo.conf.hda.txt
I created this 2 lilo configuration file but not too sure whether is eing read anot because i still have a current default lilo file /etc/lilo.conf
See attached geraldine.default.etc-lilo.conf.txt
Bacially that's about all...I hope your gang can resolve my roblem.Sorry if i bored you to sleep with such a long email. Hope to hear from ya soon...
Cheers, Geraldine
Undelivered chroot mail - echo 'x' ? Note, the hosted site's name and troubled user account have been anonymized. -- Heather
Ick - it seems her email is still not working!
Everyone
else's seems to be working fine, but since she heads up the office we
shoulfd try and figure out what the heck is wrong with hers before she
goes ballistic!
Got any ideas?
cheers, JH
Here's the error:
Reporting-MTA: dns; example.org Arrival-Date: Wed, 2 Jul 2003 21:28:58 -0700 (PDT) Final-Recipient: rfc822; mary@example.org Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; Command died with status 1: "/bin/echo 'x' > /var/chroot/home/mary". Command output: sh: /var/chroot/home/mary: No such file or directory
Well, a real stumper is, I've sent her mail and she has actually been getting it, as shown by her copies of my messages in the thread. So whatever this is is only happening under limited circumstances.
Even weirder, the host space for "example.org" should NOT be mentioning /var/chroot - that's a referent for the next level up. So I will check /etc/passwd and see if her homedir is wrong. But I still cannot figure out why it would mention /bin/echo. I don't use it to say 'x' - I use to to say real messages I want logged, even during debug modes. So Perhaps something automatic did it, but then, I don't know what.
It also happened when soneone from Intel sent her an email - he forwarded me the same bounce.
Let me know if we can get this fixed ASAP - thanks, JH
We did fix this, but, the method we used was to simply create a new account for her. So, if anyone has any good theory as to what really happened... -- Heather
Well, she doesn't have any procmail that everyone else doesn't have (it just keeps a backup mailbox). There's not mention of /bin/echo anywhere in the postfix setup of either the top or chroot'd levels. And her homedir references are correct, plus, other people have the same setup she does in that regard too. There isn't even a letter x anywhere in their aliases file, since none of the accounts or alias names contains one. /var/chroot/home/mary does indeed exist, if you look at things from the top level, but the postfix running in the lower level has no good reason to try to refer to that, since the chroot'd /etc/passwd mentions /home/mary.
I tried hitting up the net for that form of error message, but nothing useful came up. I'm going to submit this to The Answer Gang and see if any of them has a good idea what to look at next.
As it turns out, the original subject looked like a mailer daemon notice and everyone ignored it. Sorry about that. But the stumper remains. An additional bit not mentioned here, is that the user is not a shell user, she only uses POP and SMTP from this server. Thanks in advance, folks! -- Heather
Nobody sent in any comments about our articles last month.
trimmed addresses from Gang tips
That reminds me ...
Can my email displayed in the Author page be changed to ashwin@despammed.com Since the time it was put on that page, that email is almost lost in huge amount of spam (it is not listed anywhere else).
Also, my experience with despammed.com has been good, I use the email all over my homepage and other webpages and their cleaning is very good, hardly one or two spam mails in a month get through.
While it's Ben's task to try and keep the bios up-to-date in this fashion...
Gang members may be pleased to know that those of you whom I recognize as regular contributors get your real addresses snipped and replaced with a rather generic "The Answer Gang" - and our regular staffers, such as Thomas, get their monikers. I've been doing it for a while, so several of you are in my little scripts as automatically fixed up that way.
-- Heather, your Editor Gal
trimmed addresses from Gang tipsIt's been brought to my attention that some people feel that the Gazette is a bit of a closed system and hard for people to submit material to.
This magazine is a labor of love - we are all volunteers here, every single one of us. The title bar on TAG used to say it was by a handful of members of the Gang.... and you!
It's still true, but it's not limited to that column.
We have a batch of people at the core of it, but anyone has the power here to make a difference. If you have suggestions for improving the look of Linux Gazette - things you liked or hated about older styles - do let us know. We may not accept every suggestion, because we still want to be usable across low end connections like modems in the wilder areas of the world, we have PDA users surfing websites now, and we still want to be search engine friendly. But with those things in mind, we're sure we can do more.
I know it may not look like it in some months, but you don't have to be a member of The Answer Gang to tell us your best juicy tips. Just send them to linux-questions-only@ssc.com with "Tips" or "2c" anywhere in the subject, and if your tip seems accurate you'll see your name with two pennies next month. If your Tip is a bit long, but your explanation is good, send it anyway. We like those a lot. If it's really long, you may end up as one of the speakers in the TAG column yourself, or invited to lengthen your material into an article.
We post Wanteds (see above) for two flavors of enouragement; you can show off your knowledge on a few Answer Gang style questions without formally joining the Gang ... and people with a broader view can write some articles on these "stumper" topics.
Article ideas need not come from the lost and confused, though. If you can't write, but you know some cool topic you'd love to see covered, send in your article idea either to me for the Mailbag directly, or to the Gang if you'd like to see it discussed and maybe turned into a good thread. I'd also like to take a moment to thank all the authors who presently have ideas in the pipeline for us.
We do sometimes see articles put together from general discussions among our answerfolk, though this is less common. Anyone who has a little room in their mailbox and a desire to help out - or just listen to the clues float by - is welcome to join The Answer Gang. Visit http://www.ssc.com/mailman/listinfo/linux-questions-only to reach our mailman interface. This is a few hundred slices of mail every month though, and sometimes rambles. Don't be afraid to correct people who are wrong, but try to be friendly. And don't let the dark glasses and other silliness put you off; it's part of the charm. And yes, pop in with enough answers and help a few of the regulars not shoot themselves too badly around the feet - and you, too, will enjoy the TAG lounge and the marvelous automagically refreshable munchies.
We haven't had any formal sponsors for a long while, but you don't have to be a lone individual to help out. If any companies out there would like to help sponsor the Gazette by defraying some of the costs that our host puts into this, please contact sponsor@ssc.com. Your reward will be your logo on the index page, and a round of thanks from LG readers everywhere.
While we're talking about a big helping hand ... let's all think a round of virtual beer for our unsung heroes who run the mirror sites. Especially those brave souls in the boonies who only have storage room for a few issues, or a moderate degree of permanent badnwidth, but keep a mirror anyway. If you are a mirror site maintainer, and are having some trouble keeping your mirror up to date, please email us about it. The Gang will be glad to help you settle out any automation bugs that we can. Our new webmaster (wave Hi, Jeff!) will see that you're able to connect up. New mirrors are always welcome too.
Lastly, we're working on having some more memorable addresses @linuxgazette.com soon. I realize that it will take a while for folks to clean up bookmarks, and we'll see a lot of folks referencing older documents, and besides @ssc.com is shorter to type. Fear not, those addresses will still work for awhile to come. But alias space is cheap, and easy to remember addresses will, we hope, make submitting to the Linux Gazette ... a little more fun.
|
...making Linux just a little more fun! |
|
aptfetch with rate limiting (to 5K/s)Here you go folks. This is a script to fetch a few things that apt s going to want to get - but at a badnwidth limited rate.
See attached aptfetch.bash.txt
download s/w ?Hi all, could any one plz suggest me a good download manager under linux ?
thanks in advanced
[Jason] wget
Probably not what you meant.
[Dan Wilder] Yes, if you could say a little more about what a "download manager" might look like. What would such a program do?
[Ashwin] I think he is looking for a program that can stop and continue download operations if the internet connection is cut and then restored. (These noisy phone lines in India![]()
yes Ashwin , this is also a function of download manager. but a download manager also helps to download the file (like cd image of debian) from the ftp server a little bit quick. I have come to know that prozilla is such a DM.
thanks.
[Les Barron] d4x is an excellent program for the desktop it supports drag and drop ftp & http as well as resuming downloads it is also called nt which is the name used to call the program from an xterm, there are also several graphical ftp programs gftp for gnome, kbear for kde,there are others as well.
[Dan] Sounds sort of like my noisy phone lines in Seattle. In a neighborhood where DSL will be available "not this year" according to the local phone company.
I make a lot of use of the "wget" command-line utility which handles both ftp and http connections. From the man page:
Wget has been designed for robustness over slow or unstable network connections; if a download fails due to a network problem, it will keep retrying until the whole file has been retrieved. If the server supports regetting, it will instruct the server to continue the download from where it left off.
Rsync is also your friend. Surprising how many places you can find an unpublicised rsync server parallel to a public FTP server, often at the same url. To find out:
rsync some.domain.tld::
should return an rsync package list if there's an anon rsync server sitting there, a "failed to connect" message if not.
[JimD] Note that rsync services are considerably more computationally intensive than HTTP, FTP, etc. Popular (read high volume) archive sites generally can't allow anonymous rsync (thus the emergence of BitTorrent for tremendously popular free files)
http://bitconjurer.org/BitTorrent
[Dan] The big advantage to rsync is its ability to re-download changed portions of files without downloading the whole thing. This can be an enormous boon in maintaining a mirror of a site over a slow or unreliable connection.
[JimD] You can also consider ckermit (Columbia Kermit package for UNIX); which does work over TCP sessions, can act as a telnet client, can work over ssh connections, does very robust file transfers, and includes its own scripting language.
However, in honesty I prefer ssh with rsync. However, I don't know just how bad these connections are.
The real question is: what protocols do the far end(s) of these connections support and which are supported a utility or front end that the querent finds reasonable.
how to download Suse Linuxhow do I download linux suse I went to the site but there a lot of files there I not know what one I need I have a 20gig hd as slave I not useing I want to put linux there I have a high speed internet
[Neil Youngman] It's all in ftp://ftp.suse.com/pub/suse/i386/current/README.FTP
What's not clear?
[Chris G.] I bet Ken wants the ISO images. Do you think that's the case?
[Neil] It does say
- booting from CD Download the iso image boot/boot.iso and burn a CD with it.
[Chris G.] Hmmm. I guess that the instructions are kind of clear. I have not done the ISO thing yet, so that's kind of new to me. I still use dialup at home. I just looked at a few sites (www.linuxiso.org, ftp.suse.com, etc.) They are quite clear about the installation. I noticed that SuSE provides a live CD too.
At my work (Motorola), they keep iso images of Linux, too. I was surprised that they have all of the disks for SuSE 7.x (yea - older stuff), as well as other distributions. That certainly would deal with my slow dialup. Our machines at work (the ones on the Internet) have CD writing capability too.
Check the TAG Knowledgebase and you'll find more on burning CDs, as well... including under mswin, if that's where you're presently stuck. -- Heather
GIMP vs Photoshop - CMYKPhotoshop can't even compete, although they've made some nice improvements in the recent years.
Photoshop has all these cool extra filter thingies you can buy in the store. I'm not sure that Kai Power Tools is the only package. Its strengths are rather different from the GIMP but I wouldn't say "can't compete". GIMP began aiming in Photoshop's direction, but the people who really use it took it to other places. So if Kai starts selling Kai's Power GIMP Fu, then we'll be winning the Oscar. -- Heather
[K.-H.] a friend of mine is in print graphics and one major difference between photoshop and gimp is using CMYK (Cyan, magenta, yellow, kontrast=black) color space instead of RGB. RGB and CMYK can not be converted into each other easily -- there are corners of RGB which simply do not have a printable CMYK aequivalent (e.g. bright orange).
[Ben] The answer would seem to be "don't use bright orange."I haven't done anything with CMYK except when I was doing my own photo enlargement and printing, ages ago, but it seems to me that if it doesn't have some of the capabilities of RGB, that makes it a subset. Don't use what you don't need, and it'll all work - no?
[K.-H.] Hmm... it seems photoshop can show you all critical colors -- its not just orange, IIRC all corners of RGB space are a problem. Orange just stuck in my mind because a rather harmless looking bright orange is not printable in four color mode -- you need special colors for that.
Photoshop also has plenty of little tools explicitly for print purpose, e.g. special color printing where you have to enlarge a lower layer a little so you don't get white if the printing machine shifts the two print colors slightly. In this case of custom print colors (not regular four color printing) photoshop can separate colors according to these defined extra colors instead of the regular CMYK.
[Ben] Oh, I'm sure that Photoshop has features which are not available in the GIMP. However, the converse is also true, and I'm sure that there are people working in GIMP who would be unable to switch to Photoshop.
[K.-H.] Another one is color separation into "films", i.e. the four color channels which go on transparent film and will then be copied on the metal printing plates.
[Ben] Image -> Mode -> Decompose -> CMYK. It's that simple.
[K.-H.] You never stop finding new thing in gimp -- so I'm not convinced this covers photoshop abilities.
Mostly this is done in a "higher" layout program (quarkExpress, freehand) but Photoshop does support it too.
The basic filter set and Fu-stuff in gimp is quite competitive. For print graphics the non existant CMYK mode is a clear "can't use gimp".
[Ben] It's true that there's no "direct" CMYK mode for initial images; however, you can still work with CMYK images as above. GIMP has surprising depth to it.
[K.-H.]
yes it has
There Goes the Neighbourhood: arpd to the RescueI read http://tldp.org/LDP/LG/issue59/lg_answer59.html#tag/2
At me one network in which now 1400 devices. While them was less than 1024 made the static table, now dynamic and periodically out the message " Neighbour table overflow ". It can is possible to correct something in a kernel?
If I'm reading this correctly: you have a LAN segment with about 1400 (ethernet) devices on it. When you surpassed 1024 devices on the segment you started noticing errors regarding the Neighbour table overflow.
The solution to this is to move ARP (address resolution protocol) handling out of the kernel and into user space. This involves two steps. Reconfigure your kernel with CONFIG_ARPD = y (You'll have to enabled the option to "Prompt for experimental features/drivers" near the top of your make menuconfig or make xconfig.
Under: Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
Then under: Networking options --->
[*] IP: ARP daemon support (EXPERIMENTAL) (NEW)
Then from the help text thereunder:
|
............... Normally, the kernel maintains an internal cache which maps IP addresses to hardware addresses on the local network, so that Ethernet/Token Ring/ etc. frames are sent to the proper address on the physical networking layer. For small networks having a few hundred directly connected hosts or less, keeping this address resolution (ARP) cache inside the kernel works well. However, maintaining an internal ARP cache does not work well for very large switched networks, and will use a lot of kernel memory if TCP/IP connections are made to many machines on the network. If you say Y here, the kernel's internal ARP cache will never grow to more than 256 entries (the oldest entries are expired in a LIFO manner) and communication will be attempted with the user space ARP daemon arpd. Arpd then answers the address resolution request either from its own cache or by asking the net. ............... |
Then you have to go fetch and install an ARP daemon. Under Debian that would be as simple as: apt-get -f install arpd
Out of Space and Other ErrorsI'm having problems where I when I tried to view a file I got this error message:
E303: Unable to open swap file for "/tmp/ERRLOG", recovery impossible.
[Dan Wilder] How did you try to view the file?
[JimD] Sounds like a vi/vim error message --- it's trying to create a backup or recovery copy of the file.
I'm also having problems whereby I always got an error telling me that no space left on device ... but when I look at my filesystems there are actually lots of space available.
Regards
[Dan] What's the output from;
df
...look like? How about:
ls -ld /tmp
??
Please post the actual text of the error message, and tell us what you were doing when you encountered the error.
[JimD] Also check 'df -i' --- check the inode utilization. Basically it's possible for a filesystem to be completely out of inodes even when there's plenty of disk space available. That would happen on filesystems with a very large number of tiny files (USENet news spools, qmail-style maildir, and MH are examples of applications that generate these sort of things).
Other possible causes:
- Make sure the filesystem is mounted read-write (rw).
- Run fsck manually (boot into single user mode or from a BBC or other rescue medium)
Some filesystems are set to remount in read-only mode if the kernel (filesystem driver) detects errors while the system is up and running. Other tune2fs settings are: "panic" and "continue" there are also mount (/etc/fstab) options that relate to this "on-error" behavior.
Check to see if you have quotas enabled and if the user in question has them. Also check the reserved space settings reported by tune2fs since it's possible (though extremely unlikely) that someone set that up to reserve more than the usual 5%, and that configured it to reserve for some user or group other than root). Other filesystems may have alternatives to tune2fs (but tune2fs also works on ext3, of course).
filename.tar failing to untarHello
I've been searching high and low for any information that might help me restore from a backup tar file that is being difficult for some reason.
The file is just your basic tar file without any compression.
[Faber Fedor] Then that means the files that are in the tarball are 'simply' concatenated (with some header information in between).
Here is the command I'm typing:
tar xvf 2003-07-17.tar
And here is the last few lines from the result:
/DP/ /DP/PDEF.DP000000 /DP/PDEF.DP010000 /DP/RDEF.DP010000 tar: Skipping to next header tar: Error exit delayed from previous errors [root@lucia root]#
Here is the version of tar we are running:
tar (GNU tar) 1.13.25
The filesize of the backup file is consistant with the other files that have worked fine.
Does anyone know what options I have? Is there some way to look into the file to see what may be wrong?
Thanks so much in advance,
Steven
[Faber] You don't say if the files are binary or not. I assume so. Either way, you can use hexedit to view/edit the file, or maybe just vi/less to view (NOT edit) the file, then compare this file to one that worked.
Good luck!
LJWNN Tech TipsIf your main home network is a wireless network, you don't want to wake up in the morning and find some joker has printed many pages of stuff to your networked printer. Put the printer on a wired, private network segment, and print to it with ssh.
To do this, install this script as lpr on your wirelessly connected laptop:
away from your e-mail. You can see who received your message with
vacation -l | cut -d ' ' -f 1 - > people_who_got_vacation_message
If you have an easy-to-upgrade Linux system, you end up with a system that's been upgraded many times instead of backed up and reinstalled.
To get rid of all the unused libraries from your Debian system, try the deborphan utility: http://www.tribe.eu.org/deborphan
or, of course:
apt-get install deborphan
It finds all the libraries that no longer have anything depending on them.
To purge unused libraries, simply do this:
deborphan | sudo xargs apt-get -y --purge remove
Want to make your web server faster without getting a faster connection? All common browsers will transparently download content with gzip compression, but your out-of-the-box Apache probably doesn't have mod_gzip installed and turned on. Get the source from: http://www.schroepl.net/projekte/mod_gzip
...and add the following lines to your httpd.conf to turn it on:
LoadModule gzip_module /usr/lib/apache/1.3/mod_gzip.so mod_gzip_on Yes mod_gzip_maximum_file_size 0 mod_gzip_keep_workfiles No mod_gzip_temp_dir /tmp mod_gzip_item_include mime ^text/.*
We don't use it for images, which are already compressed, but it compresses most of the HTML pages on one test server by 50 to 80 percent.
When you boot Linux, the kernel turns off Num Lock by default. This isn't a problem if, for you, the numeric keypad is the no-man's-land between the cursor keys and the mouse. But if you're an accountant, or setting up a system for an accountant, you probably don't want to turn it on every single time.
Here's the easy way, if you're using KDE. Go to K --> Preferences --> Peripherals --> Keyboard and select the Advanced tab. Select the radio button of your choice under NumLock on KDE startup and click OK.
If you only run KDE and want Num Lock on when you start a KDE session, you're done. Otherwise, read on.
To set Num Lock on in a virtual console, use:
setleds +num
If you choose to put this in a .bashrc file to set Num Lock when you log in, make it:
setleds +num &> /dev/null
...to suppress the error message you'll get if you try it in an xterm or over an SSH connection.
Finally, here's the way to hit this problem with a big hammer--make the numeric keypad always work as a numeric keypad in X, no matter what Num Lock says. This will make them never work as cursor keys, but you're fine with that because you have cursor keys, right? Create a file called .Xmodmap in your home directory, and insert these lines:
(from a Usenet post by Yvan Loranger: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3BFD087F.2000300%40iquebec.com&rnum=3+)
Dramatis personae
dmarti: example user name
bilbo: your desktop system
frodo: host running sshd
linuxjournal.com: some web site
Port forwarding also is called tunneling, so I'll call the key "tunnel". cd to your .ssh directory and create the key:
dmarti@bilbo:~/.ssh$ ssh-keygen -t dsa -f tunnel Generating public/private dsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in tunnel. Your public key has been saved in tunnel.pub. The key fingerprint is: 77:b4:02:d9:32:c2:cc:18:58:c3:23:0a:13:46:a7:fa dmarti@capsicum
Now edit tunnel.pub and add the following options to the beginning of the line:
command="/bin/false",no-X11-forwarding,no-agent-forwarding,no-pty
That means this key is no longer any good for anything but port forwarding, because the only command it will run is /bin/false, and it won't forward X or agent commands.
sshd understands the options only when reading the key from authorized_keys, but if you put the options into the original .pub file, they'll stay with the key wherever it goes.
Now copy tunnel.pub to the end of your .ssh/authorized_keys at all the hosts to which you want to tunnel, and try it:
dmarti@bilbo:~$ ssh -i ~/.ssh/tunnel frodo Connection to zork.net closed.
No errors, nothing runs; that's what you want. If you get errors, you may have mangled the authorized_keys file on the server end; if you get a shell you need to check and fix the options.
Another possibility is that if you're running with ssh-agent and have the SSH_AUTH_SOCK environment variable set, you could be using a key provided by ssh-agent instead of the one on the command line. Put env -u in front of the command line to be sure not to use the agent.
Tunnel time! Let's use the long-suffering linuxjournal.com web server as a guinea pig and make a tunnel:
dmarti@bilbo:~$ ssh -i ~/.ssh/tunnel -N -L 8000:linuxjournal.com:80 frodo
To review that command line:
- -i ~/.ssh/tunnel to use our tunnel-only ssh key
- -N to not run a command (this is necessary, otherwise SSH will run only /bin/false and exit)
- -L 8000:linuxjournal.com:80 to forward local port 8000 to port 80 on linuxjournal.com.
- And finally, the hostname to which we're making the connection--it doesn't have to be the same as the host to which we're tunneling.
It's always inconsiderate to quote more of someone's posting than you have to in a mailing list. Here's how to bind a key in Vim to delete any remaining quoted lines after the cursor:
map . j{!}grep -v ^\>^M}
...where . is whatever key you want to bind.
If you want to train a Bayesian spam filter on your mail, don't delete non-spam mail that you're done with. Put it in a "non-spam trash" folder and let the filter train on it. Then, delete only the mail that's been used for training. Do the same thing with spam.
It's especially important to train your filter on mail that it misclassified the first time. Be sure to move spam from your index to your spam folder instead of merely deleting it.
To do the training, edit your crontab with crontab -e and add lines like this:
6 1 * * * /bin/mv -fv $HOME/Maildir/nonspam-trash/new/* $HOME/Maildir/nonspam-t rash/cur/ && /usr/local/bin/mboxtrain.py -d $HOME/.hammiedb -g $HOME/Maildir/no nspam-trash 6 1 * * * /bin/mv -fv $HOME/Maildir/spam/new/* $HOME/Maildir/spam/cur/ && /usr/ local/bin/mboxtrain.py -d $HOME/.hammiedb -s $HOME/Maildir/spam
Finally, you can remove mail in a trash mailbox that the Bayesian filter has already seen:
2 2 * * * grep -rl X-Spambayes-Trained $HOME/Maildir/nonspam-trash | xargs rm - v 2 2 * * * grep -rl X-Spambayes-Trained $HOME/Maildir/spam | xargs rm -v
Look for more information on Spambayes and the math behind spam filtering in the March issue of Linux Journal.
It's easy to see what timeserver your Linux box is using with this command:
ntptrace localhost
But what would happen to the time on your system if that timeserver failed? Use
ntpq -p
to see a chart of all the timeservers with which your NTP daemon is communicating. An * indicates the timeserver you currently are using, and a + indicates a good fall-back connection. You should always have one *, and one or two + entries mean you have a backup timeserver as well.
In bash, you can make the cd command a little smarter by setting the CDPATH environment variable. If you cd to a directory, and there's no directory by that name in the current directory, bash will look for it under the directories in CDPATH. This is great if you have to deal with long directory names, such as those that tend to build up on production web sites. Now, instead of typing:
cd /var/www/sites/backhoe/docroot/support
...you can add this to your .bash_login:
export CDPATH="$CDPATH:/var/www/sites/support/backhoe/docroot"
...and type only:
cd support
This tip is based on the bash section of Rob Flickenger's Linux Server Hacks.
In order to store persistent preferences in Mozilla, make a separate file called user.js in the same directory under .mozilla as where your prefs.js file lives.
You can make your web experience seem slower or faster by changing the value of the nglayout.initialpaint.delay preference. For example, to have Mozilla start rendering the page as soon as it receives any data, add this line to your user.js file:
user_pref("nglayout.initialpaint.delay", 0);
Depending on the speed of your network connection and the size of the page, this might make Mozilla seem faster.
If you use the Sawfish window manager, you can set window properties for each X program, such as whether it has a title bar, whether it is skipped when you Alt-Tab from window to window and whether it always appears maximized. You even can set the frame style to be different for windows from different hosts.
First, start the program whose window properties you want to customize. Then run the Sawfish configurator, sawfish-ui. In the Sawfish configurator, select Matched Windows and then the Add button.
Greetings from Heather SternHowdy folks, and welcome once more to the world of the Answer Gang. In fact, welcome to the dusty virtual garage of your erstwhile Editor Gal. I've got the Weekend Mechanic in here passing me a spare wrench and hanging out, splitting some ginger beer with me.
Number of threads that came through was a bit low, I guess the summer months have people running about and enjoying life instead of hanging out by their computers quite so much. Dumb questions of the month seem to be at an all-time low ...
So, this time around, the Answer Guy himself, Jim Dennis, asks:
GPG itself is both a cool thing, and an embarrassment. It's fairly well available nowadays - free flavors of it for everybody - and some nice helpful GUIs try to integrate it into day to day life. But there's a problem - it's not easy enough... and that's built into the way it has to work. It's an embarrasment because it's just hard enough to really use day to day, that people who probably ought to - don't.
Mind you most people just don't have the patience to get a few solid spokes in their web of trust. Mostly they just establish a few crosslines here and there to people who knwo them so well they'd trust their identity directly anyway.
So how do we really know kernel.org's key is ... well, itself? If the webserver got mucked with, how do you know this wasn't a target? How do we know our install discs are safe?
Well, we buy them, and they're on a pressed CD, so we know they came from that distro...
Nice try. A lot of people get a free or cheap disc from a less perfect source. And it certainly hasn;t happened to any Linux vendor yet, but in the mswin world an occasional software vendor has mistakenly shipped a trojan or a virus. Being a commercial pressing is good, but isn't really a guarantee.
Commercial distros restrict who can commit to the product release, and that can be considered a good thing. Debian's build servers use GPG to very the identity behind a package sent to them. But what we, the sysadmins and other users, can't be really sure of which build server a given rpm or eb or tarball really came from. Some of the systems allow checking that the download server you have reached is authentic. But if it got sent junk - ouch. I think it even happened to one of the distros once, though they spotted it in very short order.
Build computers should automagically sign packages, the way mail passing through a system gets marked up with a Received: header. In fact the analogy is pretty good - right down to dirty liars forging a few fake ones behind themselves when they want to send junk. But then folks like you and I have to be able to establish that the keys are good. And that process takes human energy.
Why? Because we can't just have the computers randomly make up keys. A person's got to create a key, sign itself, get a few of his buddies to sign the key, really use it. As a web of trust grows, a key identity is well known, and you could say you recognize a given key as good the way many people can recognize a particular actress or other public figure. You gotta hand it to the debian guys for keying with each other so they can be sure of who's sending what... but that's for sending them up to their core servers. The build servers work automatically to crank out official .deb files, but WE can't tell where they were built. Even if the build server did sign these packages (good idea) then how do you and I know the key is trustable. Let's get serious, it's pretty hard to get a silicon lifeform to come to dinner and show you its state ID or some of the other things people do to prove they're themselves. Ok, so the sysadmins sign the key. But you can't just have the key with no passphrase - if you did that, anyone who somehow got to it could steal it, then use it to build wicked packages all they liked. No way. So you end up with a critical system which has to have someone take a look at it and load up the key again if it has to reboot.
Maybe if we have more than a few sysadmins know the fingerprints of these keys that should be so well known, it'd become reasonable to have checkable signed packages. In fact let's go one further, the rules or spec or whatever it is inside a package that makes it something more than a tarball, should be signed by the coder responsible for the package. And if they don't check out we don't care which totally trustable build server built this toy. And let's get these important keys' fingerprints into some places that can't be cracked and spoofed. Get these things into printed manuals, into magazines (maybe just a few at a time, random good ones that the staff have managed to verify), and onto pressed CD covers where applicable.
Okay. Say you've all your ducks in a row and all sorts of things are signed... and verifiable. Everybody knows who everybody is. Then we narrow the field of problems down to the merely ordinary - once you know who's who, then you can really ask yourself if they know what's what or are doing what's right.
But at least you know who you're talking to and who you're getting your bits from.
linux server for xwindow....need hintsFrom J. BAKSHI
Answered By: Ashwin N, Jim Dennis, Dan Wilder, Jason Creighton, John Karns, Kapil Hari Paranjape, Thomas Adam
Hi all, I am a faculty at an institute. we use Linux as a server. students telnet to the linux server & use the bash shell from their windows machine. but I am interested to provide them the xwindow system of linux. so is it possible to use the xwindow of the linux server from their client windows machines ? if yes then plz give me some hints or the internet source where I can know the process.
thanks in advanced
[Ashwin] You can install one of the many commercial X servers available.
- HummingBird:
- http://www.hummingbird.com
- WinaXe:
- http://www.labf.com/winaxe
If you want a truly free X server you can use the one that ships with CygWin. As a bonus, your students can try their shell and system programming on CygWin itself. Almost every Linux commandline and programming utility is available on CygWin.
- CygWin:
- http://www.cygwin.com
- CygWin/XFree86:
- http://www.cygwin.com/xfree
- CygWin/XFree86 User's Guide:
- http://xfree86.cygwin.com/docs/ug/cygwin-xfree-ug.html
[JimD] But ... PLEASE, stop using telnet! ssh -X will be far more secure and actually easier to use (if the cygwin version of OpenSSH support X11 forwarding/tunnelling to the cygwin X server). I'd only use the cygwin ssh for the X apps or for very simple commands --- for any curses applications I'd recommend putty. It's terminal emulation is better than any I've seen for MS Windows.
[Dan] X Windows is a client-server arrangement. In the strict sense I use here, "client" means "program which initiates contact with a server" and "server" means "program which provides services when contacted."
In this sense the familiar X programs such as xterm, Mozilla, StarOffice, and so on, are all "clients" and the program which provides display services for these is a "server". To wit, an "X server".
Normally the X server runs on the workstation, while the X clients run on the workstation or elsewhere. In your model, the X clients would run on the Linux server system, while the X servers would run on the Windows systems.
You need an X server for Windows. You're in luck. The most popular X server for Linux, BSD, et al, XFree86, has been ported to Windows and is available as a part of the Cygwin package, developed originally by Cygnus Support, now owned by Red Hat.
Take a look at http://www.cygwin.com and check the "XFree86" link on the front page.
An alternative is the VNC package, http://www.uk.research.att.com/vnc which uses its own client-server arrangement. In this case the X server, "vncserver", runs on the Linux server and proxies the connection over to Windows, where the display is handled by "vncviewer".
Both approaches have their advocates. Both work. YMMV.
[Jason] VNC ("Virtual network computing") can also be found at: http://www.realvnc.com
PS: I know the best solution is to install the Linux at the clients
machines, but the institute will not permit the same. so the only way is to
use the xwindow of the Linux server pc.
[JimD] We already answered this in other ways, but I just noticed your postscript and wanted to add --- why not use KNOPPIX: http://www.knoppix.net
You could use KNOPPIX CDs, boot the systems up, running X and ssh and a large collection of other Linux software right off the CD. You wouldn't be "installing" anything. KNOPPIX runs from CD and out of the RAM disk.
[John] Knoppix is definitely cool and one heck of a technical marvel. I've been using it for a while for rescue type stuff, and a few other things. And night before last, I decided to install it on my newer Inspiron to get my feet wet with a Debian install - nice easy install - Debian w/o the install / configuration headache!
[Robos] Well, they are working on a better installer, taking over the progeny installer and modifying it. Dunno how far that went though...
[Heather] For very crude values of installer, you can actually install straight from knoppix. knx-hdinstall is the app you're looking for, though it's really a shell script laced with dialog commands.
[John]
One problem I'm having with the install is that I'm unable to run X as a
user I created after the install. The install created a login "knoppix"
and the root of course. Afterward, I created a personal login using the
"useradd" utility, and specified the "-m" switch and that it use a login
shell.
[Robos] Take a look at adduser, this is the debian way of adding users and groups to the system and adding users to groups: <quote man adduser> "They are friendlier front ends to the useradd and groupadd programs" </quote>
I created my users on my machine and that of my girlfriend just fine like that. Give it a try!
[John]
However "startx" returns with an error informing me that the login
is not authorized to use the X srvr. I looked through some of the X
related scripts and have combed through some of the Debian docs and links
the Knoppix has set up, but to no avail.
Then I deleted the login id via the KDE user mgr utility (w/o deleting the home dir) and re-created. It then let me run X from that account ... until I rebooted the machine, and now I have the same problem. Any insight on that? I've looked through the logs, and couldn't see any clue.
[Heather] Try adding the user to some of the same groups in /etc/group that the user knoppix belongs to?
[Kapil] Since Knoppix is based on Debian it is likely that it uses the Xwrapper program. This is controlled by /etc/X11/Xwrapper.config on a "sarge" version of Debian. This file contains the "allowed_users" option with possible values of "rootonly", "console" and "anybody".
[Thomas] Kapil, you're not wrong, and indeed I actually use Knoppix purely as a rescue CD, preferring my version of Debian Sarge to be pure. Mind you, I might get around to running Knoppix in a chroot jail at some point....
[Kapil] For more details "man Xwrapper.config" is your best bet. Since this file can be managed by "debconf" you could also try to run
dpkg-reconfigure -plow xserver-common
but I am not sure how many changes Knoppix makes to "debconf"-style configuration.
[Thomas] AFAICT, the debconf style intact as one would expect it to be in Debian.
[Thomas] Could the problem also be the "~/.xsession" does not exist? Typically Debain (and other distros) look for this file.... I'd check that that exists and if not do something like...
See attached thomas.dot-xsession.txt
That is my ~/.xsession (chmod 700).
[John]
Indeed it does not exist - in either users home dir, neither the one for
which X functions normally nor the one for it doesn't. There _does exist
what I would assume to be one for global use of all X users on the system.
It doesn't matter what I put in ~/.xsession, running startx gives the output:
Using authority file /home/jkarns/.Xauthority Writing authority file /home/jkarns/.Xauthority Using authority file /home/jkarns/.Xauthority Writing authority file /home/jkarns/.Xauthority X: user not authorized to run the X server, aborting
[John]
OK, there is an Xwrapper config on the system which contains only the
following:
Xwrapper.config
---------------
allowed_users=console nice_value=-10
I discover that if I change 'console' to 'anybody' then X runs. There is remains a caveat with the .Xauthority file, however. It gets written as an empty file, whether or not I'm allowed to run X.
In any event, I'd kinda prefer to use the security mechanism that they're
implementing here and leave it set to 'console'. So it seems that the
problem may lie with the system determining that I'm running starts from the
console. These convoluted X startup scripts give me a headache.
[Kapil] What is the output of the "tty" command? On my system (/dev is devfs type) the output is "/dev/vc/n" (where n is the number of the virtual console). The wrapper strict says that the "console" keyword stands for any virtual console.
[John]
Output is "/dev/ttyn" where n is the virtcon number ... X runs, even with
the allowed_users set to "console".
Ahha, but if I run screen (as I customarily do), then "tty" reports "/dev/pts/n-1" where the number of the term is 1 less than in the ttyn above, and 'startx', fails.
So the problem does lie with the system not recognizing pts as being the console, which is probably correct, as xterms also seem to fall in the domain of "pts". So I guess that for now, the solution will be to "startx" before running "screen".
Thanks for your input.
[John] It's worked wonderfully in almost all situations of booting from the CD. The only exception to date was when I was booting it on some older K6-2 mobos (PC100, a.k.a PC Chips brand) recently. Due to the SCSI emulation mode that Knoppix uses, there was some wierdness where I couldn't access the IDE hd - some kind of compatibility issue - haven't run into that with more recent / better quality mobos. Maybe could have worked around it some way, but didn't have the time to mess with it. Hats off to Mr. Knopper and his associates.
[Robos] You can specify something to the kernel like hda=ide or something. There are the "cheat-codes" which would probably list this, and they are already there at the boot up screen (F1 IIRC)
[John] Another nice venue for me has been the SuSE Live CD distro. Very similar in concept to Knoppix, (not quite as efficient at autoconfiguring the hardware) but with the added feature that it will write a (100 MB) cfg file to an existing FAT filesystem to make the configuration non-volatile. So you can cfg the NIC, routing table, user logins etc., and have it all set for subsequent logins.
[Robos] Like persistent home with knoppix? You have the option to save config and your home to hdd with knoppix too, just RT*M a little
![]()
[Heather] Actually, like persistent home plus config floppy. Knoppix seperates the two ideas. And I'm not sure it has any useful support for more than one user account.
[John] Very nice - might be worth a look for the kind of usage that Mr Bakshi is talking about. The Live CD is available (last I checked at least) for free download from the SuSE mirror sites (www.suse.com for U.S.), contrary to their commercial multi-CD distro.
Thanks to all of you, who have helped me by giving the technical hints on
setting a xwindow server.
I am very grateful to Mr. Dan Wilder for his writing on X server & clients. It has solved some of my confusion.
thanks a lot.
hard linksFrom Kathy
Answered By: Jason Creigton, Faber Fedor, Neil Youngman, Jim Dennis, Jay R. Ashworth, Ben Okopnik, Thomas Adam
I'm confused, if Linux doesn't allow directory hard links then why does
every Linux directory have at least two hard links?
Thanks, Kathy
[Jason] Not exactly sure....but http://www.linuxgazette.com/issue35/tag/links.html makes for good reading.
[Faber] You know, I'm confused too! Looking into it a little bit, it seems that whether or not directory hard links are allowed depends on the underlying file system. Fire systems that are of type vxfs (no, I don't know what that means either
don't allow the creation of directory hard links. I've yet to discover why.
The reason we have them in Linux (. and ..) is, I always assumed, so we have a way to travel up the directory tree (cd ..), otherwise the system would need to know the name of the parent directory (as opposed to just its inode).
Why is . a hard link to the current directory then? <shrug> Because un*x people are lazy typists?
A very interesting question, BTW. I'm interested in finding the answer to it myself.
[Jim]
The system uses hard links to manage the link from the parent to the directory's inode, the . link in that directory and all of the .. entries in all of its subdirectories.
USER'S (including 'root') are forbidden to create additional hard links because this would make fsck much more difficult to implement and it might allow one to create hard link loops, and dangling sub trees.
Basically the directory linkages are maintained by the filesystem to glue the whole tree together, to ensure that it is truly an acyclic tree structure with a single root.
In other words it's a policy enforced by the kernel. Some other UNIX systems have allowed root to create hardlinked directories; and it could be done with a disk editor like LDE under Linux (though I'd expect fsck to complain the next time it was run --- and if you did something degenerate you might cause some interesting problems --- possibly even cause the kernel to treat the fs as corrupt and invoke it's handler (remount,ro, panic, or continue) and possibly even cause some kernel threads to run amok or panic the system.
[Neil]
Traditionally, in Unix systems a file or directory is physically deleted from the disk when there are no hard links to it. The rm and rmdir commands command remove a directory entry (link). If there are more than one hard links to a file or directory, the file remains, so although we regard the rm command as deleting a file, it only deletes the link to the file. When there are no hard links to a file or directory, the file system will then free up the actual space used by the file. There have to be hard links to directories or they would be deleted by the filesystem.
ISTR that hard links to directories can only be created by mkdir to ensure that we can't build up cyclic directory structures, otherwise programs such as find, which traverse the directory could loop over the same directory structure for ever.
In conclusion, Linux does allow hard links to directories, but it only allows hard links to a directory from itself and it's parent directory. These are the two hard links to which you refer.
[Neil] Some ambiguity there. If there are more then one links before the rm command, there will be at least one after the rm command, so the file space isn't freed. Of course rmdir deletes both links to a directory.
[Jason]
Okay, I've looked into this more: It appears that, for some reason or another (Another Gang member will no doubt know why) it's a Bad Idea to make hard links with directories. Look here:
root:~# ln lala foo
ln: `lala': hard link not allowed for directory
root:~# strace ln lala foo
execve("/bin/ln", ["ln", "lala", "foo"], [/* 17 vars */]) = 0
uname({sys="Linux", node="jpc.example.com", ...}) = 0
brk(0) = 0x804db0c
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=19148, ...}) = 0
mmap2(NULL, 19148, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\\\1"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1494904, ...}) = 0
mmap2(NULL, 1256324, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40019000
mprotect(0x40144000, 31620, PROT_NONE) = 0
mmap2(0x40144000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12a) = 0x40144000
mmap2(0x4014a000, 7044, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4014a000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4014c000
munmap(0x40014000, 19148) = 0
stat64("foo", 0xbffffc10) = -1 ENOENT (No such file or
directory)
lstat64("lala", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0
write(2, "ln: ", 4ln: ) = 4
write(2, "`lala\': hard link not allowed fo"..., 43`lala': hard link not
allowed for directory) = 43
write(2, "\n", 1
) = 1
exit_group(1) = ?
Notice, that, in the strace output, link() doesn't actually get called. So is this 'ln' just trying to save us from outselves, or is the kernel or glibc? I wrote this quick C program:
See attached creighton.c-link.c.txt
root:~# link=/home/jason/prog/c/link
root:~# $link lala foo
Error while linking: Operation not permitted
root:~# strace $link lala foo
<sniped syscall trace that looks very similar to ln's strace output....the
important line is:
link("lala", "foo") = -1 EPERM (Operation not permitted)
<sniped more>
root:~#
So, 'ln' sees that you're trying to hardlink directories and doesn't even attempt it, instead giving a useful error message. And since we see the link() syscall being proformed, it means that the kernel doesn't allow hard linking of directories, and it's not the glibc wrapper that refuses to hardlink directories. (If it had been glibc, we would not have even seen link() being called: the link() in glibc would have returned without calling the link() syscall.)
Now, back to your original question: I have no idea why creating hard links to directories is a bad idea. (It must be, or Linux would allow root to do it.) LG #35 Answer Guy column has something about this: (Quoting from the article I linked to in my other email)
<quote>
Some versions of Unix have historically allowed root (superuser) to create hard links to directories --- but the GNU utilities under Linux won't allow it --- so you'd have to write your own code or you'd have to directly modify the fs with a hex editor
<end quote>
Well, obviously, it's the kernel disallowing it, not GNU utilites. However, LG
#35 was some time ago, so things might have been different then.
[jra]
User-added hardlinks to directories are forbidden because they break the directed acyclic graph structure of the filesystem (which is an ASSERT in Unixiana, roughly), and because they confuse the hell out of file-tree-walkers (a term Multicians will recognize at sight, but Unix geeks can probably figure out without problems too.
(Did I get that right, Ben?![]()
And indeed, anyone who's ever done
# rm -rf .*
in a user's home directory to clear out all the dotfiles prior to dropping the user will no doubt understand why even the system 3 links to a directory (. in ., .. in children, and the named link in the parent) are often 2 too many.
[Jason]
Ouch! Never thought about that, I'll have to remember that....
[Jason]
Yes, I wrote that before I got to read the rest of the thread. With symlinks, at least it's easy to tell when there's a loop. (BTW, I seem to recall an option in Wine to ignore symlinks because they causes some Windows programs to get very, very confused.)
~/tmp$ ln -s file1 file2
~/tmp$ ln -s file2 file1
~/tmp$ ls -l file*
lrwxrwxrwx 1 jason users 5 Jul 20 16:59 file1 -> file2
lrwxrwxrwx 1 jason users 5 Jul 20 16:59 file2 -> file1
~/tmp$ cat file1
cat: file1: Too many levels of symbolic links
~/tmp$ strace -e trace=open cat file1
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("file1", O_RDONLY|O_LARGEFILE) = -1 ELOOP (Too many levels of symbolic links)
cat: file1: Too many levels of symbolic links
[jra] User-added hardlinks to directories are forbidden because they break the directed acyclic graph structure of the filesystem (which is an ASSERT in Unixiana, roughly), and because they confuse the hell out of file-tree-walkers (a term Multicians will recognize at sight, but Unix geeks can probably figure out without problems too.
[Jason] I just thought of something else:
Disk space management and memory management are the same thing.
UNIX has chosen reference counting for disk space management. Reference counting can't deal with cyclic (Right word? I mean data structures that refer to themselves.) data structures, and thus hardlinking directories is disallowed. If Linux used garbage collection, it would be okay to hardlink directories, if very confusing.
But using GC on filesystems would be slow and offer no real advantages, so reference counting is okay.
Well, root must be able to create hard links,
because of the option ln --directory (-d, -F).
[Jason] Try it:
root:~# mkdir dir1 root:~# ln -d dir1 dir2 ln: creating hard link `dir2' to `dir1': Operation not permitted
[Thomas]
Then in the same thead....
[jra]
And indeed, anyone who's ever done:
# rm -rf .*
[Jim]
The GNU version of 'rm' will refuse to attempt recursion into or unlinking of . and/or .. entries.
However this is still a classic sysadmin tech question. It's almost as common as: "How do I remove a file named -fr?"
[Ben]
rm -- -fr rm ./-fr perl -we'unlink "-fr"' "F8" in Midnight Commander![]()
[Thomas]
You forgot to mention using Emacs.... You also didn't mention jettisoning the disk into space...
[Jim]
How do you SAFELY remove all the dot files and dot directories under the current directory?
My best answer under Bash is:
rm -fr .??* .[^.]
[Ben]
rm -rf .[^.]*
is what I've always used; this would, of course, ignore files named "..." and so on, but that's not much of an issue in practice.
[Jim]
... this gets anything starting with a dot and followed by at least two more characters (thus . and .. won't match) and also it gets anything starting with a dot and followed by any single character other than a dot (thus getting such unlikely entries as .a .\? etc). This pair of glob patterns should match every possible dot entry except . and ..
However, I preface it with under bash. I happen to know it will work under ash, zsh, tcsh, and most other modern shells. However, if I was on a particularly old shell I'd have to check. The negated character class might not have been in the glob libraries of earliest Bourne and C shells.
If I really had to write a script for maximum portability:
rm -fr .??*; rm -fr `echo .? | grep -v '\.\.' `
... remove all the longer dot entries in the obvious way, then let echo match all the two character dot entries and grep out the .. entry explicitly.
[Ben] Other interesting situations come up when you want to delete a file named in a foreign language. I've run into a Russian song name that even Midnight Commander couldn't handle. Cutting and pasting to "rm" didn't help either (clearly, some of the characters were the "escaped" types, but I had no idea which ones - long story short, the machine didn't have any Russian fonts on it.) Even "ls -b" failed for the above, for whatever reason. I ended up doing something like
perl -wle'/match/&&print for <*>'
where "match" was a small substring of the characters in the name. Needless to say, "print" became "unlink" when I saw that only the appropriate file matched.
entering into the interactive modeFrom Joydeep Bakshi
Answered By: Thomas Adam, Heather Stern, Kapil Hari Paranjape, Jason Creighton
Hi all,
I can enter into the interactive mode of Redhat by pressing key i at the
time of booting. but this technique doesn't work in Debian . how to get the
same thing in Debian ?
Please let me know.
thanks in advanced.
[Thomas] Joydeep,
Permit me to make an observation if I may, but this is not the first time that you have tried to emulate RH functionality within Debain. I am all too familiar with RH's "i" startup, and to try and do this in Debian would require a complete re-write of the /etc/init.d/* run-level files, not to mention /etc/iniitab and a complete re-write of "update-rc.d". In short, YOU CAN'T!
[Heather]
Actually, you do it in Debian in a way that works in every single distro that has a sysV-like init sequence (in fact, this would work fro RH, as well) --
Go into runlevel 1 (single user mode)
'sulogin' if needed, but anyways you are at a root prompt.
Walk one at a time through the sequence of commands that would be run on the way to the normal runlevel. This is the number next to "initdefault" in /etc/inittab. In Debian this is, curiously, runlevel 2. Most others use 3 if they mean text mode, 5 if they mean GUI, which are mostly holdovers from Solaris, where runlevels are travelled through, not jumped into. In an untweaked Debian 2 through 5 are all little clones anyway, 2 is just the earilest "normal" runlevel.
Essentially a human traversal of the autoexec sequence. This is much more throough about being interactive than RH's "I" mode, which I suspect skips a few things.
Anyways, I could easily imagine you having hacked the fairly ignored "runlevel 4" to point at a "debug" copy of the /etc/init.d directory, where every script asks if it's okay before running its partner in /etc/init.d. This would not entail hacking inittab (except if you want that the default, annoying behavior) nor update-rc.d (though you would have to USE it once per script flavor to establish that it's not in control of the links in runlevel 4), but whenever a truly new app added something to init.d, you'd need to tweak runlevel 4 to be its proper companion. Hmm, if the "ask if ok" script is generic enough to check its own linkname, it could in fact be only one script. So that's your contribution to the thread, Joydeep, I'd love to see it, and maybe it can be added to the debian system's ordinary utilities.
You could also use runlevel 7, 8, or 9, which are not in the spec for init, but work because it was easier to simply accept numerics than fuss over this minor detail. I believe but would have to test, I don't think update-rc.d gratuitously adds anything to these extra runlevels. BUT BEWARE since they are not normal they also aren't listed among the runlevels that have getty access in /etc/inittab. I'd recommend adding at least one getty console.
[Thomas] My advice is that you cannot have the best of both worlds in this instance. Either you go back to using RH (with apt4rpm) installed or you switch to using Debain and do things the Debain way!
[Heather]
Debian does not require you to do things the debian way, it's just a bunch of planned structure...
Lots of otherwise fanatic debsters use their own kernels, not "the debian way" which is make-kpkg to cook up .deb files, then install those, and let debconf handle lilo. Me, I do way too much dev work on kernels intended for others to allow it to manage my boot sequence. I keep one debian stock kernel as a failsafe and that satisfies "lilo needs kernel-image".
Certainly, one could install any useful distro, then wipe its packaging system out (cleans a lot of space from var) and thereafter ONLY use source from known projects. But this ruins the provided means to get at sources and binary packs optimized for your setup.
[Thomas] Debian handles rc.d files better than any disrto I have used. I'm going to stop with plugging Debian now, in risk of starting a war...
[Jason] Couldn't you just drop a script in /etc/rc4.d (or whatever the right directory is), name it "S00askifok", and have it loop over scripts in /etc/rc2.d/, asking if it's okay to run each one? Or am I missing something?
[Kapil] I am not sure what RH's "interactive" mode does but if it just asks you whether or not to run a script before running it then it is not really all that complicated to do in Debian. All the start-stop scripts are run from /etc/inittab by a master script /etc/init.d/rc which is what you need to edit.
The actual running of the commands is done at the very end of the script after creating a "command-list" called CMDLIST. This list is run by calling "sh -c $CMDLIST". You could either:
1. Modify /etc/init.d/rc to run the CMDLIST differently (and
interactively). (Allows you to see what each script has done before deciding on the next step). or
2. Modify /etc/init.d/rc to create the CMDLIST interactively. (This way you only need "minor" hacking of the script).
Save the changed script as /etc/init.d/rc.RH and change /etc/inittab to use this script instead of /etc/init.d/rc.
You could even make this fancier and make it save the answers as a runlevel of your choosing.
Hope this helps. If you really insist I could try to hack up versions of these scripts.
SuSE 8.2 Linux Distribution and Soundblaster 16From Chris Gianakopoulos
Answered By: Benjamin A. Okopnik, Chris Gianakopoulos, Kapil, Jason Creighton, Les Baron
Hello Gang,
[Ben] Hey, Chris!
Here is my final observation with the lates SuSE 8.2 Linux distribution.
I have a Creative Labs Soundblaster 16 (not a clone but the real thing),
and the YAST2 configuration tool does not properly set the hardware up
properly (or it does and the chosen driver does not interoperate properly
with my card). The user will be led to believe that the card is set up
but, no sound will be heard from the speaker. Yes, I even played with the
volume control (via the mixers).
When I did a cat on /dev/sndstat, there was an the DSP and some other thing that I cannot remember were not activated. Rather than wrestle with things, I created the following script to activate the sound stuff.
#!/bin/bash /sbin/modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330
[Ben] You could also do this by simply entering the module name and parameters into "/etc/modules". Everything in there gets auto-loaded (at least under Debian - SuSE might be a bit different) by "/etc/init.d/modutils" on startup. In fact, IIRC, I had this exact entry - params and all - on my old laptop.
echo "sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330" >/etc/modutils
No need for a separate script.
It is worth pointing out that Debian's module management relies on the module name appearing in '/etc/modules', and the options going in '/etc/chandev.conf' -- Thomas Adam
Note that I am using the module sb.o rather than the other one (I think that
it was sb_16.o) that YAST2 chose. Normally irq=5 is the common setting; I
chose irq=7. The other parameters are fairly standard for a soundblaster.
One caveat here is that some paralell ports also operate on IRQ's 5/7 and if one is not careful you could get a conflict. -- Thomas Adam
This information is also available in
/usr/src/linux/Documentation/sound/Soundblaster
That'