[vox-tech] more newbie questions
vox-tech@lists.lugod.org
vox-tech@lists.lugod.org
Thu, 18 Apr 2002 17:23:41 -0400
On Thu, Apr 18, 2002 at 01:44:44AM -0700, Joey Karalius wrote:
> I have a few questions for the group:
>
> 1) How do I get NUM-LOCK to stay on when re-booting (Linux, of course)?
> I thought it was only a BIOS thing but apparently not, since it stays
> on when Windows boots up, but not Linux.
That's a new one... never thought of this as a issue, but apparently
this is a _very_ a frequent newbie question. It seems that the Linux
kernel clears all led settings when the keyboard driver starts (maybe
by resetting the keyboard). Some people reboot often enough that they
find hitting one additional key after each reboot is annoying.
So an answer for Debian is...
=============================
add the following to your /etc/apt/sources.list
=====
# numlock and xsetleds
deb http://www.fwdn.de/debian/ ./
deb-src http://www.fwdn.de/debian/ ./
======
type "apt-get update; apt-get install numlock"... and from now on when your
machine boots and when you log into X the numlock keys will be defaulted
on. (the console script is much like below... but only touches the first
8 consoles if you have more you should modify the /etc/init.d/numlock
file to fix it, as mentioned below).
For everyone else...
====================
There are two answers the easy one for the console and is
easy... somewhere your .bash_login add a command like:
case `tty` in
/dev/tty[0-9]*) setleds +num
;;
esac
or if you want it system wide put something like the following into
the boot-up scripts:
for l in /dev/tty[0-9]*; do
setleds -num < $l;
done
Now if you want to do this for X windows the process is different...
the funny thing is that the "xset" program which is supposed to be
able to toggle the leds and I've used in the past doesn't appear to
work on my particular machine. I find hundreds of web pages involving
this thing, some distributions appear to have builtin support for setting
them a particular way on boot (it appears they have lilo append "numlock=on"
to the linux boot line and do something with that in the bootup scripts),
some distributions have packages you can install that turn them on,
and for the rest there are a bunch of programs that you can download
and compile that do the magic look for "xsetleds" or "numlockx" and
you should find something related to this.
> 2) I bought a serial external modem, and I'm shopping for a cable. It
> has the 25-pin connection on the back and I think I want to go with the
> USB to serial cable, since I have a couple empty USB ports. Is there
> any reason I can't go with that setup?
A tricky one I haven't seen any systems doing this... but it should
work. The concept of "a cable to convert old serial devices to a completely
different modern universal serial bus connector", is valid...
I have personally messed with some of these cables for talking to
serial printers, one actually worked.
Besides the fun of messing with this method, the only reason I can
imagine for going this way is if you really don't have a old serial port
available.
The important thing is to get a USB to serial converter cable
that has a supported driver... many types exist, and in 2.4.18 about
16 kernel drivers exist for different types of serial converter,
most are marked experimental (so you will need to check "Prompt for
development drivers" to even see them when compiling the kernel).
It's a vague memory but if you have USB configured properly when you
plug in the device it will be added to the "known devices with loaded
drivers list" somewhere in /proc/bus/usb ... and you will run whatever
program to use the serial port on a /dev/ttyUSB* or /dev/usb/tts/* file...
look at /usr/src/linux/Documentation/usb/usb-serial.txt for more info.
Later,
Mike