Mi blog lah! Το ιστολόγιό μου

3Oct/082

The Keyboard Layout Editor

(this entry is a repost, the original was lost in a database mishap.)

As part of the 2008 GSoC program, I worked on a Keyboard Layout Editor for the X.Org Foundation.

The Keyboard Layout Editor (KLE) is an application that allows you to create keyboard layouts for the X.Org server, commonly found in the Linux, OpenSolaris, *BSD, etc Desktops.

My mentor was Sergey Udaltsov, maintainer of xkeyboard-config, the Keyboard Indicator applet in GNOME, supporting libraries for keyboard layouts and much more. I had great help and Sergey was very supportive. Highly recommended mentor for your GSoC’09 project.

The Keyboard Layout Editor showing a layout

The Keyboard Layout Editor showing a layout

The screenshot above shows the main window of the program; a keyboard with blank layout (keys are empty), a section Add to layout with items that can be used to populate the layout, and a section for the description of the layout (Layout details).

There are typically two workflows; first you start off with a blank layout and you add Unicode characters, dead keys, include files, then you save.

The other workflow is to start with an appropriate existing layout as a base, then add more characters, make changes, etc.

It might be strange to talk about different workflows, but in terms of usability it’s important provide assistance for such cases. For example, having tooltips is important when a person starts off with a new layout.

Using the Keyboard Layout Editor

Using the Keyboard Layout Editor

Here we started with a blank layout; we click on Start Character Map, then locate the characters you need, and drag and drop them to the appropriate keys. Each key is composed of four parts, and we number these from 1 to 4. The way we count is quite peculiar,

  1. bottom left, when you press the key as is (key)
  2. top left, when you press the key with Shift (Shift + key)
  3. bottom right, when you press the key with AltGr (AltGr + key)
  4. top right, when you press the key with Shilft+AltGr (Shift + AltGr + key)
Analysis of a key

Analysis of a key

This is my entry to the most engineered diagram competition.

The dead keys relate to diacritic marks such as grave and acute. Since they are too small to see, we present them next to a D letter (D for Dead key). In some cases I could not find a character equivalent to the diacritic mark, so I put ?, therefore it looks like D?. If you put the mouse pointer over the key, you can see the full details in the tooltip.

Including files

Including files

In many cases, there exist layouts/variants that contain most of the characters you want to add. In this case, you add and enable in the Include files section. You can then override any of those characters by dragging and dropping to the layout.

At this stage in the blog post, it is important to clarify the notions of a layout and a variant. The two are quite similar and the distinction is messy when trying to explain to the end-user. The French layout file is fr, which contains several variants (distinct groups of mappings of physical keys to Unicode characters). When you are actually talking about a French keyboard layout, you are actually referring to the default variant of the «fr» file. Oftentimes people refer to the «fr» file as a whole as the French layout. You can also pick a non-default variant of the layout file, and call it your layout.

The way I would like to define layout and variant is this: a layout refers to the default variant of the layout file. This is consistent to the fact that distributions pick the default variant in the settings so it’s what get the most visibility, or when users select a new layout, they are presented with the default setting first. Regarding layouts in general, it is important for different languages/scripts to make effort that the default layout is updated and includes extra useful and relevant characters.

The new Greek keyboard layout

The new Greek keyboard layout

This is the updated Greek keyboard layout, and is the near-final version that we are planning to submit to xkeyboard-config. It adds Greek Polytonic to the existing Greek layout.  It does not make changes to the previous default layout, so users will not be unpleasantly surprised. It also adds all sort of characters that are found in the Greek Unicode block.

In this post I simplified some of the terms/description. If I went a bit too far, please correct me and I’ll update in-place.

Update 8th Sep 08: What are the plans for further development of the layout editor;

  • Increase the user base and get more people trying out the editor. This requires some more cleanup of the code, more instructions on how to run it youselves, and get people to provide feedback. An open-source project without users is not a successful project.
  • Make it easier for developers to contribute on the project. If you use Eclipse, you can install pydev, antlr3ide, mylyn, subclipse, and you can do the full development from within the cozy Eclipse environment. These need documentation.
  • The Issues page at the project has about ten items. This list needs to be reduced.
  • The natural place for users of the layout editor is the http://listserv.bat.ru/xkb/List.html mailing list. We need to promote the editor there, and get examples of users actually using it to maintain layouts.
  • An issue that plagues some users is when they need compose sequences to generate characters that no pre-composed forms exist. If users really need this (mainly Latin and Cyrillic scripts, complex scripts), it can be adapted to the UI.
  • It is technically easy to adapt the editor so that it produces XML layouts. Considering the state of XKB-atkins, this may not be a top priority at the moment. libxml2 comes with the MIT license, so in license terms it would be OK. Not sure if it is OK to link libxml2 to the X.org server. It might actually solve the slow parsing of the configurations files and the issues of xkbcomp.
  • At the moment the default geometry is a somewhat generic keyboard. In addition, I deactivated several keys (such as the function keys), in order not to confuse users (you can activate with a small change in the code). The keyboard can be expanded to a full 105-keys style. A related project would be to figure out an efficient way to edit those geometry files, and make the keyboard customised. If people start creating layouts with the editor, they will certainly love to edit geometry files!
3Oct/080

Συνέδριο XOrg Developer Summit

Αυτές τις μέρες (αρχές Σεπτεμβρίου 2008) διεξάγεται το συνέδριο XOrg Developer Summit Εδιμβούργο της Σκωτίας.

Διαρκεί 3 μέρες και οι σημειώσεις περιγράφουν τι ειπώθηκε.

11Jun/080

ANTLR grammar for XKB, and Relax NG schema (draft)

I completed the ANTLRv3 grammar for symbols/ configuration files of XKB. The grammar can parse and create the abstract syntax tree (AST) for all keyboard layouts in xkeyboard-config.

ANTLRv3 helps you create parsers for domain specific languages (DSL), an example of which is the configuration files in XKB.

Having the ANTLRv3 grammar for a configuration file allows to generate code in any of the supported target lagnuages (C, C++, Java, Python, C#, etc), so that you easily include a parser that reads those files. Essentially you avoid using custom parsers which can be difficult to maintain, or parsers that were generated with flex/bison.

On a similar note, here is the grammar to parse Compose files (such as en_US.UTF-8/Compose.pre). I am not going to be using in the project for now, but it was fun writing it. The Python target takes 18s to create the AST for the >5500 lines of the en_US.UTF-8 compose file, on a typical modern laptop.

I am also working on creating a RelaxNG schema for the XKB configuration files (those under symbols/). There is a draft available, which needs much more work.The Relax NG book by Eric van de Vlist is very useful here.

The immediate goal is to use the code generated by ANTLR to parse the XKB files and create XML files based on the Relax NG schema. I am using Python, and there are a few options; the libxml2 bindings for Python, and PyXML. The latter has more visible documentation, but I think that I should better be using the former.

Update: lxml appears to be the nice way to use libxml2 (instead of using directly libxml2).

2May/081

Εγκατάσταση του Ubuntu 8.04

Ολοκλήρωσα πριν λίγο την εγκατάσταση του Ubuntu 8.04 (έκδοση 64bit). Περιγράφω παρακάτω τις επιλογές που έκανα και τα τυχόν προβλήματα που αντιμετώπισα.
Αν και είχα Ubuntu 7.10, επέλεξα να κάνω εγκατάσταση από την αρχή, διότι έχω κάνει τόσες αλλαγές στο σύστημα που είναι πολύ πιθανό η αναβάθμιση να μη λειτουργήσει. Ωστόσο, ο πιο σημαντικός λόγος της εγκατάστασης ξανά είναι να γλιτώσω από τη σαβούρα που μαζεύεται στην εγκατάσταση μετά από χρήση πολλών μηνών.
Έκανα λοιπόν εκκίνηση του υπολογιστή μου από το DVD του Ubuntu 8.04 (64bit), και εκτέλεσα το Σύστημα/Διαχείριση συστήματος/Partition editor. Εδώ, επέλεξα να κρατήσω αντίγραφο ασφαλείας της κατάτμησης / σε εξωτερικό δίσκο, σε περίπτωση που χρειαστώ να γυρίσω ξανά πίσω στο 7.10. Αυτό βοηθάει ακόμα για να δω λεπτομέρειες από την προηγούμενη εγκατάσταση, που πολύ πιθανό να χρειαστώ. Αργότερα είδα ότι το Ubuntu 8.04 κατάλαβε ότι υπάρχει εγκατάσταση 7.10 και την έβαλε στο μενού της εκκίνησης του υπολογιστή. Έτσι, έχω την επιλογή να μπω σε 7.10 πολύ εύκολα, με εκκίνηση στον εξωτερικό δίσκο USB.
Αυτό το καιρό έχω δύο κατατμήσεις, μια για το / και μια για /home. Έτσι, επέλεξα κατά την εγκατάσταση να μορφοποιηθεί η κατάτμηση για το /, ενώ να διατηρηθεί ως έχει το /home. Ακόμα, μιας και θέλω να ξεκαθαρίσω τα αρχεία μου στον κατάλογο χρήστη, επέλεξα διαφορετικό όνομα χρήστη. Έτσι, μετά το τέλος της εγκατάστασης έχω ένα καθαρό λογιαριασμό, και είμαι σε θέση να μεταφέρω (mv) καταλόγους ρυθμίσεων και αρχεία από τον παλαιό κατάλογο χρήστη κατά βούληση.
Με αυτό το τρόπο, πέρασα την αλληλογραφία μου με την εντολή
mv /home/oldaccount/.mozilla-thunderbird ~
Με τον ίδιο τρόπο μετέφερα το προφίλ μου για το Firefox. Πριν είχα Firefox 2.0, και στην μεταφορά έγινε ενημέρωση του προφίλ για το Firefox 3 του Ubuntu 8.04. Φυσικά ο Firefox πετάει αλλά αυτό το έχετε ακούσει από παντού.
Μετά εγκατέστησα το VirtualBox (πλήρη έκδοση, με υποστήριξη USB). Η βασική εγκατάσταση και χρήση μπορεί να γίνει εξ ολοκλήρου από το γραφικό περιβάλλον, και έτσι το έκανα. Κάνουμε τη λήψη του .deb (για τώρα επιλέγουμε την έκδοση για gutsy), και από την επιφάνεια εργασίας κάνουμε διπλό κλικ για να εγκατασταθεί το πακέτο. Μόλις ενημερωθεί το virtualbox.org με το νέο αποθετήριο για το Ubuntu 8.04, τότε μπορούμε να αποφύγουμε τη διαδικασία αυτή με προσθήκη του virtualbox στους τρίτους κατασκευαστές (third party), στις πηγές λογισμικού του Ubuntu Linux.
Χρειάζεται να προσθέσουμε τους χρήστες του συστήματός μας στην ομάδα vboxusers (γίνεται από το Σύστημα/Διαχείριση/Χρήστες και ομάδες) και μετά αποσύνδεση και σύνδεση ξανά.
Για να ενεργοποιήσουμε την υποστήριξη USB, χρειάζεται να περάσουμε στο τερματικό και να κάνουμε τις απαραίτητες τροποποιήσεις για τα αρχεία /etc/init.d/mountdevsusbfs.sh, /etc/init.d/mountkernfs.sh και /etc/fstab (τα δύο τελευταία είναι για ενεργοποίηση συσκευών όπως εξωτερικοί δίσκοι USB και άλλες πολλές συσκευές). Μετά θέλει επανεκκίνηση του συστήματος.
Η εγκατάσταση του Skype 2.0 σε 64-bit είναι γενικά μπελάς. Αυτό που έκανα είναι να προσθέσω το αποθετήριο medibuntu στις πηγές λογισμικού, τρίτους κατασκευαστές, και μετά να βάλω το πακέτο Skype. Κανένα πρόβλημα.
Εγκατέστησα και το Google Earth από το medibuntu, αλλά τίποτα άλλο. Είδα τα υπόλοιπα πακέτα του medibuntu, και αποφάσισα να απενεργοποιήσω για τώρα το αποθετήριο αυτό.
Ένα σημαντικό που δε δούλεψε με τη μια είναι ο ήχος. Διαβάζοντας από εδώ και εκεί, είδα αναφορές για λήψη του πηγαίου κώδικα της Alsa και μεταγλώττιση ξανά. Αυτό το πράγμα χρειαζόταν για το Ubuntu 7.10, ωστόσο ήμουν σίγουρος ότι δεν χρειάζεται πλέον για την κάρτα μου (snd-hda-intel). Με λίγο ψάξιμο είδα ότι απλά χρειάζεται να προστεθεί στο /etc/modprobe.d/alsa-base η γραμμή
options snd-hda-intel model=lenovo
και μετά επανεκκίνηση. Αυτό ήταν.
Αντίθετα με ότι κάνουν άλλοι χρήστες, προσωπικά δε θα βάλω χύμα κόντεκ για τις διάφορες μορφές πολυμέσων. Με χρήση των εφαρμογών Αναπαραγωγής ήχου και βίντεο, το σύστημα προτρέπει κάθε φορά να γίνει εγκατάσταση των απαιτούμενων πακέτων, αυτόματα.

Κοιτώντας την γενική υποστήριξη ελληνικών στο Ubuntu 8.04, πρέπει να πω ότι είναι αρκετά ευχαριστημένος. Έχει γίνει σημαντική δουλειά σε κάθε σημείο, από την αρχική οθόνη που ξεκινά ο υπολογιστής με το CD/DVD του Ubuntu μέχρι την επιφάνεια εργασίας. Στην οθόνη εκκίνησης έχουμε όλα (σχεδόν!) τα μηνύματα στα ελληνικά, εκτός από δύο (π.χ. Test memory, ήμουν σίγουρος ότι το έλεγξα αυτό αλλά δεν μπήκε στην τελική έκδοση!).
Στα παιχνίδια του Ubuntu, λάβαμε την απόφαση να έχουμε τα ονόματα στα ελληνικά (έτσι, Τετραβέξ αντί Tetravex). Αυτό είναι καλό μιας και τα παιδιά και οι δημόσιοι υπάλληλοι θα παίζουν αποκλειστικά τα παιχνίδια. Αφού και ο db0 δεν χρησιμοποιεί το ελληνικό περιβάλλον, δεν θα υπάρχει σχόλιο ούτε από την πλευρά του. Πάντως, αυτό που συνέβει είναι δύο παιχνίδια βγήκαν αμετάφραστα (Same GNOME, Gnometris) που χαλάνε κάπως τη λίστα, και θα διορθωθούν σε επόμενη έκδοση.
Στη μικροεφαρμογή του ρολογιού είναι δυνατόν να βάλει κάποιος την πόλη του, και το σύστημα θα δείξει την ώρα και τις καιρικές συνθήκες. Δοκιμάστε με πόλεις όπως Θεσσαλονίκη, Καβάλα, Ρόδος, Χανιά, κτλ.
Μιας ακόμα αλλαγή είναι στη συντόμευση για την ελληνική γλώσσα, στην μικροεφαρμογή για την ένδειξη πληκτρολογίου. Τώρα βάλαμε ΕΛΛ (για Ελλάδα), αντί του προηγούμενου Ελλ. Έτσι, συμβαδίζει με το αμερικάνικο πληκτρολόγιο και την ένδειξη ΗΠΑ. Σε επόμενη έκδοση του Ubuntu θα δείχει ΑΓΓ για κάθε αγγλική διάταξη πληκτρολογίου, και αυτό θα γίνει στο πακέτο μετάφρασης για την ελληνική γλώσσα.
Ενημέρωση #1: Ένα πρόβλημα που αντιμετώπισα στην αρχή ήταν η κάρτα γραφικών. Δεν ήταν ζήτημα με τη βασική υποστήριξη της καρτάς γραφικών. Μιας και έχω κάρτα γραφικών Intel, το σύστημα ενεργοποίησε από τη πρώτη στιγμή ακόμα και 3D. Το ζήτημα είχε να κάνει με τη χρήση της εκτεταμμένης επιφάνειας εργασίας (dual head). Για τη χρήση δύο οθονών έπρεπε να επέμβω με το χέρι στο αρχείο ρυθμίσεων /etc/X11/xorg.conf και να καθορίσω το μέγεθος της ιδεατής (Virtual) οθόνης. Δεν κατάφερα να βρω τρόπο για να κάνω το ίδιο πράγμα χωρίς να μπω σε τερματικό.

5Mar/082

Testing the updated IM support in GTK+

In Improving input method support in GTK+-based apps, we talked about some work to update the list of compose sequences that GTK+ knows to the latest version that comes from Xorg. From 691 compose sequences, we now support over 5000.

The patch has landed in GTK+ (trunk), and here are instructions for testing.

  1. If you have not used jhbuild before, read the jhbuild instructions and install it.
  2. Add the following to your ~/.jhbuildrc file
    branches['gtk+'] = None    # Makes sure you build from the trunk of GTK+
  3. Install gtk+ using the command (see the comment of James on this post on how to avoid Step 5 below)
    jhbuild build gtk+
  4. About 40 minutes later, and about 700MB of space (~600MB for source, ~100MB for installation of files) consumed, you should get a working copy of GTK+ 2.12.
  5. You can use this compiled version of GTK+ by running
    jhbuild shell

    This should give you a new shell, and whatever you run from here will use our fresh GTK+. Try running “gedit”. You will notice that the theme is different; it uses the default theme due to the special GTK+. This shell has set special environment variables so that program that run will use the fresh GTK+. The rest of the libraries come from our distribution.

  6. If you try to type compose sequences, you will notice no improvement. This is because at the moment jhbuild builds the branch 2.12 of GTK+ and not trunk. We need to download GTK+ from trunk and rebuild.
    cd ~/checkout/gnome2/
    mv gtk+ gtk+-branch-2.12
    svn co svn://svn.gnome.org/svn/gtk+/trunk gtk+
    jhbuild build --no-network gtk+
  7. Perform Step 4 and get gedit running.

How to test?

  • Setup a keyboard layout that supports a good variety of dead keys. My preference is GBr (United Kingdom). Here, AltGr+[];’#/ and AltGr+{}:@~? produce different dead keys. You press one of these combinations and then you press a letter. If such a combination exists, then it gets printed. For example, the old GTK+ produces öõóôòx åōőxxx. The new GTK+ produces öõóôòọ åōőǒŏȯ (12 dead keys).
  • Setup Greek, Polytonic (Ancient Greek). The dead keys are [];’ {}:@ AltGr+[] (10 dead keys). Produce characters such as ᾅᾂᾷῗὕὒᾥᾢῷ.
  • Try compose sequences as described from the upstream file at XOrg. For example,
    ComposeKey+(   1 0 )  produces ⑩. Try the same for 0-20, a-zA-Z.
  • Other miscellaneous, Ṩǟấẫǡ (using GBr layout)

The next step would be to parse the list of compose sequences and produce a documentation file.

20Feb/087

Keyboard layout for combining diacritics

Typically, if you want to type characters with accents, such as á, ë, ś, you need to configure a suitable keyboard layout that includes compose sequences for those characters. The produced characters are what we call as precomposed characters; which were included in the early stages of Unicode. Nowdays, the idea is that you do not need to define á as a distinct character because it can be represented as a and ´, where the latter is a combining diacritic.

When put together a character and a combining diacritic, they fuse together, producing a seemingly single character. á is a precomposed (really one character), while á is letter a and the combining diacritic called acute (two characters). You can type the latter á by

  1. Type a
  2. Press Ctrl+Shift+u, then type 301, then press space bar.

Western languages do not really require combining marks, so the existing keyboard layouts do not use them. Other scripts, such as the Congolese keyboard layout (based on Latin) make good use of them.

Gedit, pango and combining diacritics

This is gedit showing off pango and DejaVu fonts (default font in major distributions).

Line 3 is a bit of an extreme, showing a sandwich of combining diacritics.

Line 4 shows the base character a with the combining diacritics from the Unicode range 0×300 to 0×315.

Both lines 3 and 4 were produced easily with a modified keyboard layout, which is show below.

Line 5 is just me being silly. You can have combining diacritics that enclose your base character.

$ cat  /usr/share/X11/xkb/symbols/combining
partial alphanumeric_keys alternate_group
xkb_symbols "combining" {

    name[Group1] = "Combining diacritics";

    key.type[Group1] = "FOUR_LEVEL";

    key <AD11> { [ NoSymbol, NoSymbol, 0x1000300, 0x1000301 ] }; // à   á
    key <AD12> { [ NoSymbol, NoSymbol, 0x1000302, 0x1000303 ] }; // â   ã

    key <AC10> { [ NoSymbol, NoSymbol, 0x1000304, 0x1000305 ] }; // ā   a̅
    key <AC11> { [ NoSymbol, NoSymbol, 0x1000306, 0x1000307 ] }; // ă   ȧ
    key <BKSL> { [ NoSymbol, NoSymbol, 0x1000308, 0x1000309 ] }; // ä    ả

    key <AB08> { [ NoSymbol, NoSymbol, 0x1000310, 0x1000311 ] }; // a̐     ȃ
    key <AB09> { [ NoSymbol, NoSymbol, 0x1000312, 0x1000313 ] }; // a̒     a̓
    key <AB10> { [ NoSymbol, NoSymbol, 0x1000314, 0x1000315 ] }; // a̔     a̕
};
$ diff -u /usr/share/X11/xkb/symbols/us.ORIGINAL /usr/share/X11/xkb/symbols/us
--- /usr/share/X11/xkb/symbols/us.ORIGINAL      2008-02-20 11:11:13.000000000 +0000
+++ /usr/share/X11/xkb/symbols/us       2008-02-20 13:02:07.000000000 +0000
@@ -492,3 +492,12 @@
     name[Group1]= "U.S. English - Macintosh";
 };

+partial alphanumeric_keys modifier_keys
+xkb_symbols "combining_us" {
+
+    include "us"
+    include "combining"
+
+    key.type[Group1] = "FOUR_LEVEL";
+    name[Group1] = "U.S. English - Combining";
+};
$ diff -u /usr/share/X11/xkb/rules/xorg.xml.ORIGINAL /usr/share/X11/xkb/rules/xorg.xml
--- /usr/share/X11/xkb/rules/xorg.xml.ORIGINAL  2008-02-20 11:27:00.000000000 +0000
+++ /usr/share/X11/xkb/rules/xorg.xml   2008-02-20 11:27:48.000000000 +0000
@@ -3643,6 +3643,12 @@
             <description xml:lang="zh_TW">Macintosh</description>
           </configItem>
         </variant>
+        <variant>
+          <configItem>
+            <name>combining_us</name>
+            <description>Combining</description>
+          </configItem>
+        </variant>
       </variantList>
     </layout>
     <layout>
$ _

Then, you select this keyboard layout (U.S. English) and variant (Combining) in the Keyboard Indicator applet.

Unlike dead keys, with combining diacritics you first type the base character (such as a) and then any combining diacritics.
Our sample layout variant puts the diacritics in the physical keys for [];’#,./. For example,

  • a + AltGr+[ : à
  • a + AltGr+Shift+[ : á
  • a + AltGr+[ + AltGr+’ : ằ

If your language has needs that can be solved with combining diacritics, this is how they are solved.

It is quite important to create keyboard layouts for all languages, and actually make good use of them.

8Jan/070

The OLPC and Greek

(oh, I am writing this through a lousy Net connection; thanks Engelados)

I tried out the latest OLPC image, specifically build 218, on Qemu and my aim was to get Greek support configured, if it was not there already.

The OLPC does not currently come with a good set of Greek fonts; you will need to install a set of fonts such as DejaVu or GFS Didot.
Installing means adding the font files in the directory /usr/share/fonts/. The current font configuration files in the OLPC favour Bitstream Vera, therefore you would need to move the bitstream subdirectory outside the fonts directory. DejaVu is based on Bitstream Vera and therefore you will not notice any change once you upgrade. Also, Fedora Core 6 and Ubuntu Linux are based on DejaVu. You need DejaVu, as Bitstream Vera does not currently support Greek. Both DejaVu and GFS Didot are free and open-source fonts.

Note: This screenshot shows DejaVu Sans, not GFS Didot. Sorry for the typo.
This is the OLPC running the cut-down version of the Abiword wordprocessor. Click on the image to view the full size.

This is the OLPC showing the same document above with GFS Didot. The font looks quite nice and similar to old greek textbooks. There is a small issue however, it does not have the character coverage of DejaVu. For example, notice that the Euro sign is missing from GFS Didot. Also, other glyphs such as fancy bullet characters are missing as well. Normally, the OLPC software should replace those missing characters with the correct characters from another font. Apparently something is wrong here and needs further investigation.

Writing support for the Greek language has to be configured separately in the OLPC. The case with other languages appears to be that the default layout is that of the language; apparently there is no need to switch between Brazilian Portuguese and English. For the Greek language it appears that it is good to be able to switch between Greek and English.

There are several places that you can add Greek writing support. The most common is in /etc/X11/xorg.conf. Having gone through the configuration files, I think that /etc/X11/Xkbmap is also a good place and saves us from touching the core Xorg configuration file.

To write the full set of Greek letters, one needs to set the extended variant for the Greek layout, and also try to set the Compose key (for ano teleia). These things should be simplified…

I am not sure how the OLPC looks like (the only photos I saw where not focusing on the keyboard). Perhaps it would be useful to have a test machine at my disposal (hint, hint).
Jim Gettys wrote at his blog about the different languages that the first generation of the OLPC should support. Both Kinyarwanda and Kiswahili use the latin alphabet, therefore there are no significant issues with font support or writing support.

p.s.
Greece will carry out a pilot with OLPC laptops next September.

1Jul/060

Επιστροφή από GUADEC 2006

Σήμερα το πρωί επέστρεψα από το συνέδριο GNOME User and Developer European Conference (GUADEC).

Το συνέδριο ήταν μια πολύ καλή ευκαιρία για να συναντηθούν τα άτομα που εργάζονται στο ίδιο το γραφικό περιβάλλον GNOME και αλλά σημαντικά έργα όπως το Xorg.

Οι πρώτες δύο μέρες ήταν για warm up και υπήρχαν θέματα γενικά για το ελεύθερο λογισμικό. Υπήρξαν αναφορές για τοπικοποίηση ελεύθερου λογισμικού όπως OOo και Mozilla. Ο οργανισμός SIL International έκανε επίδειξη την δουλειά που κάνει με τη βιβλιοθήκη graphite, που επιτρέπει την απεικόνιση περίπλοκων γραφών (ινδικά, κτλ) καθώς και τη γραφή με τη χρήση combining marks. Για το τελευταίο, όταν π.χ. κάποιος γράφει ελληνικά μπορεί να χρησιμοποιήσει είτε χαρακτήρες precomposed (με τα σημάδια ήδη επάνω τους) είτε τους χαρακτήρες της αλφαβήτου με τα combining marks. Δοκιμάστε να γράψετε σε GNOME

α + Ctr-Shift-301 παράγει ά

Δηλαδή υπάρχει διαφορά στην κωδικοποίηση των ά και ά καθώς και μικρή διαφορά στην εμφάνιση τους. Σε παραδείγματα με πιο περίπλοκα σημάδια, το πρόβλημα αυτό είναι ακόμα πιο φανερό.

Με τη μηχανή graphite είναι δυνατό να αποδοθούν οι κατάλληλες πληροφορίες στις γραμματοσειρές για να γίνει η σωστή απεικόνιση.
Ακόμα, η βιβλιοθήκη KMFL επιτρέπει το εύκολο γράψιμο σε άλλες γλώσσες. Σε Ubuntu είναι διαθέσιμη ως συστατικό του SCIM.

Ο Federico Mena Quintero έκανε μια βασική παρουσίαση για τα πρώτα βήματα στο προγραμματισμό και στη δημιουργία επιρραμμάτων (patches). Στόχος της παρουσίασης ήταν να κάνει την τοπική κοινότητα να ξεκινήσει τον προγραμματισμό.

Την πρώτη ημέρα του Guadec ο Jeff Waugh άνοιξε το συνέδριο με παρουσίαση των βασικών στόχων του έργου GNOME. Στο προσκήνιο είναι ο Dave Neary.
Go to the screencast

Ο Alex Graveley παρουσίασε το Gimmie, ενός προγράμματος που μπορεί να αντικαταστήσει το ταμπλώ στο GNOME. Υπάρχει τώρα και ελληνική μετάφραση του πακέτου.

Ο Miguel κάθεται στα δεξιά (πράσινο t-shirt).

Η Kathy Sierra έκανε μια παρουσίαση με τίτλο How to make passionate users. Η παρουσίαση αυτή ήταν από της καλύτερες του συνεδρίου διότι παρουσίασε προβλήματα στη σωστή προβολή και διάδοση ελεύθερου λογισμικού. Συγκεκριμένα, πρέπει να υπάρχει μια ροή κατά τη διάρκεια της εκμάθησης ενός νέου πακέτου λογισμικού ώστε να γίνει η μετατροπή ενός νέου χρήστη σε ένα παθιασμένο χρήστη.
O Behdad έκανε μια παρουσίαση για το pango και τις γραμματοσειρές. Υπάρχει ένα ζήτημα για το θέμα της σωστής υποστήριξης ελληνικών στη διανομή Fedora Core Linux. Αυτή τη στιγμή η πιο κατάλληλη ελεύθερη γραμματοσειρά είναι η DejaVu. Δεν έγινε αναφορά στο ζήτημα αυτό, σε αυτό το σημείο.
O Robert Love έκανε μια παρουσίαση για το NetworkManager, που επιτρέπει εφαρμογές να διατηρούν μια σωστή σύνδεση με το δίκτυο. Το πακέτο αυτό είναι ιδιαίτερο σημαντικό όταν υπάρχουν πολλαπλά access points και θέλετε να υπάρχει αυτόματη ρύθμιση δικτύου. Στην ίδια παρουσίαση, ο Robert αναφέρθηκε και το πακέτο FUSE που επιτρέπει στους χρήστες να γράφουν τα δικά τους συστήματα αρχείων σε κατάσταση χρήστη (userspace).
Ο Damien Sandras παρουσίασε το Ekiga, πρόγραμμα επικοινωνίας μέσω φωνής και βίντεο. Φαίνεται ότι υπάρχει ανάγκη για βοήθεια στο θέμα της προώθησης του λογισμικού (μάρκετινγκ).

Ο Alexander Larsson παρουσίασε το νέο API για εκτυπώσεις σε GTK+. Υπήρξε συζήτηση για κάποιες επιλογές με το ενδεχόμενο να υπάρχουν άλλες επιλογές. Πάντως έγινε αναφορά ότι για τώρα δεν είναι εύκολη η αντιγραφή και επικόλληση του κειμένου μέσα από το νέο API.

Έπειτα, ο Federico έκανε το μεσημεριανό keynote με τίτλο How Much Faster? περιγράφοντας τις στρατηγικές βελτιστοποίησης του λογισμικού ώστε να μην υπάρχει παράξενα κολλήματα κατά τη χρήση (ζητήματα ροής από την παρουσίαση της Kathy). Υπάρχει ένα σημαντικό θέμα στην ανάλυση πακέτων λογισμικού όπως Evolution και Firefox για τη βελτιστοποίηση της χρήσης μνήμης και της διαδραστικότητάς τους.
O Glynn Foster παρουσίασε το πακέτο DTrace που επιτρέπει τον έλεγχο της λειτουργίας λογισμικού (χρειάζεται αλλαγές στον πυρήνα). Το DTrace είναι διαθέσιμο σε Solaris και FreeBSD. Είναι αρκετά καλό να το χρησιμοποιήσει κάποιος για την κατανόηση των προβλημάτων μνήμης/ταχύτητας των πακέτων ελεύθερου λογισμικού.

Την επόμενη μέρα, ο Lluis Sanchez παρουσίασε το MonoDevelop και τα νεώτερά του χαρακτηριστικά. Το MonoDevelop επιτρέπει την εύκολη δημιουργία εφαρμογών σε Mono αλλά και για άλλες γλώσσες.

Ο Jim Gettys παρουσίασε το έργο OLPC και αναφέρθηκε στις πληροφορίες που μπορεί να βρει κάποιος και από το www.laptop.org. Έβγαλα φωτογραφίες με τις διαφάνειες και θα τις βάλω κάπου σύντομα.

Ο Lluis Villa έκλεισε το συνέδριο GUADEC με μια πολύ δυνατή παρουσίαση. Ο Lluis ήταν bugmaster στο bugzilla.gnome.org και έχει προσφέρει αρκετά. Τώρα ξεκινά πτυχίο για δικηγόρος με αποτέλεσμα να είναι εκτός της σκηνής για τα επόμενα 4 χρόνια. Χρησιμοποίησε το στοιχείο αυτό για να αναφερθεί στο 2010 και σε τι πιστεύει να έχει γίνει μέχρι τότε. Το μήνυμά του ήταν ότι GNOME is about people.
Οι επόμενες δύο μέρες ήταν της μορφής After Hours workshop.

Υπήρξε μια συζήτηση για το OLPC από τον Jim Gettys. Έγινε αναφορά στην τοπικοποίηση και στα τυχόν προβλήματα καθώς και στο ζήτημα της ανάγκης hinting στις γραμματοσειρές.

Ακόμα, έγινε μια συζήτηση για το θέμα των γραμματοσειρών στη διανομή Fedora. Όπως είναι τώρα, όταν κάποιος εγκαταστήσει ελληνικά, έχει ένα αποτέλεσμα που μοιάζει με αυτό το χάλι. Ο λόγος για τον οποίο δεν έχει μπει άμεσα η γραμματοσειρά DejaVu στη διανομή Fedora είναι διότι η γραμματοσειρά αυτή περιλαμβάνει αραβικούς χαρακτήρες και μπορεί εν δυνάμει να δημιουργήσει πρόβλημα στους χρήστες από αραβικές χώρες. Ωστόσο, το ίδιο ζήτημα το έχουμε στα ελληνικά, και η πραγματική λύση είναι η επέκταση του υποσυστήματος fontconfig για να επιτρέπει τη μη-χρήση χαρακτήρων σε συγκεκριμένες γραμματοσειρές μέσω του αρχείου ρυθμίσεων /etc/fonts/fonts.conf

Ο Keith Package δήλωσε ότι θα δεχτεί επίρραμμα (patch) για την προσθήκη της νέας λειτουργίας, που θα απενεργοποιεί μια και καλή περιοχές χαρακτήρως σε συγκεκριμένες γραμματοσειρές. Κάτι τέτοιο είναι καλό για τα ελληνικά. Από την πλευρά του, οι Nicholas και Jay (sun.com) ετοίμασαν ένα επίρραμμα που υλοποιεί κάτι παραπλήσιο αλλά επιτρέπει εκείνους τους κακούς χαρακτήρες να είναι χρησιμοποιήσιμοι με απευθείας επιλογή. Κάτι τέτοιο ίσως είναι πιο θεμιτό διότι για π.χ. το κοινό που γράφει CJK και θέλουν τα ελληνικά που υπάρχουν στις γραμματοσειρές τους.

Ο Behdad από την πλευρά του δήλωσε ότι θα δεχτεί την DejaVu LGC. Τώρα είμαστε στο σημείο να κλείσει το ζήτημα με την επιλογή μιας ή και των δύο επιλογών.

Έκανα μια παρουσίαση για το θέμα της γραφής στο GNOME και συγκεκριμένα ότι είναι θεμιτό (desirable) να υπάρχει η δυνατότητα να μπορούν οι χρήστες να γράφουν ακόμα περισσότερους χαρακτήρες που υποστηρίζει το Unicode και οι γραμματοσειρές.

Η επιστροφή ήταν θεαματική. Προλάβαμε το αεροπλάνο με περιθώριο ~10 λεπτά. Το μέρος (venue) ήταν πολύ όμορφο και υπήρξε παραλία αρκετά κοντά…

Ένας από τους προσκεκλημένους ήταν από την Μογγολία. Του δώρισαν ένα βιβλίο για το Mono (εκείνο το μπλε βιβλίο) και έβαλε και τον Miguel να το υπογράψει :)
Το επόμενο Guadec θα γίνει στο Birmingham, στο H.B. Όσοι είστε στην Αγγλία αξίζει να πάτε.

2Jun/060

Keyboard updates in Xorg

There have been a few updates in Xorg regarding the multilingual keyboard support.

First, a new dead key has been added for Finish, dead_stroke. It appears that Cyrillic would find it useful as the available dead keys are too few to be reused in this case. The moral of the story is that if you want to add a dead_key, justify the necessity and it can be added.
Second, the Compose file nls/en_US.UTF-8/Compose.pre has been updated so that any Unicode keysyms have a value over 0×100000 (if keysym is Unicode keysym and had value < 0x100000, add 0x100000 to its current value). You will not see the change in the previous URL (which shows that CVS only); the updated Compose file is in git.

Third, there was an addition of the Braille input method which closed bug #6296. Braille is already available in the Unicode standard.

Thanks to Daniel Stone for going through these patches.

To get your daily fix on changes applied to Xorg, see the web-based interface to git.

Update (6Feb07): The new location of the compose file is http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=tree;f=nls

1May/060

How to write special characters in Xorg and GNOME

There is functionality in Xorg that allows type special characters, without having to switch to a specific keyboard layout. To enable,

  • Click System, Preferences, Keyboard.
  • Under Layout Options, expand on Compose key position.
  • Choose Right-Win key is compose, click Close.

Now you can type extended characters using the RightWin key (next to AltGr), according to this keyboard settings file. Specifically, the lines that start with GDK_Multi_key are those that we can use here. The Compose key is actually GDK_Multi_key in the above file.
Some examples,

  • RightWin + C + = produces
  • RightWin + = + C produces
  • RightWin + C + O produces ©
  • RightWin + O + C produces ©
  • RightWin + a + ‘ produces á
  • RightWin + a + ” produces ä
  • RightWin + a + ` produces à
  • RightWin + a + ~ produces ã
  • RightWin + a + * produces å
  • RightWin + a + ^ produces â
  • RightWin + a + > produces â
  • RightWin + a + , produces ą
  • RightWin + e + – produces ē
  • RightWin + S + 1 produces ¹
  • RightWin + S + 2 produces ²
  • RightWin + S + 3 produces ³

For more tips, see EasyLinux – Ubuntu Dapper.

25Feb/067

Δοκιμή της Fedora Core 5 test 3

The image “http://static.flickr.com/39/104237661_b907d87820_o.png” cannot be displayed, because it contains errors.

Η γραμματοσειρά είναι η DejaVu 2.3 (ελεύθερη). Αυτό είναι το ελληνικό GNOME 2.13.x, που από τις προσπάθειες του Κώστα Παπαδήμα το βασικό του κομμάτι είναι πλήρως μεταφρασμένο.
Μπορείτε να δείτε ότι με την προσθήκη της μικροεφαρμογής για τις Καιρικές Συνθήκες, επιλέγει αυτόματα την Αθήνα.

Ακόμα, λόγω της πρόσφατης αλλαγής στο ελληνικό locale της glibc, τώρα η ώρα στην Ελλάδα ακολουθεί τη μορφή του 12-ωρου ρολογίου (μπορείτε να το αλλάξετε από τις ρυθμίσεις στην μορφή 24-ώρες).

Η διανομή Fedora Core 5 παρέχει επιτάχυνση υλικού για την κάρτα γραφικών.

Η διανομή Fedora Core 5 βρίσκεται σε ανάπτυξη (test 3) πριν την έκδοση της νέας έκδοσης στα μέσα Μαρτίου. Δεν είμαι σίγουρος κατά πόσο θα μπουν ορισμένες αλλαγές για να είναι καλή η χρήση των ελληνικών από τη διανομή. Μόλις χτες έκανα την εγκατάσταση και δοκιμή. Όπως είναι τώρα, πρέπει να κάνετε εγκατάσταση την γραμματοσειρά dejavu και να την καθορίσετε στις ρυθμίσεις της επιφάνειας εργασίας. Ακόμα, φαίνεται ότι η Fedora δεν έχει τα πιο πρόσφατα αρχεία σχετικά με την υποστήριξη πληκτρολογίου (με αποτέλεσμα να χρειάζονται μερικές ρυθμίσεις με το χέρι ;-() και ένας από τους βασικούς προγραμματιστές του έργου δεν έχει πειστεί για αυτό. Πρέπει να διαπιστώσω αν έχω εγώ δίκιο ή ο προγραμματιστής. Όντως υπήρξε χτες βράδυ ένα ανανεωμένο πακέτο xorg-x11-xkbdata, ωστόσο πιστεύω ότι δε διόρθωσε το πρόβλημα.

14Feb/068

Greek layout code in Xorg

The current X.org source uses gr instead of el for the Greek layout.

The change took place 19 months ago, according to
http://cvs.freedesktop.org/xlibs/xkbdesc/symbols/gr?view=log
in an attempt to introduce consistency in the layout names.

There is currently a discussion at

Switch to our mobile site