[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
slackware:localization [2012/11/19 07:12 (UTC)] – [Setting the console font] bockeslackware:localization [2012/12/14 14:56 (UTC)] – [Setting the console font] Fixed a typo. Thanx elesmod for the report. bocke
Line 89: Line 89:
  
 Slackware has a profile script which allows you to set the system's locale for all users at once (system-wide). You can simply edit this file with an ASCII editor such as ''nano'' or ''vi''. Check out Slackware has a profile script which allows you to set the system's locale for all users at once (system-wide). You can simply edit this file with an ASCII editor such as ''nano'' or ''vi''. Check out
-  /etc/profile.d lang.sh+  /etc/profile.d/lang.sh
 (users of C-shell and derivatives must edit ''/etc/profile.d/lang.csh'' instead). (users of C-shell and derivatives must edit ''/etc/profile.d/lang.csh'' instead).
  
Line 134: Line 134:
 //Note: liloconfig is also available from setup section of pkgtool.// //Note: liloconfig is also available from setup section of pkgtool.//
  
-//The kernel-parameter **"vt.default_utf8=1" is the default**, so you can omit this line in lilo.conf when using UTF-8. Otherwise Slackware has **"vt.default_utf8=0" as it's default!** note the difference!//+
 ==== Setting the console font ==== ==== Setting the console font ====
  
Line 154: Line 154:
 //Note: setconsolefont is also available from setup section of pkgtool.// //Note: setconsolefont is also available from setup section of pkgtool.//
  
-//Note: Console fonts are found in /usr/share/kbd/console-fonts. You can also use an absolute path as an argument.//+//Note: Console fonts are found in /usr/share/kbd/consolefonts. You can also use an absolute path as an argument.//
  
 ==== Temporarily changing the font ==== ==== Temporarily changing the font ====
  
-You can temporary change the font by using setfont utility (part of kbd package). If you specify non-unicode font under Unicode console mode, setfont will try to automatically load Unicode mappings if available. Nowadays most of the fonts already contain embedded unicode maps. For more info and additional options, see the setfont manual.+You can temporary change the font by using setfont utility (part of kbd package). If you specify non-unicode font under unicode console mode, setfont will try to automatically load unicode mappings if available. Nowadays most of the fonts already contain embedded unicode maps. For more info and additional options, see the setfont manual.
  
 //Note that **setconsolefont also uses setfont internally**. so this applies to it too.//  //Note that **setconsolefont also uses setfont internally**. so this applies to it too.// 
Line 170: Line 170:
 ==== Loading a custom console keymap ==== ==== Loading a custom console keymap ====
  
-You can use setkeys tool to setup the current keymap. IE:+You can use setkeys tool to setup the current keymap. For example:
  
 <code>loadkeys hu</code> <code>loadkeys hu</code>
Line 176: Line 176:
 Keymaps are located in /usr/share/kbd/keymaps. They usually contain some notes on encoding/additional key bindings. IE: sr-cyr is Serbian Cyrillic keymap. It's an ISO-8859-5 keymap. Right shift is bound as a switch between US English and Serbian Cyrillic. Other example is Russian keymap (UTF-8, ctrl+shift as a switch key). Keymaps are located in /usr/share/kbd/keymaps. They usually contain some notes on encoding/additional key bindings. IE: sr-cyr is Serbian Cyrillic keymap. It's an ISO-8859-5 keymap. Right shift is bound as a switch between US English and Serbian Cyrillic. Other example is Russian keymap (UTF-8, ctrl+shift as a switch key).
  
-Keymap files are compressed textual descriptions and are easily viewable with zcat. IE:+Keymap files are compressed textual descriptions and are easily viewable with zcat. For example:
  
 <code>zcat /usr/share/kbd/keymaps/i386/azerty/fr-pc.map.gz | head | grep "^#"</code> <code>zcat /usr/share/kbd/keymaps/i386/azerty/fr-pc.map.gz | head | grep "^#"</code>
Line 209: Line 209:
 ==== Diagnostics ==== ==== Diagnostics ====
  
-You can check if the current console is properly configured for Unicode+You can check if the current console is properly configured for unicode
  
 Run stty with "-a" option: Run stty with "-a" option:
 <code>stty -a</code> <code>stty -a</code>
  
-If you see "-iutf8" among the results, current VC is not configured for UTF-8, otherwise if you see "iutf8" (without minus sign), the vc is properly configured.+If you see "-iutf8" among the results, current virtual console is not configured for UTF-8, otherwise if you see "iutf8" (without minus sign), the vc is properly configured.
  
 Run kbd_mode without arguments: Run kbd_mode without arguments:
Line 224: Line 224:
 ===== X11 Locales ===== ===== X11 Locales =====
  
-When your computer boots into runlevel 4 and uses one of the login-managers gdm, kdm or xdm, the ~/.profile file is sourced in any case. This means if your system uses "per user" settings (as described above) for $LANG, this settings remain valid in X11. The windowmanagers and desktop-environments (except KDE) should then come up with menus in your language.+When your computer boots into runlevel 4 and uses one of the login-managers (for example: gdm, kdm or xdm), the ~/.profile file is sourced in any case. This means if your system uses "per user" settings (as described above) for $LANG, this settings remain valid in X11. The window managers and desktop environments (except KDE) should then come up with menus in your language.
  
 When you startx from runlevel 3 your $LANG-settings from the console are applied to the windowmanager. When you startx from runlevel 3 your $LANG-settings from the console are applied to the windowmanager.
Line 231: Line 231:
 ===== X11 keyboard setup ===== ===== X11 keyboard setup =====
  
-The keyboard layout for the X-Window system is independent from the keyboard layout of the console (when not running X). The following settings are desktop agnostic.+The keyboard layout for the X-Window system is independent from the keyboard layout of the textual console. The following settings are desktop agnostic.
  
-**Keep in mind:** desktop environments might use their own layout switching shortcuts. Most notable example is KDE with it's ctrl+alt+k.+**Keep in mind:** some desktop environments might use their own layout settings, practically overriding these settings. Most notable example is KDE.
  
 If you want a non-English keyboard-layout with X, you'll have to adapt the config files. The generic config-files are in /usr/share/X11/xorg.conf.d/ and those you want to use, you'll have to copy to the /etc/X11/xord.conf.d/ directory.  If you want a non-English keyboard-layout with X, you'll have to adapt the config files. The generic config-files are in /usr/share/X11/xorg.conf.d/ and those you want to use, you'll have to copy to the /etc/X11/xord.conf.d/ directory. 
Line 248: Line 248:
 **Why is this useful?** \\  **Why is this useful?** \\ 
   * Several people use one computer but prefer different keyboard layouts.     * Several people use one computer but prefer different keyboard layouts.  
-  * People use another script (e.g. Chinese or Cyrillic), they'll have to switch to English layout always when they want to type a command. \\ +  * People use another script (e.g. Greek or Cyrillic), they'll have to switch to English layout always when they want to type a command. \\ 
 Therefore this configuration can be very important although many people will never have to use it. Therefore this configuration can be very important although many people will never have to use it.
  
Line 290: Line 290:
  
 You can find out your current settings of the keyboard-layout in X11 with the command <code>setxkbmap -query</code> You can find out your current settings of the keyboard-layout in X11 with the command <code>setxkbmap -query</code>
 +An overview of setxkbmap is available with <code>setxkbmap -help</code>
  
-The language of the keyboard layout can be simply set with (the following examplelines refer to German language with variant "nodeadkeys"). +The language and variant of the keyboard layout can be simply set with (the following examplelines refer to German language with variant "nodeadkeys"). 
-<code>setxkbmap de</code>+<code>setxkbmap de 
 +setxkbmap -variant nodeadkeys</code> 
 +== Where to place the code? == 
 +If your system boots into **runlevel 3**, which means that you login on the console and then startx, you can put the above code at the top of your ** ~/.xinitrc**. \\ 
 +If your system boots into **runlevel 4** and you login with login-manager like gdm, kdm or xdm, you should insert it to your ** ~/.xprofile**. This file is sourced by any of the login-managers. Please note that ~/.xprofile isn't created by default, you must create it by yourself.
  
-Other settings as for example the "variant" can be done with 
-<code>setxkbmap -variant nodeadkeys</code> 
- 
-For an overview of ''setxkbmap'' please execute 
-<code>setxkbmap -help</code> 
- 
-The disadvantage of the setxkbmap command is that it overwrites any previous keyboard-settings for userland-programs. Therefore it is necessary to execute the setxkbmap commands //before// any other settings for the keyboard-layout are made.  
-You can put your keyboard settings into a little shellscript and call it e.g. my-keymap.sh.  
-<code>#!/bin/bash 
-setxkbmap de 
-setxkbmap -variant nodeadkeys</code> 
-Be sure to make it executeable 
-<code>chmod 755 my-keymap.sh</code> 
-If your system boots into runlevel 3, which means that you login on the console and then startx, you can put the script at the top of your .xinitrc. 
-If your system boots into runlevel 4 and you login with login-manager like gdm, kdm or xdm, you should place the script into your ~/.xprofile. 
-This file is sourced by any of the login-managers. Please note that ~/.xprofile isn't created by default, you must create it by yourself. 
-Example: 
-<code># ~/.xprofile  
-~/my-keymap.sh</code> 
-You can of course put the setxkbmap settings directly into your .xinitrc or .xprofile respectively! 
  
 ===== Desktop Environments ===== ===== Desktop Environments =====
Line 323: Line 308:
 When you're running KDE you'll have to install the language-package (l10n-packages) for your language. The KDE l10n-packages reside in the kdei series. If you download Slackware from a mirror, be sure not to download all of the l10n-packages but only the ones you need, there's one for KDE and one for Calligra for each language. When you're running KDE you'll have to install the language-package (l10n-packages) for your language. The KDE l10n-packages reside in the kdei series. If you download Slackware from a mirror, be sure not to download all of the l10n-packages but only the ones you need, there's one for KDE and one for Calligra for each language.
  
-//The following settings are not necessary when you startx from runlevel 3 and have your language settings already applied.// In this case KDE takes the settings from your environment.+//Note: The following settings are not necessary when you startx from runlevel 3 and have your language settings already applied.// In this case KDE takes the settings from your environment.
  
 When the l10n-package is installed and you start KDE for the first time, open the launcher and click on <key>System Settings</key>  When the l10n-package is installed and you start KDE for the first time, open the launcher and click on <key>System Settings</key> 
 slackware:localization ()