summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
blob: b99942e7950e021e45d2eccc46f6f4be26c429b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349

package keyboard; # $Id$

use diagnostics;
use strict;

#-######################################################################################
#- misc imports
#-######################################################################################
use common qw(:common :system :file);
use run_program;
use commands;
use log;
use c;


#-######################################################################################
#- Globals
#-######################################################################################
my $KMAP_MAGIC = 0x8B39C07F;

#- a best guess of the keyboard layout, based on the choosen locale
my %lang2keyboard =
(
  'af' => 'us_intl',
#-'ar' => 'ar:80',
  'az' => 'az:80 tr:10 us_intl:5',
  'be' => 'by:80 ru:50 ru_yawerty:40',
  'be_BY.CP1251' => 'by:80 ru:50 ru_yawerty:40',
  'bg' => 'bg:90',
'bg_BG'=> 'bg:90',
  'br' => 'fr:90',
  'bs' => 'hr:60 sr:50 si:40',
  'ca' => 'es:90 fr:15',
  'cs' => 'cz_qwerty:70 cz:50 cz_prog:10',
  'cy' => 'uk:90',
  'da' => 'dk:90',
  'de' => 'de_nodeadkeys:70 de:50',
'de_AT'=> 'de_nodeadkeys:70 de:50',
'de_BE'=> 'be:70 de_nodeadkeys:60 de:50',
'de_CH'=> 'ch_de:70 ch_fr:25 de_nodeadkeys:20 de:15',
'de_DE'=> 'de_nodeadkeys:70 de:50', 
  'el' => 'gr:90',
  'en' => 'us:90 us_intl:50',
'en_US'=> 'us:90 us_intl:50',
'en_GB'=> 'uk:90 us:60 us_intl:50',
  'eo' => 'us_intl:90 dvorak:20',
  'es' => 'es:90 la:80 us_intl:50',
  'es@tradicional' => 'es:90 la:80 us_intl:50',
'es_AR'=> 'la:80 us_intl:50 es:20',
'es_ES'=> 'es:90',
'es_MX'=> 'la:80 us_intl:50 es:20',
  'et' => 'ee:90',
  'eu' => 'es:90 fr:15',
  'fa' => 'ir:90',
  'fi' => 'fi:90',
  'fr' => 'fr:90',
'fr_BE'=> 'be:90 fr:5',
'fr_CA'=> 'qc:90 fr:5',
'fr_CH'=> 'ch_fr:70 ch_de:15 fr:10',
'fr_FR'=> 'fr:90',
  'ga' => 'uk:90',
  'gd' => 'uk:90',
  'gl' => 'es:90',
  'gv' => 'uk:90',
  'he' => 'il:90 il_phonetic:10',
  'hr' => 'hr:90 si:50',
  'hu' => 'hu:90',
  'hy' => 'am:80 am_old:10 am_phonetic:5',
  'id' => 'us:90 us_intl:20',
  'is' => 'is:90',
'it_CH' => 'ch_fr:80 ch_de:60 it:50',
'it_IT' => 'it:90',
  'ja' => 'jp:80 us:50 us_intl:20',
  'ka' => 'ge_la:80 ge_ru:50',
  'kl' => 'dk:80 us_intl:30',
  'ko' => 'kr:80 us:60',
  'kw' => 'uk:90',
  'lo' => 'us:60',
  'lt' => 'lt:80 lt_new:70 lt_b:60 lt_p:50',
  'lv' => 'lt:60 lt_new:50 lt_b:40 lt_p:30 ee:20',
  'mi' => 'us_intl:60 uk:20 us:10',
  'mk' => 'mk:80',
  'ms' => 'us:90 us_intl:20',
  'nb' => 'no:90 dvorak_no:10',
'nl_BE'=> 'be:90 nl:10 us_intl:5',
'nl_NL'=> 'us_intl:95 nl:15 us:10 uk:5',
  'nn' => 'no:90 dvorak_no:10',
  'no' => 'no:90 dvorak_no:10',
  'oc' => 'fr:90',
  'ph' => 'us:90 us_intl:20',
  'pl' => 'pl:80 pl2:60',
  'pp' => 'br:80 la:20 pt:10 us_intl:30',
'pt_BR'=> 'br:80 la:20 pt:10 us_intl:30',
'pt_PT'=> 'pt:80',
  'ro' => 'us-intl:10',
  'ru' => 'ru:90 ru_yawerty:80',
  'ru_RU.CP1251' => 'ru:90 ru_yawerty:80',
  'ru_RU.KOI8-R' => 'ru:90 ru_yawerty:80',
  'sk' => 'sk_qwerty:80 sk:70 sk_prog:50',
  'sl' => 'si:80 hr:50',
  'sp' => 'sr:80',
  'sr' => 'yu:80',
  'sv' => 'se:90 fi:20',
  'tg' => 'ru:50 ru_yawerty:40',
  'th' => 'th:90',
  'tr' => 'tr_q:90 tr_q:30',
  'tt' => 'ru:50 ru_yawerty:40',
  'uk' => 'ua:90 ru:50 ru_yawerty:40',
'uk_UA' => 'ua:90 ru:50 ru_yawerty:40',
  'uz' => 'us:80',
  'vi' => 'vn:80 us:60 us_intl:50',
'vi_VN.TCVN' => 'vn us:60 us_intl:50',
'vi_VN.VISCII' => 'vn us:60 us_intl:50',
  'wa' => 'be:90 fr:5',
'zh_CN.GB2312' => 'us:60',
'zh_TW.Big5' => 'us:60',
);

#- key = extension for Xmodmap file, [0] = description of the keyboard,
#- [1] = name for loadkeys, [2] = name for XKB
my %keyboards = (
arch() =~ /^sparc/ ? (
 "cz" => [ __("Czech (QWERTZ)"), "sunt5-cz-us", "czsk(cz_us_qwertz)" ],
 "de" => [ __("German"),         "sunt5-de-latin1", "de" ],
 "dvorak" => [ __("Dvorak"),     "sundvorak",   "dvorak" ],
 "es" => [ __("Spanish"),        "sunt5-es",    "es" ],
 "fi" => [ __("Finnish"),        "sunt5-fi-latin1", "fi" ],
 "fr" => [ __("French"),         "sunt5-fr-latin1", "fr" ],
 "no" => [ __("Norwegian"),      "sunt4-no-latin1", "no" ],
 "pl" => [ __("Polish"),         "sun-pl-altgraph", "pl" ],
 "ru" => [ __("Russian"),        "sunt5-ru",    "ru" ],
 "uk" => [ __("UK keyboard"),    "sunt5-uk",    "gb" ],
 "us" => [ __("US keyboard"),    "sunkeymap",   "us" ],
) : (
arch() eq "ppc" ? (
 "us" => [ __("US keyboard"),    "mac-us-ext",  "us" ],
 "de_nodeadkeys" => [ __("German"), "mac-de-latin1-nodeadkeys", "de(nodeadkeys)" ],
 "fr" => [ __("French"),         "mac-fr2-ext",   "fr" ],
) : (
 "am_old" => [ __("Armenian (old)"),	"am_old",	"am(old)" ],
 "am" => [ __("Armenian (typewriter)"),	"am-armscii8",	"am" ],
 "am_phonetic" => [ __("Armenian (phonetic)"), "am_phonetic", "am(phonetic)" ],
#- only xmodmap is currently available
#-"ar" => [ __("Arabic"),        "ar-8859_6",   "ar" ],
 "az" => [ __("Azerbaidjani (latin)"), "az",	"az" ],
 "a3" => [ __("Azerbaidjani (cyrillic)"), "az-koi8c","az(cyrillic)" ],
 "be" => [ __("Belgian"),        "be-latin1",   "be" ],
 "bg" => [ __("Bulgarian"),      "bg",          "bg" ],
 "br" => [ __("Brazilian (ABNT-2)"),      "br-abnt2",    "br" ],
 "by" => [ __("Belarusian"),      "by-cp1251",  "byru" ],
 "ch_de" => [ __("Swiss (German layout)"), "sg-latin1", "de_CH" ],
 "ch_fr" => [ __("Swiss (French layout)"), "fr_CH-latin1", "fr_CH" ],
 "cz" => [ __("Czech (QWERTZ)"), "cz-latin2",   "czsk(cz_us_qwertz)" ],
 "cz_qwerty" => [ __("Czech (QWERTY)"), "cz-lat2", "czsk(cz_us_qwerty)" ],
 "cz_prog" => [ __("Czech (Programmers)"), "cz-lat2-prog", "czsk(us_cz_prog)" ],
 "de" => [ __("German"),         "de-latin1",   "de" ],
 "de_nodeadkeys" => [ __("German (no dead keys)"), "de-latin1-nodeadkeys", "de(nodeadkeys)" ],
 "dk" => [ __("Danish"),         "dk-latin1",   "dk" ],
 "dvorak" => [ __("Dvorak (US)"),     "pc-dvorak-latin1", "dvorak" ],
 "dvorak_no" => [ __("Dvorak (Norwegian)"),     "no-dvorak", "dvorak(no)" ],
 "ee" => [ __("Estonian"),       "ee-latin9",   "ee" ],
 "es" => [ __("Spanish"),        "es-latin1",   "es" ],
 "fi" => [ __("Finnish"),        "fi-latin1",   "fi" ],
 "fr" => [ __("French"),         "fr-latin1",   "fr" ],
 "ge_ru"=>[__("Georgian (\"Russian\" layout)"),"ge_ru-georgian_academy","ge_ru"],
 "ge_la"=>[__("Georgian (\"Latin\" layout)"),"ge_la-georgian_academy","ge_la"],
 "gr" => [ __("Greek"),          "gr-8859_7",   "gr" ],
 "hu" => [ __("Hungarian"),      "hu-latin2",   "hu" ],
 "hr" => [ __("Croatian"),	 "croat",	"yu" ],
 "il" => [ __("Israeli"),        "il-8859_8",   "il" ],
 "il_phonetic" => [ __("Israeli (Phonetic)"),"hebrew",   "il_phonetic" ],
 "ir" => [ __("Iranian"),        "ir-isiri3342","ir" ],
 "is" => [ __("Icelandic"),      "is-latin1",   "is" ],
 "it" => [ __("Italian"),        "it-latin1",   "it" ],
 "jp" => [ __("Japanese 106 keys"), "jp106",	"jp" ],
 "kr" => [ __("Korean keyboard"),"us",	"kr" ],
 "la" => [ __("Latin American"), "la-latin1",   "la" ],
 "mk" => [ __("Macedonian"),	 "mk",		"mk" ],
 "nl" => [ __("Dutch"),          "nl-latin1",   "nl" ],
 "lt" => [ __("Lithuanian AZERTY (old)"), "lt-latin7","lt_a" ],
#- TODO: write a console kbd map for lt_new
 "lt_new" => [ __("Lithuanian AZERTY (new)"), "lt-latin7","lt_std" ],
 "lt_b" => [ __("Lithuanian \"number row\" QWERTY"), "ltb-latin7", "lt" ],
 "lt_p" => [ __("Lithuanian \"phonetic\" QWERTY"), "ltp-latin7", "lt_p" ],
 "no" => [ __("Norwegian"),      "no-latin1",   "no" ],
 "pl" => [ __("Polish (qwerty layout)"),        "pl", "pl" ],
 "pl2" => [ __("Polish (qwertz layout)"),       "pl-latin2", "pl2" ],
 "pt" => [ __("Portuguese"),     "pt-latin1",   "pt" ],
 "qc" => [ __("Canadian (Quebec)"), "qc-latin1","ca_enhanced" ],
 "ru" => [ __("Russian"),        "ru4",         "ru(winkeys)" ],
 "ru_yawerty" => [ __("Russian (Yawerty)"),"ru-yawerty","ru_yawerty" ],
 "se" => [ __("Swedish"),        "se-latin1",   "se" ],
 "si" => [ __("Slovenian"),      "slovene",     "si" ],
 "sk" => [ __("Slovakian (QWERTZ)"), "sk-qwertz",   "czsk(sk_us_qwertz)" ],
 "sk_qwerty" => [ __("Slovakian (QWERTY)"), "sk-qwerty", "czsk(sk_us_qwerty)" ],
 "sk_prog" => [ __("Slovakian (Programmers)"), "sk-prog", "czsk(us_sk_prog" ],
 "th" => [ __("Thai keyboard"),  "th",          "th" ],
 "tr_f" => [ __("Turkish (traditional \"F\" model)"), "trf", "tr_f" ],
 "tr_q" => [ __("Turkish (modern \"Q\" model)"), "tr_q-latin5", "tr" ],
 "ua" => [ __("Ukrainian"),      "ua",           "ua" ],
 "uk" => [ __("UK keyboard"),    "uk",           "gb" ],
 "us" => [ __("US keyboard"),    "us",           "us" ],
 "us_intl" => [ __("US keyboard (international)"), "us-latin1", "us_intl" ],
 "vn" => [ __("Vietnamese \"numeric row\" QWERTY"),"vn-tcvn", "vn" ], 
 "yu" => [ __("Yugoslavian (latin/cyrillic)"), "sr", "sr" ],
)),
);


#-######################################################################################
#- Functions
#-######################################################################################
sub keyboards { keys %keyboards }
sub keyboard2text { $keyboards{$_[0]} && $keyboards{$_[0]}[0] }
sub keyboard2kmap { $keyboards{$_[0]} && $keyboards{$_[0]}[1] }
sub keyboard2xkb  { $keyboards{$_[0]} && $keyboards{$_[0]}[2] }

sub loadkeys_files {
    my $archkbd = arch() =~ /^sparc/ ? "sun" : arch() =~ /i.86/ ? "i386" : arch();
    my $p = "/usr/lib/kbd/keymaps/$archkbd";
    my $post = ".kmap.gz";
    my %trans = ("cz-latin2" => "cz-lat2");
    my (@l, %l);
    foreach (values %keyboards) {
	local $_ = $trans{$_->[1]} || $_->[1];
	my ($l) = grep { -e $_ } ("$p/$_$post");
	$l or /(..)/ and ($l) = grep { -e $_ } ("$p/$1$post");
	print STDERR "unknown $_\n" if $_[0] && !$l; $l or next;
	push @l, $l;
	foreach (`zgrep include $l | grep "^include"`) {
	    /include\s+"(.*)"/ or die "bad line $_";
	    @l{grep { -e $_ } ("$p/$1.inc.gz")} = ();
	}
    }        
    @l, keys %l, grep { -e $_ } map { "$p/$_.inc.gz" } qw(compose euro windowkeys linux-keys-bare);
}

sub unpack_keyboards {
    my ($k) = @_ or return;
    [ map { [ split ':' ] } split ' ', $k ];
}
sub lang2keyboards {
    my ($l) = @_;
    my $li = unpack_keyboards($lang2keyboard{$l}) || [ $keyboards{$l} && $l || "us" ];
    $li->[0][1] ||= 100;
    $li;
}
sub lang2keyboard {
    my ($l) = @_;
    my $kb = lang2keyboards($l)->[0][0];
    $keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboad mapping to us.
}

sub load {
    my ($keymap) = @_;
    return if $::testing;

    my ($magic, @keymaps) = unpack "I i" . c::MAX_NR_KEYMAPS() . "a*", $keymap;
    $keymap = pop @keymaps;

    $magic != $KMAP_MAGIC and die "failed to read kmap magic";

    local *F;
    sysopen F, "/dev/console", 2 or die "failed to open /dev/console: $!";

    my $count = 0;
    foreach (0 .. c::MAX_NR_KEYMAPS() - 1) {
	$keymaps[$_] or next;

	my @keymap = unpack "s" . c::NR_KEYS() . "a*", $keymap;
	$keymap = pop @keymap;

	my $key = -1;
	foreach my $value (@keymap) {
	    $key++;
	    c::KTYP($value) != c::KT_SPEC() or next;
	    ioctl(F, c::KDSKBENT(), pack("CCS", $_, $key, $value)) or die "keymap ioctl failed ($_ $key $value): $!";
	 }
	$count++;
    }
    #- log::l("loaded $count keymap tables");
}

sub xmodmap_file {
    my ($keyboard) = @_;
    my $f = "$ENV{SHARE_PATH}/xmodmap/xmodmap.$keyboard";
    if (! -e $f) {
	eval {
	    require packdrake;
	    my $packer = new packdrake("$ENV{SHARE_PATH}/xmodmap.cz2");
	    $packer->extract_archive("/tmp", "xmodmap.$keyboard");
	};
	#run_program::run("packdrake", "-x", "$ENV{SHARE_PATH}/xmodmap.cz2", '/tmp', "xmodmap.$keyboard");
	$f = "/tmp/xmodmap.$keyboard";
    }
    -e $f && $f;
}

sub setup {
    return if arch() =~ /^sparc/;
    my ($keyboard) = @_;
    my $o = $keyboards{$keyboard} or return;

    log::l("loading keymap $o->[1]");
    if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$o->[1].bkmap")) {
	load(scalar cat_($f));
    } else {
	local *F;
	#open F, "packdrake -x $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].bkmap |";
	if (my $pid = open F, "-|") {
	    local $/ = undef;
	    eval { load(join('', <F>)) };
	    waitpid $pid, 0;
	} else {
	    eval {
		require packdrake;
		my $packer = new packdrake("$ENV{SHARE_PATH}/keymaps.cz2");
		$packer->extract_archive(undef, "$o->[1].bkmap");
	    };
	    c::_exit(0);
	}
    }
    my $f = xmodmap_file($keyboard);
    eval { run_program::run('xmodmap', $f) } if $f && !$::testing && $ENV{DISPLAY};
}

sub write {
    my ($prefix, $keyboard, $charset, $isNotDelete) = @_;

    setVarsInSh("$prefix/etc/sysconfig/keyboard", { KEYTABLE => keyboard2kmap($keyboard), 
						    KBCHARSET => $charset,
						    REMOVE_MOD_META_L => "",
						    BACKSPACE => $isNotDelete ? "BackSpace" : "Delete" });
    run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or log::l("dumpkeys failed");
}

sub read {
    my ($prefix) = @_;
    my %keyf = getVarsFromSh("$prefix/etc/sysconfig/keyboard");
    my $keytable = $keyf{KEYTABLE};
    keyboard2kmap($_) eq $keytable and return $_ foreach keys %keyboards;
    $keyboards{$keytable} && $keytable; #- keep track of unknown keyboard.
}

#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
1;
pan> directly exposed to the Internet. The trade-off of a higher security level is generally obtained at the expense of ease of use. Refer to the \"msec\" chapter of the ``Command Line Manual'' to get more information about the meaning of these levels. If you do not know what to choose, keep the default option."), partition_with_diskdrake => N_("At this point, you need to choose which partition(s) will be used for the installation of your Mandrake Linux system. If partitions have already been defined, either from a previous installation of GNU/Linux or from another partitioning tool, you can use existing partitions. Otherwise, hard drive partitions must be defined. To create partitions, you must first select a hard drive. You can select the disk for partitioning by clicking on ``hda'' for the first IDE drive, ``hdb'' for the second, ``sda'' for the first SCSI drive and so on. To partition the selected hard drive, you can use these options: * \"Clear all\": this option deletes all partitions on the selected hard drive * \"Auto allocate\": this option enables you to automatically create ext3 and swap partitions in free space of your hard drive \"More\": gives access to additional features: * \"Save partition table\": saves the partition table to a floppy. Useful for later partition-table recovery, if necessary. It is strongly recommended that you perform this step. * \"Restore partition table\": allows you to restore a previously saved partition table from a floppy disk. * \"Rescue partition table\": if your partition table is damaged, you can try to recover it using this option. Please be careful and remember that it doesn't always work. * \"Reload partition table\": discards all changes and reloads the partition table that was originally on the hard drive. * \"Removable media automounting\": unchecking this option will force users to manually mount and unmount removable medias such as floppies and CD-ROMs. * \"Wizard\": use this option if you wish to use a wizard to partition your hard drive. This is recommended if you do not have a good understanding of partitioning. * \"Undo\": use this option to cancel your changes. * \"Toggle to normal/expert mode\": allows additional actions on partitions (type, options, format) and gives more information about the hard drive. * \"Done\": when you are finished partitioning your hard drive, this will save your changes back to disk. When defining the size of a partition, you can finely set the partition size by using the Arrow keys of your keyboard. Note: you can reach any option using the keyboard. Navigate through the partitions using [Tab] and the [Up/Down] arrows. When a partition is selected, you can use: * Ctrl-c to create a new partition (when an empty partition is selected) * Ctrl-d to delete a partition * Ctrl-m to set the mount point To get information about the different file system types available, please read the ext2FS chapter from the ``Reference Manual''. If you are installing on a PPC machine, you will want to create a small HFS ``bootstrap'' partition of at least 1MB which will be used by the yaboot bootloader. If you opt to make the partition a bit larger, say 50MB, you may find it a useful place to store a spare kernel and ramdisk images for emergency boot situations."), resizeFATChoose => N_("More than one Microsoft partition has been detected on your hard drive. Please choose the one you want to resize in order to install your new Mandrake Linux operating system. Each partition is listed as follows: \"Linux name\", \"Windows name\" \"Capacity\". \"Linux name\" is structured: \"hard drive type\", \"hard drive number\", \"partition number\" (for example, \"hda1\"). \"Hard drive type\" is \"hd\" if your hard dive is an IDE hard drive and \"sd\" if it is a SCSI hard drive. \"Hard drive number\" is always a letter after \"hd\" or \"sd\". With IDE hard drives: * \"a\" means \"master hard drive on the primary IDE controller\"; * \"b\" means \"slave hard drive on the primary IDE controller\"; * \"c\" means \"master hard drive on the secondary IDE controller\"; * \"d\" means \"slave hard drive on the secondary IDE controller\". With SCSI hard drives, an \"a\" means \"lowest SCSI ID\", a \"b\" means \"second lowest SCSI ID\", etc. \"Windows name\" is the letter of your hard drive under Windows (the first disk or partition is called \"C:\")."), selectCountry => N_("\"Country\": check the current country selection. If you are not in this country, click on the button and choose another one."), selectInstallClass => N_("This step is activated only if an old GNU/Linux partition has been found on your machine. DrakX now needs to know if you want to perform a new install or an upgrade of an existing Mandrake Linux system: * \"Install\": For the most part, this completely wipes out the old system. If you wish to change how your hard drives are partitioned, or change the file system, you should use this option. However, depending on your partitioning scheme, you can prevent some of your existing data from being over- written. * \"Upgrade\": this installation class allows you to update the packages currently installed on your Mandrake Linux system. Your current partitioning scheme and user data is not altered. Most of other configuration steps remain available, similar to a standard installation. Using the ``Upgrade'' option should work fine on Mandrake Linux systems running version \"8.1\" or later. Performing an Upgrade on versions prior to Mandrake Linux version \"8.1\" is not recommended."), selectKeyboard => N_("Depending on the default language you chose in Section , DrakX will automatically select a particular type of keyboard configuration. However, you might not have a keyboard that corresponds exactly to your language: for example, if you are an English speaking Swiss person, you may have a Swiss keyboard. Or if you speak English but are located in Quebec, you may find yourself in the same situation where your native language and keyboard do not match. In either case, this installation step will allow you to select an appropriate keyboard from a list. Click on the \"More \" button to be presented with the complete list of supported keyboards. If you choose a keyboard layout based on a non-Latin alphabet, the next dialog will allow you to choose the key binding that will switch the keyboard between the Latin and non-Latin layouts."), selectLanguage => N_("Your choice of preferred language will affect the language of the documentation, the installer and the system in general. Select first the region you are located in, and then the language you speak. Clicking on the \"Advanced\" button will allow you to select other languages to be installed on your workstation, thereby installing the language-specific files for system documentation and applications. For example, if you will host users from Spain on your machine, select English as the default language in the tree view and \"Espanol\" in the Advanced section. Note that you're not limited to choosing a single additional language. Once you have selected additional locales, click the \"Next ->\" button to continue. To switch between the various languages installed on the system, you can launch the \"/usr/sbin/localedrake\" command as \"root\" to change the language used by the entire system. Running the command as a regular user will only change the language settings for that particular user."), selectMouse => N_("Usually, DrakX has no problems detecting the number of buttons on your mouse. If it does, it assumes you have a two-button mouse and will configure it for third-button emulation. The third-button mouse button of a two-button mouse can be ``pressed'' by simultaneously clicking the left and right mouse buttons. DrakX will automatically know whether your mouse uses a PS/2, serial or USB interface. If for some reason you wish to specify a different type of mouse, select it from the provided list. If you choose a mouse other than the default, a test screen will be displayed. Use the buttons and wheel to verify that the settings are correct and that the mouse is working correctly. If the mouse is not working well, press the space bar or [Return] key to cancel the test and to go back to the list of choices. Wheel mice are occasionally not detected automatically, so you will need to select your mouse from a list. Be sure to select the one corresponding to the port that your mouse is attached to. After selecting a mouse and pressing the \"Next ->\" button, a mouse image is displayed on-screen. Scroll the mouse wheel to ensure that it is activated correctly. Once you see the on-screen scroll wheel moving as you scroll your mouse wheel, test the buttons and check that the mouse pointer moves on-screen as you move your mouse."), selectSerialPort => N_("Please select the correct port. For example, the \"COM1\" port under Windows is named \"ttyS0\" under GNU/Linux."), setRootPassword => N_("This is the most crucial decision point for the security of your GNU/Linux system: you have to enter the \"root\" password. \"Root\" is the system administrator and is the only one authorized to make updates, add users, change the overall system configuration, and so on. In short, \"root\" can do everything! That is why you must choose a password that is difficult to guess - DrakX will tell you if the password that you chose too easy. As you can see, you are not forced to enter a password, but we strongly advise you against. GNU/Linux is as prone to operator error as any other operating system. Since \"root\" can overcome all limitations and unintentionally erase all data on partitions by carelessly accessing the partitions themselves, it is important that it be difficult to become \"root\". The password should be a mixture of alphanumeric characters and at least 8 characters long. Never write down the \"root\" password -- it makes it too easy to compromise a system. One caveat -- do not make the password too long or complicated because you must be able to remember it! The password will not be displayed on screen as you type it in. To reduce the chance of a blind typing error you will need to enter the password twice. If you do happen to make the same typing error twice, this ``incorrect'' password will have to be used the first time you connect. If you wish access to this computer to be controlled by an authentication server, clisk the \"Advanced\" button. If your network uses either LDAP, NIS, or PDC Windows Domain authentication services, select the appropriate one as \"authentication\". If you do not know which to use, ask your network administrator. If you happen to have problems with reminding passwords, you can choose to have \"No password\", if your computer won't be connected to the Internet, and if you trust anybody having access to it."), setupBootloader => N_("This dialog allows to finely tune your bootloader: * \"Bootloader to use\": there are three choices for your bootloader: * \"GRUB\": if you prefer grub (text menu). * \"LILO with text menu\": if you prefer LILO with its text menu interface. * \"LILO with graphical menu\": if you prefer LILO with its graphical interface. * \"Boot device\": in most cases, you will not change the default (\"/dev/hda\"), but if you prefer, the bootloader can be installed on the second hard drive (\"/dev/hdb\"), or even on a floppy disk (\"/dev/fd0\"); * \"Delay before booting the default image\": after a boot or a reboot of the computer, this is the delay given to the user at the console to select a boot entry other than the default. !! Beware that if you choose not to install a bootloader (by selecting \"Skip\"), you must ensure that you have a way to boot your Mandrake Linux system! Be sure you know what you do before changing any of the options. !! Clicking the \"Advanced\" button in this dialog will offer advanced options that are reserved for the expert user."), setupBootloaderAddEntry => N_("After you have configured the general bootloader parameters, the list of boot options that will be available at boot time will be displayed. If there are other operating systems installed on your machine they will automatically be added to the boot menu. You can fine-tune the existing options by clicking \"Add\" to create a new entry; selecting an entry and clicking \"Modify\" or \"Remove\" to modify or remove it. \"OK\" validates your changes. You may also not want to give access to these other operating systems to anyone who goes to the console and reboots the machine. You can delete the corresponding entries for the operating systems to remove them from the bootloader menu, but you will need a boot disk in order to boot those other operating systems!"), setupBootloaderBeginner => N_("LILO and grub are GNU/Linux bootloaders. Normally, this stage is totally automated. DrakX will analyze the disk boot sector and act according to what it finds there: * if a Windows boot sector is found, it will replace it with a grub/LILO boot sector. This way you will be able to load either GNU/Linux or another OS. * if a grub or LILO boot sector is found, it will replace it with a new one. If it cannot make a determination, DrakX will ask you where to place the bootloader. \"Boot device\": in most cases, you will not change the default (\"First sector of drive (MBR)\"), but if you prefer, the bootloader can be installed on the second hard drive (\"/dev/hdb\"), or even on a floppy disk (\"On Floppy\"). Checking \"Create a boot disk\" allows you to have a rescue bot media handy. The Mandrake Linux CD-ROM has a built-in rescue mode. You can access it by booting the CD-ROM, pressing the >> F1<< key at boot and typing >>rescue<< at the prompt. If your computer cannot boot from the CD-ROM, there are at least two situations where having a boot floppy is critical: * when installing the bootloader, DrakX will rewrite the boot sector (MBR) of your main disk (unless you are using another boot manager), to allow you to start up with either Windows or GNU/Linux (assuming you have Windows on your system). If at some point you need to reinstall Windows, the Microsoft install process will rewrite the boot sector and remove your ability to start GNU/Linux! * if a problem arises and you cannot start GNU/Linux from the hard disk, this floppy will be the only means of starting up GNU/Linux. It contains a fair number of system tools for restoring a system that has crashed due to a power failure, an unfortunate typing error, a forgotten root password, or any other reason. If you say \"Yes\", you will be asked to insert a disk in the drive. The floppy disk must be blank or have non-critical data on it - DrakX will format the floppy and will rewrite the whole disk."), setupDefaultSpooler => N_("Now, it's time to select a printing system for your computer. Other OSs may offer you one, but Mandrake Linux offers two. Each of the printing systems is best for a particular type of configuration. * \"pdq\" -- which is an acronym for ``print, don't queue'', is the choice if you have a direct connection to your printer, you want to be able to panic out of printer jams, and you do not have networked printers. (\"pdq \" will handle only very simple network cases and is somewhat slow when used with networks.) It's recommended that you use \"pdq \" if this is your first experience with GNU/Linux. * \"CUPS\" - `` Common Unix Printing System'', is an excellent choice for printing to your local printer or to one halfway around the planet. It is simple to configure and can act as a server or a client for the ancient \"lpd \" printing system, so it compatible with older operating systems that may still need print services. While quite powerful, the basic setup is almost as easy as \"pdq\". If you need to emulate a \"lpd\" server, make sure to turn on the \"cups-lpd \" daemon. \"CUPS\" includes graphical front-ends for printing or choosing printer options and for managing the printer. If you make a choice now, and later find that you don't like your printing system you may change it by running PrinterDrake from the Mandrake Control Center and clicking the expert button."), setupSCSI => N_("DrakX will first detect any IDE devices present in your computer. It will also scan for one or more PCI SCSI cards on your system. If a SCSI card is found, DrakX will automatically install the appropriate driver. Because hardware detection is not foolproof, DrakX will ask you if you have a PCI SCSI installed. Clicking \" Yes\" will display a list of SCSI cards to choose from. Click \"No\" if you know that you have no SCSI hardware in your machine. If you're not sure, you can check the list of hardware detected in your machine by selecting \"See hardware info \" and clicking