Hi,

I was thinking a bit about automaticly configuring the keyboard layout in kde based on the ip address assigned to the computer.
This would of course require the geoip-bin package beeing installed by default.

I'm a bit rusty when it comes to scripting, but something like this should work:

Code:
#!/bin/sh

IP=`ifconfig eth0 | grep "inet addr" | sed "s/.*inet addr:\([.0-9]*\).*/\1/"`
echo "IP address: $IP"

COUNTRY=`geoiplookup $IP | tr A-Z a-z | sed "s/.*: \([^,]*\).*/\1/"`
echo "IP address belongs to country $COUNTRY"

echo -n "Trying to set KDE keyboard layout: "
STATUS=`dcop kxkb kxkb setLayout $COUNTRY`
echo $STATUS
Things that should be added is a way to find which interface to use, not just assume eth0, and some code for reseting the keyboard layout if $STATUS is "false".

Any ideas?