Re: [expert] Syncing Handspring Visor Deluxe?!

2003-02-11 Thread Mark Alexander
On Mon, Feb 10, 2003 at 08:04:12PM -0800, Rob Blomquist wrote:
 I am not new to linux, but new to Mandrake and USB stuff.
 
 I am having a problem consistantly syncing my visor using 
 KPilot/JPilot and anything else. Basically, I have attempted to 
 follow every step to perfection, and I will sync 1 out of 20 times 
 attempting, but I keep failing.

I starting having this exact trouble with my Visor Deluxe when I
upgraded to 9.0 (it worked beautifully on 8.1 every time).  I have
disabled devfs, there's no kpilotd running, and syncing is still
unreliable.

But I've finally been able to get it to work with jpilot on at least one
out of every four attempts, better than one out of twenty.  The steps
below assume you've got jpilot configured to talk to the correct device
(/dev/ttyUSB1 in my case, though /dev/usb/ttyUSB1 should be the same),
the device has the correct permissions, etc.

1. Manually remove the usbserial and visor modules if they're loaded:

  rmmod visor
  rmmod usbserial

2. Start a local sync on the Visor.

3. 'tail -f /var/log messages' and wait until you see something like
this message come out (make take 10 seconds):

  Feb 11 10:32:10 x kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clii 4.x 
converter now attached to ttyUSB1 (or usb/tts/1 for devfs)

4. Start jpilot and press the Sync button.

5. If jpilot seems to hang, close it, cancel the sync on the Visor, and
go to step 1.

It's pretty annoying but I'm too lazy to debug the pilot-link library to try
to figure out if it's the cause, or if it's a driver problem.



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: Fwd: [expert] Best Mandrake yet!!!

2003-02-08 Thread Mark Alexander
On Sat, Feb 08, 2003 at 08:52:01AM -0500, Pierre Fortin wrote:
 Mdk 9.0 -- several times per day until 'trigger' found to be
 suspend/resume

I had terrible suspend/resume problems with 9.0 too (crash after every
third or fourth resume).  Switching to a stock 2.4.20 kernel has
helped greatly.  It's hung only twice on resume in two months (hard
disk refused to spin back up, though everything else was working).

The kernels in 7.2 and 8.1 were much better in this area.  Never had a
suspend/ resume problem in two years, on two different IBM laptops.

To be fair, I don't think these problems are Mandrake's fault.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] getting a DWL-650 to work in MDK

2003-01-24 Thread Mark Alexander
On Fri, Jan 24, 2003 at 12:38:50PM -0500, Pierre Fortin wrote:
 If anyone cares:  suspend/resume has MAJOR problems in 9.0

I noticed this immediately after upgrading to 9.0 on my Thinkpad A21m.
The machine would lock up tight on every third or fourth resume.  All
I could deduce from /var/log/messages was that there was some segfault
in the kernel's suspend/resume code.

The fix was to fetch a totally stock 2.4.20 kernel from kernel.org and
build a custom one for myself.  The important change I made in the
configuration versus Mandrake's was to enable CONFIG_APM_ALLOW_INTS.
I believe that is necessary for IBM laptops, but I could be wrong.
That may not have been the thing that fixed suspend/resume; maybe it
was just that 2.4.20 is better.  In any case, my machine is very happy
now.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Is it meant to be hard or easy to change network settings?

2003-01-23 Thread Mark Alexander
On Wed, Jan 22, 2003 at 02:39:02PM +, David Robertson wrote:
 Every time I move my laptop from one location to the other, I
 have to set up the network connection from scratch.

I had this problem with my laptop (running MDK 8.1, now 9.0).  It gets
used at the following locations:

* at work on LAN
* at home connected to an ISP with a modem (and a private two-host LAN)_
* at home connected to my employer's modem pool
* at a friend's house on a LAN connected to DSL

I eventually solved the problem by having separate versions of the
following files for each location, with a location suffix appended
to each filename:

  /etc/postfix/main.cf
  /etc/sysconfig/network
  /etc/sysconfig/network-scripts/ifcfg-eth0
  /etc/resolv.conf

Then I wrote a shell script that, given a location name argument,
creates symbolic links for the above files that point to the
location-specific versions of the files.

The script brings down eth0 before the tweaking the symlinks (ifdown
eth0) and brings it back up again afterwards (ifup eth0).  It also
restarts postfix after tweaking main.cf (postfix reload); otherwise
postfix will refuse to send mail if it's moved from one network to
another.

MacOS has a feature called location manager that does this sort
of thing with a GUI.  I think it would be very useful on Linux, too.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] USB zip drive

2003-01-12 Thread Mark Alexander
On Sat, Jan 11, 2003 at 11:57:38AM -0500, Jesus Arocho wrote:
 I am using Mandrake 9.0 and a Iomega 250, usb zip.  The capacity seems to be 
 limited to around 10MB (I get drive full errors when I try to transfer a 12 
 MB tar file to an empty diskette) and the drive does not appear when I use 
 df.

 fstab entry = 'none /mnt/zip supermount 
 dev=/dev/sda4,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0 0 0'

I've only used ancient SCSI Zip-100 drives, but if I were debugging this,
I'd try the following:

1. Check the output of 'df /mnt/zip'.

2. Perhaps the partition table is screwed up.  Try unmounting it and check
the output of 'fdisk -l /dev/sda'.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Losing smooth scrolling after apm wakeup and hwclock --hctosys

2003-01-12 Thread Mark Alexander
On Sun, Jan 12, 2003 at 08:02:02PM +0800, Gerald Timothy Quimpo wrote:
 on a Dell Latitude CPi (300 Mhz PII) using Mandrake 9.0 I have problems with
 smooth scrolling after a hwclock --hctosys.  when I do that, i can't click
 and drag windows anymore (have to right click, move), and i can't
 smoothly scroll scrollbars (have to click on the arrows or somewhere in the
 area between the thumb and appropriate arrow).  

I vaguely recall seeing this on my Thinkpad A21m right after
installing 9.0.  A knowledgeable friend suggested setting the hardware
clock to GMT and I haven't seen the problem since then.

Setting the clock the GMT also makes APM resume go a little more
smoothly: I no longer have the problem where the clock jumps suddenly
to the correct time a few seconds later, causing screensaver to kick
in.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] bash scripting question - simple regular expression?

2003-01-12 Thread Mark Alexander
On Sat, Jan 11, 2003 at 05:56:16PM -0800, Jim C wrote:
 I have a list of positive integers of which I only want the first one.
 They are of arbitrary size. How can I cut the rest of them off?
 I've been trying to write a regular expression for this using sed or awk.

#!/bin/sh
LIST=42 666 1776 2001
echo $LIST | sed -e 's/^\([0-9]*\).*/\1/'


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[expert] USB 6-in-1 card reader solutions

2003-01-12 Thread Mark Alexander
On a whim I bought a cheap 6-in-1 USB flash card reader (the maker's
web site is www.pqiusa.com).  I managed to get it to work on my
Mandrake 9.0 laptop, but it was a bit tricky.

The first problem is that that 2.4.19 kernel in 9.0 doesn't seem to
recognize that this device is actually four different devices, one for
each of the card slots (the 6-in-1 is a slight exaggeration; a couple
of the card types share slots).  On my parents' totally stock 9.0
desktop machine, only the first card slot was configured automatically
as device sda; the rest were ignored.  I didn't have time to find
a fix for this.

I didn't have this problem on my laptop running 9.0, perhaps because
I'm using the 2.4.20 kernel from kernel.org, with devfs disabled.
There may have been some changes in the usb storage drivers, but I
didn't track them down.  I'm just happy the thing works.  In
/var/log/messages I can see each of the four devices being configured
as sda through sdd.

The second problem is that the ide-storage module isn't getting
removed when the device is unplugged.  So if the device is plugged in
again, it gets treated as a new SCSI host (scsi1) instead of scsi0,
and the four slots get configured as devices sde through sdh.  The
only workaround I could find was to 'rmmod usb-storage' after
unplugging the device.  To do this automatically, I made the following
ugly hack to /etc/hotplug/usb.agent:

*** usb.agent.orig  2002-04-01 13:51:32.0 -0800
--- usb.agent   2003-01-12 18:00:18.0 -0800
***
*** 323,328 
--- 323,331 
  esac
  if [ $DRIVERS !=  ]; then
FOUND=true
+   echo #!/bin/sh $REMOVER
+   echo rmmod $DRIVERS $REMOVER
+   chmod +x $REMOVER
  fi
  
  # cope with special driver module configurations


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Getting Kernel 2.4.20 on MDK 9?

2002-12-30 Thread Mark Alexander
On Sun, Dec 29, 2002 at 07:12:25PM -0600, Timothy R. Butler wrote:
 Is there anyway to get a 
 2.4.19-ac kernel or 2.4.20 kernel with Mandrake's patches included (better 
 yet, anyone know where I can get an RPM of one :-))? 

On my Mandrake 9.0, I'm using a totally stock 2.4.20 kernel from
www.kernel.org, and it works just fine.  I didn't try to find one with
Mandrake patches, though I believe a 2.4.20 cooker kernel is available
now, according to messages that came through earlier on this mailing
list.

P.S. I had to go with a non-Mandrake kernel because Mandrake's kernel
crashes on suspend/resume cycles on my Thinkpad A21m (the kernel in
MDK 8.1 worked fine).  I believe this is because Mandrake disables
CONFIG_APM_ALLOW_INTS in their configuration, or something big has
changed in the APM support since 8.1, or both.  So even a cooker
2.4.20 kernel would probably not work for me.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[expert] Fix for apropos command

2002-12-30 Thread Mark Alexander
For a while I have noticed that on 9.0, even after running makewhatis,
the apropos command was still not finding many of the man pages in
/usr/share/man.  Here is a fix for this.

*** apropos.orig2002-08-27 06:39:04.0 -0700
--- apropos 2002-12-30 17:30:38.0 -0800
***
*** 69,75 
  found=0
  while [ $found = 0 -a -n $1 ]
  do
! for d in /var/cache/man /usr/lib
  do
  if [ -f $d/whatis ]
  then
--- 69,75 
  found=0
  while [ $found = 0 -a -n $1 ]
  do
! for d in /var/cache/man/$LANG /var/cache/man /usr/lib
  do
  if [ -f $d/whatis ]
  then
***
*** 103,109 
  done
  nothing=
  found=0
! for d in /var/cache/man $manpath /usr/lib
  do
  if [ -f $d/whatis ]
  then
--- 103,109 
  done
  nothing=
  found=0
! for d in /var/cache/man/$LANG /var/cache/man $manpath /usr/lib
  do
  if [ -f $d/whatis ]
  then


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] IP

2002-12-17 Thread Mark Alexander
On Tue, Dec 17, 2002 at 12:14:33AM -0500, Brian York wrote:
 How can i find out the ip address of a machine that has been assigned an ip
 by DHCP.

Here's a hack I use:

#!/usr/bin/perl
# Script to print IP address of ethernet connection on the local machine.

open(FILE, /sbin/ifconfig eth0|) || die Unable to run ifconfig\n;
while (FILE) {
  chomp;
  if (/inet addr:(\S+)/) {
print $1\n;
last;
  }
}
close (FILE);


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] clonning HD

2002-12-13 Thread Mark Alexander
On Fri, Dec 13, 2002 at 11:01:43AM -0200, Alan Wilter Sousa da Silva wrote:
 3- copy whole old HD to the new one
 (but how? With a simple 'cp', 'cpio', 'dd' or 'dump'?)

You can also use tar for wholesale copying of entire directories.  For
example, this will copy the contents of $source_dir to the current
directory.

  (cd $source_dir; tar cf - .) | tar xvf -


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[expert] GDB and threads - fixed

2002-12-11 Thread Mark Alexander
GDB can't debug apps that use threads (libpthread.so) on Mandrake 9.0.
There are two reasons for this, both caused by Mandrake's broken
installation of glibc. I finally got these problems fixed on my
system, with lots of help from a co-worker and day of debugging GDB
with itself. 

1. The first problem was that the shared library libpthread.so had its
symbols stripped by Mandrake.  The symptom is that GDB complains about
a weird signals (SIG32, to be exact) when debugging a program that
uses pthreads.

The fix was to install the glibc source RPM, rebuild it ('rpm -bc
glibc.spec'), and copy the non-stripped i686-specific libpthread
shared library to /lib/i686.  If you are in the build directory
/usr/src/RPM/BUILD/glibc-2.2.5, then copy the file as follows:

  cp build-i686-linux2.4/linuxthreads/libpthread.so /lib/i686/libpthread-0.9.so

After this, run 'ldconfig -v' just to be sure the new library gets
used, but it's probably not necessary.

NOTE: yes, there really are two libpthread shared libraries, one in
/lib (generic), and one in /lib/i686 (Intel 686-specific).  There
are important differences between the two, such as the sizes of
certain thread data structures and the presence of certain functions.
The data structure size mismatch turned out to the source of problem 2
below.  I suspect the generic library in /lib should not even have been
installed by Mandrake, since it's not used by apps that are linked
with -lpthread.

The more permanent fix, which Mandrake should be using, would be to
edit the spec file (glibc.spec), and adding libpthread to the list of
libraries to NOT strip:

  EXCLUDE_FROM_STRIP=ld-%{glibcversion}.so libpthread-0.9.so

The exact spelling of the library filename must be given as shown.
Then the binary RPM can be built (I haven't tried this myself yet).

2. Once that problem was fixed, GDB would now crash with a segfault
debugging pthread apps.  This turned out to be due to the data
structure size mismatch mentioned above.  GDB was using the generic
libthread_db.so (the thread debugging librrary) in /lib, which had a
different idea of the size of the _pthread_descr_struct structure than
the app being debugged, which used the processor-specific pthread
library in /lib/i686.

I chose to fix this by copying the i686-specific libthread_db.so to
/lib/i686.  If you are in the build directory
/usr/src/RPM/BUILD/glibc-2.2.5, then copy the file as follows:

  cp build-i686-linux2.4/linuxthreads_db/libthread_db.so \
/lib/i686/libthread_db-1.0.so

Then move to the directory /lib/i686 and create the following symbolic
link:

  ln -s libthread_db-1.0.so libthread_db.so.1

Finally, run 'ldconfig -v' to make sure this library gets put in front
of the bad one in /lib.

I'm not sure what permanent fix Mandrake should be using.  Either the
spec file or one of the Makefiles should be edited to copy the thread
debugging library to the correct directory; I haven't looked into this
yet.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com