<< Prev  |  TOC  |  Front Page  |  Talkback  |  FAQ  |  Next >>
LINUX GAZETTE
...making Linux just a little more fun!
More 2¢ Tips!
By The Readers of Linux Gazette

See also: The Answer Gang's Knowledge Base and the LG Search Engine


linux baby clothes?

Tue, 8 Apr 2003 12:40:53 +0200
Robos (the LG Answer Gang)
Question by J.Cooper (koopzy from optushome.com.au)

gday - how'd it go with the inquiry about Linux baby clothes?

Help Wanted #5, Issue 67

How about this one here:
http://www.thinkgeek.com/tshirts/kids


bookmark conversion

Tue, 08 Apr 2003 11:03:48 +0300
Miron Brezuleanu (mbrezu from home.ro)

Hi,

I have a www browser bookmark conversion problem (and a partial answer :) ). I'm currently using Opera as a browser but I wanted to also use Konqueror. As always, there is an issue with the bookmarks: it's difficult to "port" them. After one hour of groping and hacking I managed to write a little script that does the opera->konqueror port. But it is ugly and it doesn't work in the other direction.

Do you know of such bookmark converting apps/scripts (on linux!)? Konqueror (in kde 3.0) seems to know how to import/export bookmarks to netscape and mozilla, but not more.

I hope this qualifies as a Linux question :) . It's an all platform issue, but that doesn't mean it's not linux, right ? :)

I included my partial-answer-script. Maybe someone can use it :) . I don't really know perl, my script is probably very ugly but it worked for me. It's a filter, you have to use redirection and then copy the output file to the konqueror bookmark file.

Thanks,
Miron Brezuleanu

See attached op2konq.pl

[K.-H.] Hmm... opera has some bookmark export variants too.
Like file-export-bookmarks_as_html looks like a very much universal export format if you simply load that html page and klick on the bookmark you want.
As I remember netscape bookmarks are a simple html layout as well which you can directly load as an html-page.


Cups

Wed, 9 Apr 2003 12:33:11 -0700
Rick Moen (the LG Answer Gang)
Question by Leon Coertzen (leonc from workforce.co.za)

This is a multi-part message in MIME format.

------=_NextPart_000_0030_01C2FDD5.E597FE00 Content-Type: text/plain;

charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I'm sure you're unaware of this, but you sent your message with extraneous MIME headers like the foregoing, and with your entire message printed a second time in HTML. Please change your mailer's settings to stop it from doing this. Instructions are here: http://expita.com/nomime.html#outlook5

For more information, please see (http://www.linuxgazette.com/tag/ask-the-gang.html#non_text)

Normally I leave this part out. However, since I note that Rick has had to utter this little macro an awful lot of times this month, I figured I'd help a few souls out there by seeing it get mentioned. The answer in this case is tiny - so this brings it up to a whole Two Cents worth :D -- Heather

How do you set printing priorities with cups?

Using the -p option:

$ /usr/bin/lp -d LaserJet -p 90 foo

...gives the job of printing file foo a priority of 90 out of 100. Default priority level is 50.


DOS functions in Linux' gcc?

Wed, 23 Apr 2003 21:50:38 +0100
Jimmy O'Regan (the LG Answer Gang)
Question by Arif Ali Saiyed (sarifali_007 from rediffmail.com)

Respected sir/ madam ,

can i use execute interrupt 11h and 13 h as i can use in TURBO C using int86 function , plz give some inforamtion or notes how to do that in linux using gcc thanking you in advance

I'm not sure if it's possible in the same way it is in DOS, but it's definitely not the done thing. Wine (http://www.winehq.com) has code in its DOS emulation dll, which you could probably use in a similar way. Look in wine/msdos/ and wine/dlls/winedos

Int 11 is equipment check and 13 is disk services, right? For int 11, you might try using Discover (http://www.progeny.com/products/discover). For int 13, you'd need to be more specific


Internet by call in USA?

Thu, 10 Apr 2003 12:39:55 +0200
Uwe Altmann (uwe.altmann from web.de)
Question by matthi (matthi from gmx.li)
In response to Help Wanted #6, Issue 89. -- Heather

Hi matthi

In US, visit the next public library - there are some PCs in every public library with which you can access internet (and therefore via webmailer your mail) for free. Also, many Hotels/Motels have free web-access by LAN or, al least, an PC with freee webaccess (motels with moderate prices too, afaik motel 8, motel 6) - you can choose your accomodation by that.


[GL] nis problem

Wed, 23 Apr 2003 15:11:47 -0700
Dan Wilder (SSC sysadmin)
Question by glue-list (http://www.ssc.com:8080/glue/)
The author here - a member of the GLUE list, contacts for "Groups of Linux Users Everywhere" - was really hoping he was wrong, but this is how the dreaded YP stuff really works. A tip for all who have to deal with NIS. -- Heather

1) I search various web-sites, but I cann't find this.my nis-server and nis-client works properly. ypbind at client detects the nis-server also. yp.conf,network files all r fully configured in client and server both. "ypcat passwd" also displays the user info in both client & server. But when I create any new user at nis-server,I can get user-info by running "ypcat passwd" only when then I execute make command in /var/yp or "ypinit -m" in /lib/usr/yp folder AGAIN.I want to know that IS it Required to execute MAKE COMMAND AGAIN & AGAIN When any New User Created ?

In a word, yes.


Pctel hsp micromodem 56 config.........RedHat 8.0

22 Apr 2003 23:26:58 +0530
Kapil Hari Paranjape (the LG Answer Gang)
Question by Vivek Ravindranath (vivek_ravindranath from softhome.net)

Hi there,

I wonder if this would be useful to some of you out there.I had some problems configuring my Pctel PCI modem.After a lot of searching I found a driver at linmodems.org.The compilation went on perfectly but when I tried to load the modules with insmod I could not load the modules and it would display that the module is compiled with GCC 3 and hence cannot be loaded.

[Kapil] Thanks for your hints ...
Note that many distro kernels are compiled with gcc 2.95 (in fact I don't believe I have successfully compiled a kernel with gcc >= 3.0).
Thus a possibly better solution is to install gcc-2.95 and compile kernel modules using that.
An alternative is to re-compile your kernel with gcc 3 and then you can use modules compiled with gcc 3 as well.

If you are facing the same problem do this....

1.At the console type

insmod -f pctel
insmod -f ptserial

(instructions on installing the modules can be found in the readme file found with the package). (If you are using the same tarball from linmodems.org i.e.,pctel-0.9.6.tar.gz you have to type commands as it is). You will see some messages but it does not matter much.

[Kapil] Generally speaking, I would do an "insmod -f" only if I was in a hurry or if I couldn't even boot-to-fix witout it. But it should never be allowed to be a "permanent" solution.

2.If you are using KPPP to connect to the internet do this..... create a new connection,fill in the connection details and other things. Then go to the modem tab and click on modem commands.In the section named initialization string 2 give the following "AT&FX1&C1" and press ok.

3.Instead of loading the modules each time the above given commands you create a script which you can execute before starting kppp. I can't assure that it is going to work,but you might as well give it a try.

Hope this will help. Vivek.

[Kapil] Me too.


Debian upgrade howto

Sun, 13 Apr 2003 01:47:20 -0700
Rick Moen (the LG Answer Gang)
Question by ARJUN (arjun2 from hotpop.com)

how to upgrade the existing debian version without reinstalling ? (for an ex. potato to woody)

Debian's built-in upgrade process is controlled by the /etc/apt/sources.list file and by the apt-get package-retrieval utility. sources.list specifies where to look for new packages (Web or ftp sites, CD-ROMs, hard drive directories, etc.), and apt-get fetches both available-package catalogues and the packages themselves. Your sources.list probably looks like this:

deb http://http.us.debian.org/debian stable main non-free contrib
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free

Notice the word "stable". At the time you installed Debian, "stable" referred to 2.2/potato. These days, "stable" has progressed to 3.0/woody: The alias name "oldstable" can still be used to refer to potato, or you can just use the name potato.

That is, if the machine you're talking about has Internet access, you can upgrade in two stages, like this.

1. Edit sources.list to refer to "potato" by name:

deb http://http.us.debian.org/debian potato main non-free contrib
deb http://non-us.debian.org/debian-non-US potato/non-US main contrib non-free
deb http://security.debian.org potato/updates main contrib non-free

As root, retrieve the latest available-packages list for potato:

# apt-get update

Now, upgrade all installed packages to the latest for the potato series:

# apt-get dist-upgrade

2. Re-edit sources.list to refer to "stable" (which is now 3.0/woody):

deb http://http.us.debian.org/debian stable main non-free contrib deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb http://security.debian.org stable/updates main contrib non-free

# apt-get update
# apt-get dist-upgrade

The point of doing the upgrade in two stages is to avoid introducing dramatic version differences, all at once.

However, it may be that pulling down a hundred or so packages from the Internet isn't practical. If so, you can acquire a set of Official Debian 3.0r1 CD-ROMs. The full set is 7 CDs. (You don't need to get all seven, if you don't want to.) To register them in sources.list, first comment out any existing "deb" lines in that file, and then run the apt-cdrom utility once for each CD. Then:

# apt-get update
# apt-get dist-upgrade

That's just about all there is to it. Make sure you take note of any warnings or advisories shown to you during the upgrade process.


I was looking for this a long. and U have given me the solution. I know that "thanks a lot" is not enough. any how wish u my best wishes - ;)))


more verbose and useful assert()

Sun, 6 Apr 2003 12:32:02 -0700 (PDT)
Mike Sharov (msharov from talentg.com)

In reference to the assert() macro that good programmers use to catch bugs that should be fixed before the user sees them -

Unfortunately, when a programmer debugs somebody else's code, an assert failure may be rather difficult to interpret. What does assert(p == NULL); failure mean? You will not know until you look at the source code at that point and try to understand what's going on. But what if the assert was changed to:

assert (p == NULL && "Please deallocate your GC handle before allocating a new one");

Now the programmer can read the message, which will be printed along with the rest of the stuff in the assert, smack himself on the forehead and shout "doh. I know where the problem is!" The assert works because the string pointer is always non-zero and if p == NULL, will not cause the assert to fail.

This seems pretty obvious, now that I have figured it out, but I have never seen this technique used in any piece of code. The effect can be achieved by using a custom assert library, but why introduce a dependency when you don't have to?

[Jimmy O'Regan] Would it not be better to use

if (!assert (p == NULL))
    fprintf (stderr, "Please deallocate your GC handle before allocating a new one");
[Didier Heyden] Nope; assert() actually aborts the program if its argument is 'false.' This means that your own message would never be printed, even if the 'p' variable were NULL. Instead, you'd see something like:
PROGNAME: SOURCE.c:31415: FUNCTION: Assertion `p == NULL' failed.
Aborted
then the program would terminate (and possibly dump core).
OTOH, with Mike's method you'd get a message similar to:
PROGNAME: SOURCE.c:27182: FUNCTION: Assertion `p == NULL &&
 "Please deallocate your GC handle..."' failed.
Aborted
The reason his solution works is that a string constant in C (even an "empty" one) always evaluates as a 'true' condition (a non-null memory reference indeed).
Another advantage of sticking with "simple" assert() macro calls is that you can disable all of them at once, merely by #defining the NDEBUG macro at compilation time. In that case, all assert() instructions will expand to nothing at all.

[Jimmy] (or similar, apologies for my rusty C)

[Didier] Naaah. :) I wish I could remember the specific syntactical issues of my own rusty programming languages as precisely as you do. Expect my over-volatile memory to bring back sooner or later awful games of 2^^7 errors such as
#/usr/bin/perl -W

using strict;

my despair = {'Why', 'the heck', 'doesn't this', 'work'}

for each (@cry in $despair) { echo @cry, " (sob) " }
(Don't laugh: it's based on countless true stories).


carrier errors

Wed, 23 Apr 2003 12:28:18 -0400
Kapil Hari Paranjape (the LG Answer Gang)
Question by Harry (kuhman from myrealbox.com)

I came across your "Answer guy" site while searching for info on ifconfig errors. Unfortunately, it did not help with my problem, but since you provide an e-mail link, I'm not too proud to ask.

The question I'm trying to understand is "what are "carrier" errors. I'm getting "carrier" errors on 100% of my my TX packets and can't connect to the rest of the network, but the man pages for ifconfig don't tell me what the errors are and I'm at a loss so far to find information on this.

Carrier errors is jargonese for Cable fault. Please check the cable you are using (try a different one if you have one). Of course it could also be a loose contact problem.
Carrier = Signal Carrier = standing wave on which signals are transmitted using "modulation". That's about as much as I remember from by College course in Electronics.

The complete problem is that I'm running both WinXP and Linux (Knoppix booted from CD) on an HP notebook. Knoppix used to boot and connect to the network fine, but now it has stopped working! I'm running strictly from CD, no install or configuration information on my system, just the normal Knoppix auto- configuration that worked fine on the hardware before, yet now for reasons unknown I get these carrier errors and can not transmit anything on the network (sniffing the wire confirms that nothing is going out). Obviously I can no longer get my network settings with DHCP (which also used to work fine on my local network for this computer), but I cannot manually configure the card to work either. Do you have any insight to what might cause this?


Thanks. Unfortunately, in this case the "carrier errors" are not cable errors. Here are the details that confirm this:

The hardware works 100% correctly under WinXP, including sniffing the cable and seeing absolutely no errors in a large number of packets.

The hardware used to work under Linux (Knoppix booted from CD) but no longer does, even with the very same bootable CD. There are no packets getting out onto the cable at all, again confirmed by sniffing the cable.

A completely different cable was also used to route the notebook computer to a separate hub where the packets could be watched by another computer. Still no packets were on the wire.

I wrote earlier: Carrier = Signal Carrier = standing wave ...
So at least I feel partially vindicated. There is no standing wave hence no signal :-)

Apparently other Linux issues can manifest themselves as carrier errors, but I have not yet been able to determine what counts as a carrier error in Linux.

Let's apply Occam's razor here based on the fact the "it used to work with the same Knoppix CD". What could have changed?
  1. Not the CD. And hence not Linux or the software that comes with it.
  2. Not the cable (this has been checked by you).
  3. Not the hardware (it works under that other OS so its not critically damaged).
Thus the problem has to be with the remaining "soft" component. That is BIOS/flash settings. Some Network cards store some settings. You could examine these settings using the mii-tools. Additionally, check whether you have made some changes to the BIOS.

I just wanted to give you some feedback. Thanks very much for the reference to mii-rtools, it really helped. It looks almost certain at this point that Microsoft's "security updates" are changing NIC configuration eeproms. And, of course, Microsoft knows not to use the bad configuration and works fine with the change, but another OS like Linux that trusts that the configuration in the eeprom is what the manufacturer or user wants fails. I've found several other users that have been trying to figure out what happened, why their CD used to work fine but now fails on the same system. We all accepted Microsoft "security updates". We are now trying to get a test done with some networking tools that can watch the content of the eeprom and catch when it changes, so I expect to have evidence to support this soon.

I'm pretty sure it can - I know a dyed-in-the-wool linuxer who currently has to consider his happy little Orinoco family wireless pcmcia card a piece of junk because a "helpful" Microsoft update has put it into a state that Linux and BSD tools don't seem to be able to get it out of. Of course it works fone in the other OS. Grrr. -- Heather


architecture

Wed, 9 Apr 2003 10:51:11 -0700
Rick Moen (the LG Answer Gang)

I have seen that different linux architecture are present based on different processor architecture. like i386, i586, i686 etc. what are these & how to know the architecture of my processor ?

JK, Linux provides an excellent facility for this sort of thing, in the form of /proc/cpuinfo. Here's the one from the server I'm mailing this from:

For those ignorant of or who simply are happy to avoid the text editor vi (or its friendlier cousin vim) :r is a command which, when issued from command mode, will read what comes after it. :r! runs a command, which can be nice for inhaling man page fragments, too. Making this a Three Cent Tip... -- Heather
:r /proc/cpuinfo

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 7
model name	: Pentium III (Katmai)
stepping	: 2
cpu MHz		: 498.755
cache size	: 512 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips	: 996.14

There. More than you really wanted to know about the host's CPU. Of course, the above gives information about the hardware. The machine's kernel may or may not have been compiled with appropriate optimistions, though that will generally be included in the output of uname -r (kernel release).

[Pradeep] i386, i586, i686 are different kind of processor architectures developed by intel. The following link has some info about this: http://www.rebourne.org/chiparch.htm
In the terminology of the hardware hackers, these are considered the same architecture (32 bit Intel, "i386" if you're looking in the kernel source tree). There are a few optimizations, but the way they think is similar. Contrast a Sparc, a Strongarm (found in many handhelds), or even Intel's own ia64 ("Itanium" if you prefer them by name). -- Heather


floppy woes

Mon, 14 Apr 2003 08:11:21 +0530
Kapil Hari Paranjape (the LG Answer Gang)
Question by Ronald Russell (ursacava from mindspring.com)

I'm running SuSE 7.1 and Win98 on separate hard drives in a 900 Mhz Celeron machine. Things were working fine until recently, when I could no longer access my floppy while in SuSE. The same drive reads and writes perfectly in Win98. When attempting to mount the floppy either by clicking the desktop icon, or by typing the command in the terminal, I receive the error '/dev/fd0 is not a block device'. What could have happened to cause this, and what can I do to repair it?

Some possibilities suggest themselves.

  1. The device node is not properly created. Run 'ls -l /dev/fd0' and check.
  2. You have a modular floppy driver which is not loaded. Run '/sbin/lsmod' to check whether the driver is loaded.
[Didier Heyden] A third possibility is that your floppy disks and/or drive are actually defective. A 'mount' command issued on /dev/fd0 (assuming that this block device file and the kernel modules are all set up properly) will first try to access the disk's boot sector. If any I/O error occurs then, the 'mount' will fail with the error message you mention.
Take a look at the system log files (usually /var/log/messages, but you can also use the 'dmesg' command). Check whether errors like
[...] kernel: end_request: I/O error, dev 02:00 (floppy), sector 0
are present; if so, try to mount a few other floppy disks. If the system keeps producing an error similar to the above, chances are that you will have to replace your floppy drive very soon -- in particular if the very same diskettes are correctly mounted and read on some other (Linux) box.
There was a time when such a problem could be caused by a drive head "misalignment", but I'm not sure it's still the case these days.
I think it can be; also, depending on your console setup, you might not have to dig in the logs to see these complaints, as they might spew on your console rather vocally.
First thing I'd check is whetehr there's a file in your /dev/ area that used to be your floppy node, fd0 or any of the others starting with fd. -- Heather
I don't know much about WinXX, though I guess that that other OS either does more retries before giving up or is too lax regarding sanity checks prior to granting access to the user (I can't help favoring the latter explanation).


firewalls

Wed, 09 Apr 2003 17:52:39 +0200
Didier Heyden (the LG Answer Gang)
Question by deepa lakshmi (deepaselvaraju from yahoo.co.in)

On Wed, 9 Apr 2003 13:48:45 +0100 (BST), deepa lakshmi wrote:

hello

Hi,

i have a firewall machine .i also have a machine with ip 192.168.1.7 behind the firewall.

i added prerouting rules to forward incoming request to internal web servers which are behind firewall.

now i want machine with ip 192.168.1.7 to have internet access through firewall. i have tried with this rules.but no resonse fron machine rules are

-A POSTROUTING -o eth0 -j SNAT --to-source 202.54.100.54
-A FORWARD -i eth1 -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

but it's not working.

First, let me suggest to you to read carefully:
http://www.linuxgazette.com/tag/ask-the-gang.html#doesnt_work

before saying that. Since we have no means to guess what actually happens on your system when you try the firewall rules you mention, you cannot expect us to be able to provide much help in exchange for so little information as you've given.

For example, is the above ruleset complete, or is it (as is more likely) only a subset of the actual rules you're using? Are these rules accepted at all when you enter them on the command line? What do the log files on your firewall machine say? Did you try a packet sniffer such as "tcpdump" or "ethereal" on its network interfaces? Did you make sure all required kernel modules have been compiled, installed and are actually loaded? Is "IPv4 forwarding" enabled? etc, etc.

I'm not an "iptables" expert myself, but I think the "-t <table>" option is not an unimportant one.

Here's a precious resource about setting up a Netfilter/iptables firewall. It covers pretty much everything (including source NAT and masquerading) and has a number of useful examples:

http://iptables-tutorial.frozentux.net/iptables-tutorial.html

<solemnly> Beware that in order to set up a firewall in the Right Way, you must definitely know what you're doing. Help yourself. Googlesearch. Read howtos, tutorials and examples; once you have understood them, give them a try. Observe the results carefully. Then -- only then -- ask a precise question. :) </solemnly>

[Jason Creighton] Well, a problem I see is that for the SNAT rule, you need to specify the table, like this:
-t nat -A POSTROUTING -o eth0 -j SNAT --to-source 202.54.100.54
All the NAT rules go in the (guess what?) "nat" table. The default table is 'filter', which is used when no table is specified.


Internet Cafe ?

Tue, 08 Apr 2003 20:54:43 +0100
Jimmy O'Regan (the LG Answer Gang)
Question by Wally Bannon (wbannon from nadf.org)

Wally Bannon wrote:

I have a client who is Aboriginal here in Northern ontario looking to set up a Internet Cafe. There are no location in the city of Thunder Bay. Can you direct me to where I can get info on " how to set up or establish an Internet Cafe" This person is a youth age 25 who can access Gov't funding for assistance to capitalize the project

If you want to use some combination of both Linux and Windows clients controlled by a Linux server, try Zeiberbude:

http://zeiberbude.sourceforge.net

If you want Linux clients connecting to a Linux server, you could also try DireqCafe:

http://akinimod.sourceforge.net/icafereal.html

This is built for the Linux Terminal Server project:

http://www.ltsp.org

If you want Windows clients connecting to a Linux server, try Prepaid Accounting:

http://quozl.netrek.org/ppa

If you want Windows clients connecting to a Windows server, you'll have to try asking somewhere else.

[Faber Fedor] If you go to www.google.com and type in "internet cafe howto" the first link is back to us -- http://www.linuxgazette.com/issue70/tag/9.html ! There are several other good links mentioned there on google.


Making IPTABLES complain...

Tue, 8 Apr 2003 12:46:53 -0600
Jason Creighton (androflux from softhome.net)
Question by =?ISO-8859-1?Q?\=CE=B6=BF=C0\?= (ryujin_ssdt from yahoo.co.uk)

I have a little question. I have a iptables rule set that works perfectly. The problem is that to check if it is working as it has to I have to check the long log files every some time.

I really would like my laptop to complain when some unauthorized conection is attempted in real time or when my laptop tries to connect to other host without me doing it. Much the way Zonealarm complains. I just want the system to tell me that something strange is going on without me having to see the logfiles all the time or installing a dedicated IDS (snort).

I think if I can get iptables to send all the dropped packets somewhere a normal user (not root) can read them, I can grab that data periodically and display a little alarm with it using maybe karamba?? Any sugestions??

Just a little personal firewall for my desktop, since linux is becoming a candidate for personal desktop (It is already for me) this feature would be a good add-on.

[Jason] Now, do you want the data that the packets contain, or just the packet headers? The LOG target, will, as you know (if you're reading log files) give that information. If you really need the data, look into the ULOG target. The ULOG target sends the packet through a netlink socket to any listening process in userspace, so you'll need a daemon running to "catch" all those packets. Search the web for "iptables ULOG target", I haven't done much research into that method, so I don't know how well it would work.
It sounds like you want a pop-up window every time somebody sends you a packet that iptables drops. That's tricky to implement. Here's a half-way solution:
tail -f /var/log/syslog | perl -ne 'print "\a$1\n" if (/.*?firewall: *(.*)/)'
Assuming you have the --log-prefix option that's given to the LOG target set to 'firewall:' and that the kernel messages are ending up in /var/log/syslog, this will beep and print the packet details whenever a dropped packet comes in. You could then leave this running in a terminal. You might also want to have the 'limit' match on your logging rule, for two reasons:
There's probably some better solutions out there, but this works if all you want is the packet details. Also, it's probably overkill to have perl doing this.
[Matthias] You could configure your logging client to log your iptables log to a second file which is group writeable (e.g. group "log") and then parse this log file.
You should search for a /etc/syslog.conf or similar. If you have problems you may ask on the list how to configure your particular logging client (syslogd) on your distribution.


iso

Wed, 9 Apr 2003 09:33:00 -0700
Rick Moen (the LG Answer Gang)
Question by mark (emery_558 from hotmail.com)

i have an iso image how do i burn it to auto run from cd

[Rick] You use cdrecord.
Yes, cdrecord is available for Windows, albeit usually built under cygwin, so you might need the cygwin runtime libraries. We also had a considerable discussion of many avialable types of CD burning software in a past issue: Best of ISO Burning Under Windows
I've seen that there is software to soft-mount a .iso raw CD image file as a filesystem under Windows - much like the way Linux and other UNIX users can "loopback" mount them (so they look like a real disc). Search Tucows or some other MSwin software archive to find that stuff. -- Heather

its easy cd/dvd.6

[Rick] No, when you're mailing a mailing list called linux-questions-only@ssc.com, it most definitely is not Roxio Easy CD/DVD 6 for MS-Wind*ws. It's cdrecord. Get it?
Much thrashing by the gang about whether a reader can "get" that we're going to describe free software to them when they haven't really got their hands on that first Linux CD yet, snipped. Suffice it to say we support folks escaping from addiction to the Borg's sugar cubes, but if you have proprietary software, questions about it really ought to go to its paid support staff. -- Heather
[Karl-Heinz Herrman] if it is an true and real iso9660 (plus extensions like Joliet or Rockridge) yous take it and burn as it is onto a CD. That's it.
To add some guesses myself:
In any case -- the bootability of a CD or the autorun.inf file are either in the iso or not. If not, it won't "auto run".


mcrypt

Wed, 2 Apr 2003 19:58:38 -0500
Ben Okopnik (the LG Answer Gang)
Question by Hans Borg (Hans.Borg from Physics.umu.se)

Have started to play around with mcrypt (my version 2.6.4) mostly to learn. It works fine, but have a Q:

Having an encrypted file on a (read only) CD, I would like to know if there is any way to use the CD-file as input only and needed working files directed to a normal (R/W) diskfile ?

Have tried redirection "mcrypt .... CD-file > HD-file" but mcrypt reports "read only media". Any tricks to do this ? Currently I have to copy the CD-file to a R/W-file and then decrypt it.

Well, running "strace" on "mcrypt" shows it acting like it left its brain in the dishwasher for too long: it tries (non-optionally) to write the encrypted file in the same place where the source file is - even if you issue the request from somewhere else. Duh! Plus, the "-F" switch that's supposed to make it go to STDOUT does exactly the same thing in the above case. The program is BAD (Broken As Designed.)

Here's a solution that works, though:

cat /mnt/cdrom/foo | mcrypt -F > foo.nc

Hi Ben,

Thanks a lot. I do recal your name, you have helped out lot in the past.

Your method "cat /.../foo | mcrypt .." works fine. NOTE that I am in a learning phase (as always). Are there better crypt applications around.

Thanks a lot.

Hans.


how to config a modem to received call

Mon, 21 Apr 2003 16:22:50 +0530 (IST)
Karl-Heinz Herrmann (k.-h.herrmann from fz-juelich.de)
Question by radoint.com (lovett from radoint.com)

i have the problem to config my modem for received login in , i ready make the test to call out the work, but i can't do for received. becouse i tried to make a login in for internet service.

You want to have a look at sendfax and mgetty: for example at: http://www.leo.org/~doering/mgetty

mgetty is a daemon which is run by init (see /etc/init.conf for configuration). It will reply to an incoming call on a modem.

K.-H.


mounting cd

Fri, 28 Mar 2003 08:41:30 -0800
Dan Wilder (SSC sysadmin)
Question by BADRI JIMALE (badrijimale from hotmail.com)

hi

i had problem with my unix. i would like to know how to mount cd on my system which is running redhat 7.0

thank you

1) Find out which device your CD is attached to. Try

    dmesg | less

spacebar takes you forward, q to quit. Look for something in the messages about a CD. It'll probabably be attached to /dev/hdc or /dev/hdb. Unless it's something unusual like a USB or SCSI CD.

As root,

    mkdir /cdrom

add a line to /etc/fstab that looks like:

    /dev/hdc /cdrom iso9660 defaults,noauto,ro,user 0 0

using your favorite text editor, such as vi, emacs, nedit, kedit, pico, whatever.

If the CD is on /dev/hdd, use that in place of hdc.

As yourself, put a CD in the slot and give command

    mount /cdrom

to look at files there

    cd /cdrom
    ls

and so on.

To unmount it,

    umount /cdrom


linux S/W ? for movies

Fri, 28 Mar 2003 07:19:33 +0100
Huibert Alblas (huibert_alblas from web.de)
Question by JK Malakar (cave_man from hotpop.com)
[Huibert Alblas] There are some GUIs (Graphical User Interfaces available for these things too: avidemux (http://avidemux.sourceforge.net) (frontend to transcode avi->everything) DVD::RIP (http://www.exit1.org/dvdrip) (frontend for transcoding DVD->everything)
Then you are set to go:
Safest way is to demultiplex the audio and video from the 3 avi's. Then concat the 3 audio and video streams, resulting in 1 big audio and 1 big video stream.
[Ben Okopnik] I've also had good luck with "mplayer" (a wonderful all-around piece of software); just a couple of days ago, I wanted to grab the audio stream from a DVD title, so -
mplayer -dvd 12 -ao:pcm > file.wav
Of course, there's the obvious complement of "-vo" for video. For the available output formats, see
mplayer -ao help
or
mplayer -vo help
Quite an impressive list in both.

Hi all,

I have downloaded the great MPlayer & compiled it under debian. but whenever I play with

mplayer /cdrom/movie.dat

...MPlayer plays it within a very small window. maximizing the window can't change the display area. again there is a synchronization problem between the audio & video output.

[Robos] if you have xvideo support (mplayer -vo xv) try "f" during playback. Else, try -zoom and|or -fs. If you post your grafic card I can (maybe) tell you what option to use to get fullscreen.

it plays sound more quickly than the video. I have also tried with the option -autosync n (where n=1,2 etc), but result is same. could any one suggest me a solution ?

another newbie question. I have gone through the HTML doc of mencoder. still the difference between 2-pass & 3-pass method is not clear to me. *2-pass* gives better image quality. but what is the advantage of 3-pass ? is it superior to 2-pass. please let me know.

[Robos] If I understand it correctly 3 pass does mp3 separately of the video...
Anyone who has sufficient info to keep us in sync here? Maybe you could write an article for us :D -- Heather


mouse driver, rather not

10 Apr 2003 13:46:09 -0000
palla ravikiran reddy (solarflares from rediffmail.com)

Hello,

I tried editing the makefile in the drivers/char directory by removing busmouse.o and other other mice. I then compiled the kernel and booted using the new image. The mouse was still running after the reboot.

what does this mean? Isn't gpm an application that uses the busmouse and other mice functions? Only when i kill the gpm daemon does the mouse stop functioning.

Any information would be useful to me.

[Joel Mayes] An .o file is generally an object file, it is the result of the compilation, so removing one will generally just get it remade the next time you compile.
Also the busmouse.[c|h] files are for an old style serial busmouse driver, if you have a reasonably modern PC the chances are you have either a USB or a PS2 mouse.
If you want to remove mouse support from the kernel, rather then deleting files from the kernel source, which could have interesting results (and you might want to include that support your deleting in the futher) in "menuconfig" goto "Character Devices" -> "Mice" and disable support
[Heather] Hi Joel. Ravi, there's more to this that you haven't mentioned, so I'm going to have to fill in with some guessing.
If you didn't tell your bootloader about your new kernel (even if you succeeded at chopping the mice out, instead of merely asking the build system to ignore them) ... it's probably still booting the old kernel.
Type 'uname -a' to see your running kernel version.
When you build your kernel, go into the Makefile at the top of your sources, and add a marker of your own into the EXTRAVERSION variable. That way, if you succeed at grafting your own kernel in, then you will see your marker from the uname output. Also its modules will be seperated by the extended version, so you won't chance loading the mouse support module of a kindred kernel, at least not unless you deliberately insmod it.
I do this all the time to mention a systemname when I build kernels that are only supposed to run on a specific host. Usually it's a warning that the kernel is unlikely to boot other boxen; sometimes it's a sign that I succeeded at applying a particular patch, or have a particular list of options selected.
Then type 'make menuconfig' (not just 'menuconfig') and tweak whatever things you want or not. Note that X will be useless without some serious tweaking, e.g. maybe using a windowmanager like ratpoison which is keyboard driven, and adjusting the config so it won't die without a mouse.
It may be easier to simply adjust the sysvinit setup so it does not automatically launch gpm for you. You could directly remove the gpm package so it will stop haunting you (try as root, either 'rpm -e gpm' or 'apt-get --purge remove gpm')... or modify your init sequence so that gpm is no longer automatically invoked. Note that most distros also have helper apps to set all the right things for that too - debian has update-rc.d, SuSE has YaST, Red Hat had linuxconf and may have newer and more friendly interfaces now, etc. The ultimate arbiter of what happens during your startup though, is /etc/inittab, which is really the file that init reads when it gets started. All the other stuff is just following its instructions through a few layers of shell scripts.


root like permissions

Fri, 11 Apr 2003 21:27:44 -0600
Jason Creighton (androflux from softhome.net)
Question by Chris Love (Chris.Love from ktd-kyocera.com)

I am setting up a few Linux machines for the development group and I don't want them to have root access, but they need to be able to install packages and whatnot. Is there a way to do this? I tried logging them in as root and the 1st thing they did was change root password - so that idea no good. Is there a way to make them a root clone but not able to mess with roots password and other such files? Similar to a Windows Power User?

[David Mandala] What you are looking for is the sudo command. You can let specific users do specific things that (a limited subset) root can do. This can be by person or groups of persons.
man sudo.
[Jason Creighton] Well......this is a tricky question, because if you set up 'sudo' to let them use 'rpm', they'll just write a clever RPM that does Bad Things(tm). So, what you could do is something like this:
With a particularlty tricksy mind, it's possible to set up a sudo to make people only have access to a command when they are using the right parameters. It could get ugly pretty quick though. I like the user mode linux plan. If you've got some developers working on the same project, you might even lock them into the same virtual machine, and let them share full ownership inside it. You will want to keep an eye on the machines for unusual behavior - defensively and in everyone's best interests, of course. -- Heather


UPS Problems..

Wed, 23 Apr 2003 08:05:51 -0700
Dan Wilder (SSC sysadmin)
Question by Smiley (smiley0 from myrealbox.com)

I recently got an APC SmartUPS700 for my debian server from a friend. I installed it (although without the serial connection, so the server really shouldn't know that it's there) and an hour or two later my server did something strange - it rebooted itself abruptly, on its own accord. I naturally figured this was something to do with the UPS and since it was late at night and i didn't feel like troubleshooting at the time, i took the UPS out of the picture altogether, and rebooted my server, plugged straight into the mains.

Same thing happened.

This has never happened before and I can't figure out why it's happening. At first i thought it must be a hardware problem, perhaps the UPS has somehow damaged the power supply of the server or something like that - but when I booted it into windows and left it for a few hours nothing happened. It only ever happens in linux.

I really don't know what to do to fix the problem, and it's really getting to me - i can't listen to any music, surf the web, do email (i'm rushing to get this written before the computer reboots - the time seems random, anything from 5 minutes uptime to 3 hours..) or anything else..

[Dan Wilder] Very likely hardware. Not likely anything the UPS did.
First thing to do is check memory. I recommend memtest86,
http://www.memtest86.com
If it finds problems, you certainly have a problem. If it doesn't it still doesn't mean all is well with hardware or even memory. Let it run at least four complete passes.
Also make sure your processor cooling fan is working and there's no excessive dust buildup on the processor heat sink or the motherboard chipset heat sink, if any.
[Ben] I'll strongly ditto that one. Wind0ws doesn't "work" the memory as hard as Linux does, particularly if you do something like compiling a kernel. Wind0ws also treats a number of core errors as warnings - viz. the GPFs and the BSODs ("Blue Screen of Death") - whereas Linux will dump core on pretty much any core error. That policy has lead to a kernel that is as bug-free as possible, and the process still goes on.
[Ken Dodge] I agree with Dan. I ran across a similar problem with a Win2K box I had built for my daughter (EPoX EP-8KHA, 1.4GH Athlon) that would continually reset, sometimes even before completing a boot cycle. She, too, couldn't depend on it to get anything done. I eventually found a flakey DIMM, using memtest86. All has been fine since pulling it out (well ... it IS still running Win2K, but that's another problem!)
[Jason Creighton] Yep. I had a problem once with a box crashing that looked like bad memory. Turned out that I had EDO turned on in the BIOS but I didn't had EDO RAM in the box. But in most cases it's bad memory. If you're really hard up for memory, (Just buying more memory would be much easier) you might want to patch your kernel to support "BadRAM". You can tell the kernel to not use certain parts of memory. Here's the URL for that:
http://rick.vanrein.org/linux/badram
memtest86 has an option to output patterns that BadRAM can understand.
[Dan WIlder] Also make sure your processor cooling fan is working and there's no excessive dust buildup on the processor heat sink or the motherboard chipset heat sink, if any.
[Ben Okopnik] Or in the power supply vents. Make sure that your power supply fan is running, too - I've seen that cause more reboots than I could count.


To find out what's in an RPM

Fri, 4 Apr 2003 11:17:33 -0600
Gary Sears (gsears from kane.k12.il.us)

(see question in mailbag, Gazette 4/2003)

To emulate rpm's query on a .rpm file, just use gnu's less on it. Simple. Nice filter. It shows you the info, patches and files.

Since the source for less is available, it might give him a direction...

Gary Sears

[Jason Creighton] less doesn't do this. Look at the program named in the LESSOPEN enviromental varible. On most distos, it's a script that calls diffent programs depending on the filename. For example, if it's tag.gz or .tgz
tar -tzvvf filename.tgz
to view the contents of a tarball. Or, on my system,
rpm -qpvl filename.rpm
if it's an RPM.

[John Karns] Very cool. I had wondered how less was able to handle gzipped text files. Didn't know it (via $LESSOPEN=lesspipe.sh ... at least on SuSE 7.x) was config'd to handle rpm and some others as well.


This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/
Copyright © 2003
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 90 of Linux Gazette, May 2003

<< Prev  |  TOC  |  Front Page  |  Talkback  |  FAQ  |  Next >>