2. Configuration

2.1. Keyboard setup

Linux provides 2 ways to set up your keyboard. At the console you can use loadkeys and under XFree86 you can use xmodmap.

2.2. Display and applications

Some applications have to be compiled as 8-bit clean to work well with the European characterset. Others like to be told in advance.

2.3. Time zone

Since Belgium is located in the Central European Time zone (aka MET) which (in the winter) is equivalent to the Greenwhich Mean Time plus 1 (GMT+1), you can simply link /usr/lib/zoneinfo/localtime/MET to /etc/localtime symbolicly like:
	ln -sf /usr/lib/zoneinfo/MET /etc/localtime
or
	ln -sf /usr/lib/zoneinfo/Europe/Brussels /etc/localtime
This automagically sets Daylight Savings (which is GMT+2 in the summer).

NoteNote!
 

Different distributions have different paths, zoneinfo can be located in /usr/share or such...

NoteAnother note!
 

Red Hat uses a tool called timeconfig, SuSE uses yast

To change the CMOS clock and then synchronize the system time with the CMOS clock, do something like this:
	hwclock --set --date="Feb 25 03:38"
	clock -u -s
If your clock is set to local time (which is discouraged but if you also run broken OS's, you must), you can do:
	hwclock --set --date="Feb 25 04:38"
	clock -s
[Noticed the 1 hour difference ? ;p]

If your computer has Internet-access you can use NTP (Network Time Protocol) to keep your system clock in sync. One way of doing this is by starting ntpdate from cron by adding
	05 0 * * * root /usr/sbin/ntpdate -s ntp.belnet.be > /dev/null 2>&1
to your /etc/crontab. Check the ISP-information below to see if your ISP has a NTP-server available.

2.4. Locale support

Not much programs support locale yet, if you want to know more about locale or how to write your own programs to support it, check: [put the damn url here ;p]

Be aware that locale makes it harder to resolve problems as less people can help you !! You might understand a problem when it's in technical English, but what if it's translated in some obscure Dutch ?

2.4.4. Walloon

For Walloon locale support you can find files and information at: http://www.linuxi18n.org/locales/walon/. To use it set:
	LANG=wa
	LANGUAGE=wa_BE:fr_BE
Try wa_BE.ISO_8859-1 if wa_BE does not work.

2.5. Native language support and codepages

These options add support for the Belgian characterset and codepages. If you'd like to have these, compile a kernel with these options put on. They only apply to some filesystems (FAT-based, ISO9660, ...).
	< > Codepage 850 (Europe) 
	< > NLS ISO 8859-1  (Latin 1; Western European Languages)  
	< > NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)
Located in Filesystems > Native Language Support

If your kernel is a modular kernel that came with your distribution (=you never compiled a kernel before), then you might want to type:
	insmod nls_cp850
	insmod nls_iso8859_1
	insmod nls_iso8859_15

2.6. Ispell

Contributed by Dany Vanderroost

2.6.3. French

	export DICTIONARY=francais
or
	ispell -d francais file_name

Warning

Ispell doesn't work with Walloon which is a phonetic dialect and not a lexical structured language.

2.7. Setting up Internet

2.7.1. Dialing in with your modem (PPP)

To configure PPP correctly, you should check the PPP-HOWTO. I try to explain it briefly, but if you have any questions or problems, read the HOWTO very carefully.

2.7.1.1. Configuring the modem

To configure your modem, you can alter the initstring of your modem. To learn more about your modem, check Ask Mr. Modem.

Warning

If you have a winmodem you will probably not get it to work. More information about winmodems is at: http://linmodems.org/. Work is underway, but winmodems are not as good as real modems.

2.7.1.2. Installing pppd

Now, you need to have the ppp-package installed (check this by typing pppd --version), make sure you have a recent one. Then you have to make sure you've got these files:

/usr/local/bin/ppp
	#!/bin/sh

	case $1 in
		(on|start)
			TELEPHONE='555-1212'        # The telephone number for the connection
			ACCOUNT='your_login'        # The account name for logon (as in 'George Burns')
				PASSWORD='your_pass'        # The password for this account (and 'Gracie Allen')
			INITSTRING='AT&F&C1&D2Z'# Modem initstring
			IPLOCAL=0.0.0.0             # Local IP address if known. Dynamic = 0.0.0.0
			IPREMOTE=0.0.0.0            # Remote IP address if desired. Normally 0.0.0.0
			DEVICE=/dev/ttyS1           # Serial Device com1=ttyS0, com2=ttyS1,...
			SPEED=57600                 # 19200, 38400 or 57600 (don't try something different)
			export TELEPHONE ACCOUNT PASSWORD INITSTRING
			exec /usr/sbin/pppd $DEVICE $SPEED $IPLOCAL:$IPREMOTE \
			user $ACCOUNT connect /etc/ppp/ppp-on-dialer
			;;
		(off|stop)
			if [ -r /var/run/ppp0.pid ]; then
				kill -INT `cat /var/run/ppp0.pid`
				if [ ! "$?" = "0" ]; then
					rm -f /var/run/ppp0.pid
					echo "ERROR: Removed stale pid file"
					exit 1
				fi
				exit 0
			fi
			echo "ERROR: PPP link is not active on ppp0"
			exit 1
			;;
		(info|status)
			/usr/sbin/pppstats
			;;
		(*)
			echo "Usage: ppp on|off|info|start|stop|status";
	esac

/etc/ppp/ppp-on-dialer
	#!/bin/sh

	exec /usr/sbin/chat -v                                        \
		REPORT CONNECTION                                     \
		REPORT CARRIER                                        \
		TIMEOUT              10                               \
		ABORT                '\nBUSY\r'                       \
		ABORT                '\nNO ANSWER\r'                  \
		ABORT                '\nNO CARRIER\r'                 \
		ABORT                '\nNO DIALTONE\r'                \
		ABORT                '\nRINGING\r\n\r\nRINGING\r'     \
		ABORT                'Invalid Login'                  \
		ABORT                'Login incorrect'                \
		''                   "\r$INITSTRING\r"                \
		'OK-+++\c-OK'        'ATH0'                           \
		TIMEOUT              45                               \
		OK                   "ATDT$TELEPHONE"                 \
		CONNECT              '\d\c'                           \
		ogin:--ogin:         "$ACCOUNT"                       \
		ord:                 "$PASSWORD"
You can remove the -v once everything looks normal.

The pppd command uses /etc/ppp/options to list its options, change these options to whatever fits. These defaults normally work in most cases.
	asyncmap 20a0000
	crtscts
	debug
	default-mru
	defaultroute
	detach
	escape 11,13,ff
	hide-password
	ipcp-accept-local
	ipcp-accept-remote
	lcp-echo-failure 4 
	lcp-echo-interval 400 
	lock
	modem
	mtu 1500
	netmask 255.255.255.0
	noipdefault
	passive

	#idle 300 
	#kdebug 0
	#-vj
Once dialing in works like a charm, you can leave debug out.

Warning

It is important to emphasize that every special character, thus every character that is not [a-ZA-Z0-9] and '_', should be escaped by preceding it with a '\'-character. Thus "e!b$l+" would become "e\!b\$l\+". Try it if you are having troubles !

2.7.2. Dialing in with your ISDN-modem

Contributed by Christophe Lambin

This section does not aim to be a definitive guide on ISDN for Linux. For a more detailed discussion on the topic, see Paul Slootman's ISDN4Linux HOWTO and ISDN4Linux-FAQ.

2.7.2.1. Updating the kernel

If you're using a 2.2 kernel, it's recommended to get an updated version of the ISDN code. You can retrieve it from CVS at ftp://ftp.suse.com/pub/isdn4linux/. For more information, check: http://www.brisse.dk/site/linux/docs/isdn.htm

Warning

If you've recently purchased an Eicon Diva 2.0 PCI (eg, via Belgacom), there's a good chance you've actually got a Diva 2.01.In this case, you must get a version dated 1 July 1999 or later !

Once the ISDN is in place, you can start up the driver. Eg: modprobe hisax type=11 protocol=2 Refer to the Readme's for the right parameters and values for your card.

2.7.2.3. Configuring the interface

With the tools installed and configured, write a script to configure the interface, to be used for the ISDN connection. As always in Linux, there's no one correct way of doing this. I've put these in a script

/etc/rc.d/rc.isdn:
	#!/bin/sh

	MSNREMOTE='555-1212'    # Phone number of ISP
	MSNLOCAL='555-1313'     # my number, without 0, with areacode
	ACCOUNT='george'        # The account for logon (as 'George Burns')
	IPLOCAL=10.0.0.2        # my fixed IP (use 10.0.0.2 if no fixed)
	IPREMOTE=0.0.0.0        # IP number of ISP
	INTERFACE=ippp0
	/sbin/modprobe hisax type=11 protocol=2
	/sbin/isdnctrl verbose 3 system on
	/sbin/isdnctrl addif $IF
	/sbin/isdnctrl secure $IF on 
	/sbin/isdnctrl addphone $IF out $MSNREMOTE
	/sbin/isdnctrl eaz $IF $MSNLOCAL
	/sbin/isdnctrl huptimeout $IF 300
	/sbin/isdnctrl l2_prot $IF hdlc
	/sbin/isdnctrl l3_prot $IF trans
	/sbin/isdnctrl encap $IF syncppp
	/sbin/isdnctrl dialmode $IF auto
	/sbin/ifconfig $IF $IPLOCAL pointopoint $IPREMOTE -arp -broadcast
	/sbin/ipppd /dev/ippp0 user $ACCOUNT $IPLOCAL:$IPREMOTE

To start this at boot time, make it executable and append the following to /etc/rc.d/rc.local:
	if [ -x /etc/rc.d/rc.isdn ]; then
		. /etc/rc.d/rc.isdn
	fi

The ipppd command gets its parameters passed through a file, /etc/ppp/ioptions:
	-ac
	-bsdcomp
	debug
	defaultroute
	ipcp-accept-local
	ipcp-accept-remote
	mru 1524
	mtu 1500
	noipdefault
	-pc
	useifip
	-vj
	-vjccomp

	#idle 360
	#persistent

Warning

Do NOT specify +pap or +chap in this file. This specifies the authentication that ipppd should use for an INCOMING client. If you were to use this to connect to your ISP, ipppd would wait for the ISP to authenticate itself using the specified protocol.

Warning

It is important to emphasize that every special character, thus every character that is not [a-ZA-Z0-9] and '_' should be escaped by preceding it with a '\'-character. Thus 'e!b$l+' would become 'e\!b\$l\+'. Try it if you are having troubles !

Finally, create /etc/ppp/ip-down.local to handle the shutdown of the interface:
	#!/bin/sh

	/sbin/ifconfig $1 down
	sleep 1
	/sbin/ifconfig $1 10.0.0.2 pointopoint 

NoteNote!
 

This is to handle some problems with routes on shutdowns. Anyone know of a clean(er) solution ?