Khyber.ORG
Pashto :: Pashtuns :: Pashtunkhwa :: Pashtunwali
پښتو :: پښتانه :: پښتونخواه :: پښتونوالی

| Articles | Publications | Maps | Links | Language | Tribes | Media |

پښتو څيړنه
Printer Friendly Version

Pashto under Gentoo Linux

Omar Usman Khan

Publishing Date: Monday, June 21 2010

Note: The instructions in this guide are specific to Gentoo distributions only and may/may not work for others. This guide is also work-in progress and will be updated or modified if something new comes along. Last updated: 8 September 2010

Contents

  1. General Settings
  2. Keyboard Layouts
  3. Fonts
  4. Latex
  5. Lyx
  6. Additional Help

General Settings

To enable support in your software for pashto and other languages, your system must support unicode. Most system programs have this enabled by default. For others, you may have to enable it manually during compilation. A very good guide on unicode support in system programs is given here. For other programs (which you compile yourself), make the following changes in /etc/make.conf:

USE="unicode bidi"
LINGUAS="ar fa ur en ps" #For arabic, farsi, urdu, english, pashto

If you do not compile your software with the unicode and bidi flags, you have a chance that your software will not be able to work with pashto even if other applications in your system are able to. If you have already compiled a software without these flags, then you should re-compile them again. For e.g., to re-compile openoffice you will use "emerge openoffice".

Keyboard Layouts

There are different Pashto keyboard layouts available that I know of. Some of them are listed below:

As of now (June 2010), the keymap files by Emal Alekozai are included in xkb and so if you have an up-to-date system, you have very little configuration to do. But if you need to use the Khpala Pashto layout as well, then you can do the following steps:

  1. Check for a file called "af" inside /usr/share/X11/xkb/symbols. The contents of this file provide various keyboard layouts (including the evertype layouts) for Pashto, Dari, and Uzbek. If the file exists and you only require the Evertype layouts, then proceed to step 6. If you want the Khpala Pashto keyboard layout, or if the "af" file does not exist, then proceed with step 2.
  2. Download the keymap archive file. Extract the file af and copy it to /usr/share/X11/xkb/symbols. You may require root access to do this.
  3. Modify the file "base.lst" located in /usr/share/X11/xkb/rules using nano or any other text editor.
    Note: If you have configured your keyboard in X through evdev, then you should modify the file "evdev.lst" instead.
    The layout of this file is as such:
      ! model
    ... // List of keyboard models
    ! layout
    ... // List of layouts (per country)
    ! variant
    ... // List of languages and variants
    • Under the section "! layout", add the following entry (if it does not exist already):
        af		Afghanistan
      Example output:
    • Under the section "! variant", add the following entry (again, making sure not to create duplicate entries):
        ps              af: Pashto
      uz af: Southern Uzbek
      olpc-ps af: OLPC Pashto
      olpc-fa af: OLPC Dari
      olpc-uz af: OLPC Southern Uzbek
      pash af: Khyber.ORG (Khpala Pashto)
      Exit when finished. Example output is below:
  4. Modify the file "base.xml" located in /usr/share/X11/xkb/rules using nano or any other text editor.
    Note: If you have configured your keyboard in X through evdev, then you should modify the file "evdev.xml" instead.
    Search for the following text (You should find it at around line 1,348):
            <variant>
    <configItem>
    <name>olpc-uz</name>
    <description>OLPC Southern Uzbek</description>
    <languageList><iso639Id>uzb</iso639Id></languageList>
    </configItem>
    </variant>
    Immediately after this, and before the </variantList> tag, add the following text:
            <variant>
    <configItem>
    <name>pash</name>
    <description>Khyber.ORG (Khpala Pashto Keyboard)</description>
    <languageList><iso639Id>pus</iso639Id></languageList>
    </configItem>
    </variant>

    Your output should look as follows:

    Save changes and exit.
  5. You may need to restart your X session either by logging out, or pressing CTRL+ALT+BACKSPACE, or running /etc/init.d/xdm restart from the terminal.
  6. Once X is restarted, you should be able to see (under gnome) the keyboard indicator on your desktop.
    Keyboard Layout
    If you don't, you can enable it (under gnome) using following steps:
    • Right click on gnome panel and select "Add to Panel"
      Add to Panel Gnome
    • Select "Keyboard Indicator" from list of options
  7. Right click on the icon and:
    • Select "Keyboard Preferences"
    • Go to Layout tab and select "Add"
    • Select Pashto either "by language" or "by country"

NOTE: Just because you enable a Pashto layout does not mean you can use it in every software in your system. To avoid this, see note on USE in General Settings

Fonts

Emerge the following system font packages:

For pashto fonts, .... < < work in progress > >

Latex

Coming Soon

LyX

Coming Soon

Need More Help??

Maybe I have left something out. Why not ask a question on Betak!

Comments powered by Disqus