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!
24Jul/082

Layout editor keyboard

This is a screenshot of the keyboard for the layout editor. The keyboard is a widget which is composed of individual widgets of each key.

I did not use glade-3 for the keyboard at this time. Although it is possible to create custom widgets in Python and install them in Glade, the current distributed packages are missing something, thus it would be messy when others try to use the editor. It’s a good experience to do all by hand anyway.

When creating a layout, you drag and drop characters on the keyboard. The editor shows a table with characters though it would be possible to drag characters from gucharmap as well.

The next step is to get an intuitive UI so that when you drop a character on a key, the key expands (a popup appears) showing the available four positions to receive the character.

3Jul/081

Keyboard layout editor UI concept

(click for bigger image)

At the top we select the keyboard layout file, the variant, and set the corresponding verbose name.

The keyboard layout editor shows a standard keyboard, where each keyboard key can show up to four levels. When you select a key, the bottor-left window shows the characters that have been set (here we use four levels). In this bottom-left window we can drag and drop characters (from Unicode blocks) and dead keys that are found from the right of the image. Dead keys are shown in red boxes.

The user is also able to include existing keyboard layout files in the current layout.

At this stage I am thinking how to easily draw the keyboard in a PyGTK application. It would be important not to draw it manually. It would be cool to have a GTK+ keyboard key widget, that you can specify the size, and the text that appears on it, then build a keyboard in Glade. Another option would be to have the basic keyboard as an SVG file (already exists), then draw over it with Cairo. I am inclined for the second option.

20Jun/084

Converting between XKB and XML

I completed the stage that takes keyboard layout files from XKB (X.Org) and converts them to XML documents, based on a keyboard layout Relax NG schema. Then, these XML documents can also be converted back to keyboard layout files.

Here is an imaginary example of a keyboard layout file.

// Keyboard layout for the Zzurope country (code: zz).
// Yeah.

partial alphanumeric_keys alternate_group hidden
xkb_symbols "bare" {
   key <AE01> { [        1, exclam,      onesuperior,  exclamdown      ] };
};

partial alphanumeric_keys alternate_group
xkb_symbols "basic" {
   name[Group1] = "ZZurope";

   include "zz(bare)"

   key <AD04> { [        r, R,           ediaeresis,   Ediaeresis      ] };
   key <AC07> { [        j, J,           idiaeresis,   Idiaeresis      ] };
   key <AB02> { [        x, X,           oe,           OE              ] };
   key <AB04> { [        v, V,           registered,   registered      ] };
};

partial alphanumeric_keys alternate_group
xkb_symbols "extended" {
    include "zz(basic)"
    name[Group1] = "ZZurope Extended";
    key.type = "THREE_LEVEL"; // We use three levels.
    override key <AD01> {   type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC",
[ U1C9, U1C8], [  any,   U1C7 ]   }; // q
    override key <AD02> {   [ U1CC, U1CB, any,U1CA ],
type[Group1] = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC" }; // w
    key <BKSP> {
        type[Group1]="CTRL+ALT",
        symbols[Group1]= [ BackSpace,   Terminate_Server ]
    };
    key <BKSR> { virtualMods = AltGr, [ 1, 2 ] };
    modifier_map Control { Control_L };
    modifier_map Mod5   { <LVL3>, <MDSW> };
    key <BKST> { [1, 2,3, 4] };
};

When converted to an XML document, it looks like

<?xml version="1.0" encoding="UTF-8"?>
<layout layoutname="zz">
  <symbols>
    <mapoption>hidden</mapoption>
    <mapoption>xkb_symbols</mapoption>
    <mapname>bare</mapname>
    <mapmaterial>
      <tokenkey override="False">
        <keycodename>AE01</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>1</symbol>
            <symbol>exclam</symbol>
            <symbol>onesuperior</symbol>
            <symbol>exclamdown</symbol>
          </symbolsgroup>
        </keysymgroup>
      </tokenkey>
    </mapmaterial>
  </symbols>
  <symbols>
    <mapoption>xkb_symbols</mapoption>
    <mapname>basic</mapname>
    <mapmaterial>
      <tokenname name="ZZurope"/>
      <tokeninclude>zz(bare)</tokeninclude>
      <tokenkey override="False">
        <keycodename>AD04</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>r</symbol>
            <symbol>R</symbol>
            <symbol>ediaeresis</symbol>
            <symbol>Ediaeresis</symbol>
          </symbolsgroup>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="False">
        <keycodename>AC07</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>j</symbol>
            <symbol>J</symbol>
            <symbol>idiaeresis</symbol>
            <symbol>Idiaeresis</symbol>
          </symbolsgroup>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="False">
        <keycodename>AB02</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>x</symbol>
            <symbol>X</symbol>
            <symbol>oe</symbol>
            <symbol>OE</symbol>
          </symbolsgroup>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="False">
        <keycodename>AB04</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>v</symbol>
            <symbol>V</symbol>
            <symbol>registered</symbol>
            <symbol>registered</symbol>
          </symbolsgroup>
        </keysymgroup>
      </tokenkey>
    </mapmaterial>
  </symbols>
  <symbols>
    <mapoption>xkb_symbols</mapoption>
    <mapname>extended</mapname>
    <mapmaterial>
      <tokenname name="ZZurope Extended"/>
      <tokeninclude>zz(basic)</tokeninclude>
      <tokentype>THREE_LEVEL</tokentype>
      <tokenmodifiermap state="Control">
        <keycode value="Control_L"/>
      </tokenmodifiermap>
      <tokenmodifiermap state="Mod5">
        <keycodex value="LVL3"/>
        <keycodex value="MDSW"/>
      </tokenmodifiermap>
      <tokenkey override="True">
        <keycodename>AD01</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>U1C9</symbol>
            <symbol>U1C8</symbol>
          </symbolsgroup>
          <symbolsgroup>
            <symbol>any</symbol>
            <symbol>U1C7</symbol>
          </symbolsgroup>
          <typegroup value="SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"/>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="True">
        <keycodename>AD02</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>U1CC</symbol>
            <symbol>U1CB</symbol>
            <symbol>any</symbol>
            <symbol>U1CA</symbol>
          </symbolsgroup>
          <typegroup value="SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"/>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="False">
        <keycodename>BKSP</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>BackSpace</symbol>
            <symbol>Terminate_Server</symbol>
          </symbolsgroup>
          <typegroup value="CTRL+ALT"/>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="False">
        <keycodename>BKSR</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>1</symbol>
            <symbol>2</symbol>
          </symbolsgroup>
          <tokenvirtualmodifiers value="AltGr"/>
        </keysymgroup>
      </tokenkey>
      <tokenkey override="False">
        <keycodename>BKST</keycodename>
        <keysymgroup>
          <symbolsgroup>
            <symbol>1</symbol>
            <symbol>2</symbol>
            <symbol>3</symbol>
            <symbol>4</symbol>
          </symbolsgroup>
        </keysymgroup>
      </tokenkey>
    </mapmaterial>
  </symbols>
</layout>

When we convert the XML document back to the XKB format, it looks like

hidden xkb_symbols "bare"
{
	key <AE01> { [ 1, exclam, onesuperior, exclamdown ] };
};

xkb_symbols "basic"
{
	name = "ZZurope";
	include "zz(bare)"
	key <AD04> { [ r, R, ediaeresis, Ediaeresis ] };
	key <AC07> { [ j, J, idiaeresis, Idiaeresis ] };
	key <AB02> { [ x, X, oe, OE ] };
	key <AB04> { [ v, V, registered, registered ] };
};

xkb_symbols "extended"
{
	name = "ZZurope Extended";
	include "zz(basic)"
	key.type = "THREE_LEVEL";
	modifier_map Control { Control_L };
	modifier_map Mod5 { <LVL3>, <MDSW> };
	override key <AD01> { [ U1C9, U1C8 ], [ any, U1C7 ], type = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"  };
	override key <AD02> { [ U1CC, U1CB, any, U1CA ], type = "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC"  };
	key <BKSP> { [ BackSpace, Terminate_Server ], type = "CTRL+ALT"  };
	key <BKSR> { [ 1, 2 ], virtualMods = AltGr  };
	key <BKST> { [ 1, 2, 3, 4 ] };
};

Some things are missing such as partial, alphanumeric_keys and alternate_group, which I discussed with Sergey and he said they should be ok to go away.

In addition, we simplify by keeping just Group1 (we do not specify it, as it is implied).

I performed the round-trip with all layout files, and all parsed and validated OK (there is some extra work with the level3 file remaining, though).

Some issues that are remaining, include

  • Figuring out how to use XLink to link to documents in the same folder (+providing a parameter; the name of the variant), and how to represent that in the Relax NG schema.
  • Sort the layout entries by keycode value.
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).

28May/083

Looking into the symbol files

In the previous post, we talked about the ANTLR grammar that parses the XKB layout files.

The grammar is available at http://code.google.com/p/keyboardlayouteditor/source/browse. I’ll rather push to the freedesktop repository once the project is completed. Now it’s too easy for me, just doing svn commit -m something.

Below you can see the relevant layout files for each country (and in some cases, language), and how the grammar deals with them. First column is filenames from the CVS XKB symbols subdirectory (to be moved eminently to GIT). Last’s week discussion with Sergey helped me figure out issues with the symbol files, simplify what information is needed, and what can be eliminated. Second column has Not OK if something is wrong. Third column tries to explain what was wrong.

ad
af
al
altwin
am
ara
az
ba
bd
be
bg
br
braille
bt
by
ca
capslock
cd
ch
cn
compose
ctrl
cz
de
dk
ee
epo
es
et
eurosign
fi
fo
fr
gb NOK Non-UTF8
ge
gh
gn
gr
group NOK virtualMods= AltGr
hr
hu NOK Non-UTF8
ie
il NOK key.type=”FOUR_LEVEL” (typically: key.type[something]=….)
in NOK key.type=”FOUR_LEVEL” (typically: key.type[something]=….)
inet
iq
ir
is
it
jp NOK key <BKSP> {
type=”",   // empty?
symbols[Group1]= [ bracketright, braceright ]
};
keypad NOK overlay1=<KO7> }; // what’s “overlay”?
kg
kh
kpdl
kr
kz
la
latam
latin
level3 NOK virtual_modifiers LAlt, AlGr; virtualMods= Lalt
level5
lk
lt
lv
ma
mao
me
mk
mm
mn
mt
mv
nbsp NOK Non-UTF8
ng
nl
no
np
olpc
pc NOK key <AA00> { type=”SOMETHING” } instead of { type[Group1]=”SOMETHING” }
pk
pl
pt
ro
rs
ru
se
shift NOK actions [Group1] = [
si
sk
srvr_ctrl NOK key <AA00> { type=”SOMETHING” } instead of { type[Group1]=”SOMETHING” }
sy
th
tj
tr
ua

Non-UTF-8 are the files that have characters that are not UTF-8 (are iso-8859-1).

Some layouts have key.type = “something” and others key.type[SomeGroup] = “something”. Apparently, the format allows to infer which is the group that the type acts upon? That’s weird. Would it be better to put the group information? Is it required that the group is not set?

Some files have virtualMods, which I do not know what it is. Is it used?

17May/080

Parsing XKB files with antlr

antlr (well, antlr3) is an amazing tool that replaces lex/flex, yacc/bison.

One would use antlr3 if they want to deal with Domain-Specific Languages (DSL), an example of which are the text configuration files.

In our case, we use antlr3 to parse some of the XKB configuration files, those found in /etc/X11/xkb/symbols/??.

Our aim is to be able to easily read and write those configuration files. Of course, once we have them read, we do all sorts of processing.

The stable version of antlr3 is 3.0.1, which happened to give lots of internal errors. It has not been very useful, so I tried a few times the latest beta version 3.1b, and eventually managed to get it to work. If I am not mistaken, 3.1 stable should be announced in a few days.

When using antlr, you have the choice of several target languages, such as Java, C, C++ and Python. I am using the Python target, and the latest version that is available from the antlr3 repository.

Here is the tree of the gb layout file,

tree = (SECTION (MAPTYPE (MAPOPTIONS partial default alphanumeric_keys xkb_symbols) (MAPNAME “basic”)) (MAPMATERIAL (TOKEN_INCLUDE “latin”) (TOKEN_NAME Group1 (VALUE “United Kingdom”)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 quotedbl twosuperior oneeighth)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior sterling)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign onequarter)) (TOKEN_KEY (KEYCODEX AC11) (KEYSYMS apostrophe at dead_circumflex dead_caron)) (TOKEN_KEY (KEYCODEX TLDE) (KEYSYMS grave notsign bar bar)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign asciitilde dead_grave dead_breve)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar bar brokenbar)) (TOKEN_INCLUDE “level3(ralt_switch_multikey)”))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME “intl”)) (MAPMATERIAL (TOKEN_INCLUDE “latin”) (TOKEN_NAME Group1 (VALUE “United Kingdom – International (with dead keys)”)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 dead_diaeresis twosuperior onehalf)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior onethird)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign onequarter)) (TOKEN_KEY (KEYCODEX AE06) (KEYSYMS 6 dead_circumflex NoSymbol onesixth)) (TOKEN_KEY (KEYCODEX AC11) (KEYSYMS dead_acute at apostrophe bar)) (TOKEN_KEY (KEYCODEX TLDE) (KEYSYMS dead_grave notsign bar bar)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign dead_tilde bar bar)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar bar bar)) (TOKEN_INCLUDE “level3(ralt_switch)”))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME “dvorak”)) (MAPMATERIAL (TOKEN_INCLUDE “us(dvorak)”) (TOKEN_NAME Group1 (VALUE “United Kingdom – Dvorak”)) (TOKEN_KEY (KEYCODEX BKSL) (KEYSYMS numbersign asciitilde)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 quotedbl twosuperior NoSymbol)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling threesuperior NoSymbol)) (TOKEN_KEY (KEYCODEX AE04) (KEYSYMS 4 dollar EuroSign NoSymbol)) (TOKEN_KEY (KEYCODEX LSGT) (KEYSYMS backslash bar)) (TOKEN_KEY (KEYCODEX AD01) (KEYSYMS apostrophe at)))) (SECTION (MAPTYPE (MAPOPTIONS partial alphanumeric_keys xkb_symbols) (MAPNAME “mac”)) (MAPMATERIAL (TOKEN_INCLUDE “latin”) (TOKEN_NAME Group1 (VALUE “United Kingdom – Macintosh”)) (TOKEN_KEY (KEYCODEX AE02) (KEYSYMS 2 at EuroSign)) (TOKEN_KEY (KEYCODEX AE03) (KEYSYMS 3 sterling numbersign)) (TOKEN_INCLUDE “level3(ralt_switch)”)))

When traversing the tree, we can then pretty-print the layout at wish:

partial default alphanumeric_keys xkb_symbols “basic” {
name[Group1] = “United Kingdom”;
include “latin”
include “level3(ralt_switch_multikey)”
key <AE02> = { [ 2 , quotedbl , twosuperior , oneeighth ] };
key <AE03> = { [ 3 , sterling , threesuperior , sterling ] };
key <AE04> = { [ 4 , dollar , EuroSign , onequarter ] };
key <AC11> = { [ apostrophe , at , dead_circumflex , dead_caron ] };
key <TLDE> = { [ grave , notsign , bar , bar ] };
key <BKSL> = { [ numbersign , asciitilde , dead_grave , dead_breve ] };
key <LSGT> = { [ backslash , bar , bar , brokenbar ] };
};
… snip …

The code is currently hosted at code.google.com (keyboardlayouteditor) and I intend to move it shortly to FDO.

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) οθόνης. Δεν κατάφερα να βρω τρόπο για να κάνω το ίδιο πράγμα χωρίς να μπω σε τερματικό.

30Apr/080

Keyboard Layout Editor GSOC project

I got accepted for a GSOC project with the X.Org Foundation. My mentor is Sergey Udaltsov and I look forward working with him.

The project is about creating a Keyboard Layout Editor, that can be used to edit XKB files with a nice GUI.

I will be blogging about these from here (fdo category at this blog).

8Aug/0760

Cannot write Greek Polytonic in Linux

For up to date instructions for Greek and Greek Polytonic see How to type Greek, Greek Polytonic in Linux.

The following text is kept for historical purposes. Greek and Greek Polytonic now works in Linux, using the default Greek layout.

General Update: If you have Ubuntu 8.10, Fedora 10 or a similarly new distribution, then Greek Polytonic works out-of-the-box. Simply select the Greek Polytonic layout. For more information, see the recent Greek Polytonic post.

Update 3rd May 2008: If you have Ubuntu 8.04 (probably applies to other recent Linux distributions as well), you simply need to add GTK_IM_MODULE=xim to /etc/environment. Start a Terminal (Applications/Accessories/Terminal) and type the commands (the first command makes a backup copy of the configuration file, and the second opens the configuration file with administrative priviliges, so that you can edit and save):

$ gksudo cp /etc/environment /etc/environment.ORIGINAL
$ gksudo gedit /etc/environment

then append

GTK_IM_MODULE=xim

save, and restart your computer. It should work now. Try to test with the standard Text editor, found in Accessories.

In Ubuntu 8.10 (autumn 2008), it should work out of the box, just by enabling the Greek Polytonic layout.

Update 20th June 2008: If still some accents/breathings/aspirations do not work, then this is probably related to your system locale (whether it is Greek or not). It works better when it is Greek. If you are affected and you do not use the Greek locale, there is one more thing to do.

$ gksudo cp /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/en_US.UTF-8/Compose.ORIGINAL
$ gksudo cp /usr/share/X11/locale/el_GR.UTF-8/Compose /usr/share/X11/locale/en_US.UTF-8/Compose

The first command makes a backup copy of your original en_US Compose file (assuming you run an English locale; if in doubt, read /usr/share/X11/locale/locale.dir). The second command copies the Greek compose file over the English one. You then logout and login again.

End of updates

To write Greek Polytonic in Linux, a special file is used, which is called the compose file. There is a bit of complication here in the sense that the compose file depends on the current system locale.

To find out which compose file is active on your system, have a look at

/usr/share/X11/locale/compose.dir

Let’s assume your system locale is en_US.UTF-8 (Start Applications/Accessories/Terminal and type locale).

In the compose.dir file it says

en_US.UTF-8/Compose: en_US.UTF-8

Note that the locale is the second field. If you have a different system locale, match on the second field. Many people make a mistake here. Actually, I think be faster for the system to locate the entry if the compose.dir file was sorted by locale.

Therefore, the compose file is

/usr/share/X11/locale/en_US.UTF-8/Compose

So, what’s the problem then?

Well, for the Greek locale (el_GR.UTF-8) we have a different compose file, a compose file in which Greek Polytonic actually works ;-) .

Therefore, there are numerous workarounds here to get Greek Polytonic working.

For example,

  • If you speak modern Greek, you can install the Greek locale.
  • You can edit /usr/share/X11/locale/compose.dir so that for your locale, the compose file is the Greek one, /usr/share/X11/locale/el_GR.UTF-8/Compose.
  • You can edit the Greek compose file, take the Greek Polytonic section and update the Greek Polytonic section of en_US.UTF-8/Compose.
  • You can copy the Greek compose file in your home directory under the name .XCompose. I did not try this one, and also you may be affected by this bug. (not tested)

Of course the proper solution is to update en_US.UTF-8/Compose with the updated Greek Polytonic compose sequences. There is a tendency to add the compose sequences of all languages to en_US.UTF-8/Compose, and this actually is happening now. In this respect, it would make sense to rename en_US.UTF-8/Compose into something like general/Compose.

16Jul/070

GUADEC Day #1

I am writing this in the morning of the second day (posted at the end of the second day). Just had breakfast and there is a bit of time before making it to the conference venue.

Yesterday Sunday, was the first of the two days of warm-up for the GUADEC conference. At 11am the registration started. I was in front of the queue and got my badge quickly, then picked up the bag with the goodies; three cool t-shirts, a copy of Ubuntu 7.04, Fedora 7 Live, Linux stickers, two Linux pens, a mini Google Code notebook (no, that’s an actual notebook (not that type of notebook, it was just the paper-based thing)).

During registration I met up with Dimitrios Glezos (of Greek Fedora fame) and a bit later with Dimitrios Typaldos. It was the first time I met both of them in person.

Between a choice of two sessions I went to the one on X.org developments (XDamage, xrender, etc extensions and how to use them). Ryan Lortie gave the presentation.

Next was lunch time, and Dimitrios T. recommended a pub for traditional English food and drink. Sayamindu came along.

The next session I went to was the Hildon desktop, which is what we used to call Maemo; GNOME for internet tables such as the Nokia 770 and Nokia 800. There are special technical issues to solve. Lucas Rocha mentioned refactoring issues with the source code. In addition, as far as I understood, there is an issue with the internationalisation support for the platform.

Next, Don Scorgie talked about the GNOME documentation project. Several things can be improved and one of them is the introduction of a simplified XML schema for the needs of GNOME documentation. When compared to DocBook XML, the new GNOME documentation schema has only 6 elements (or do they call them tags?). In addition to this, there is a documentation editor with a special rich-edit widget for this schema. Mallard is a type of duck(?).

I also attended the last 10 minutes of the presentation on project Jackfield (sadly no special significance between Jackfield and what the project is about). Jackfield is apparently a way to run Javascript scripts on the desktop. OS/X is supposed to have it, and there are already scripts available. With Jackfield, you can run those scripts unmodified on Linux. The demos where really impressive.

The final session for the day was a presentation by Richard Rothwell on free software for the socially excluded. No, you do not have to go to Africa for this. His work relates to families in Nottingham, UK. It reminds me the situation and effort in Farkadona, Greece, that was described by Kostas Boukouvalas. I think it would have been helpful if Kostas Boukouvalas could have attended this. Richard is running a 3-year project that provides a number of PCs (in the hundreds?) with Linux to socially excluded families. Even in the UK, funding is hard to come by.

5Apr/070

Re: 11 Things You Haven’t Seen Yet in Ubuntu Feisty Fawn

Άρθρο του John Reese για τις βελτιώσεις του Ubuntu.

Από τα πιο σημαντικά:

1. Θα δουλεύει το 3D όπως είναι διαθέσιμο από τη διανομή Fedora Core 6. Δηλαδή θα είναι μια επιλογή στις Προτιμήσεις με το όνομα Desktop Effects. Ελπίζω να το μεταφράσαμε :)
Αν έχετε κάρτα γραφικών Intel, τότε το 3D desktop θα δουλεύει άμεσα, δίχως ανάγκη εγκατάστασης άλλου λογισμικού.
Το 3D desktop δεν βασίζεται στο Beryl αλλά στο Compiz, window managers. Ποιο είναι πιο καλό; Το Compiz φαίνεται να είναι αυτό που έχει όλο τον αρχικό κώδικα ενώ το Beryl έχει κάνει τρομερή δουλειά στο marketing και στις μικρορυθμίσεις/plugins. Σε κάθε περίπτωση τα δύο έργα ανακοίνωσαν ότι θα συγχωνευτούν και φαίνεται να οδεύουν στην κατεύθυνση αυτή.

2. Οι ρυθμίσεις δικτύου θα δουλεύουν καλύτερα και με αυτοματοποιημένο τρόπο, με χρήση του NetworkManager. Υπήρξαν κάποιες συζητήσεις για προβλήματα με το NetworkManager, ελπίζω να λυθούν σύντομα.

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

Switch to our mobile site