Node:Running kort, Next:, Previous:Internal structure of kort program, Up:Top



Running kort

Most unix-like boxes nowadays are still configured to use non-UTF-8 locale by default. This is a major headache. Some distributions don't even have UTF-8 locales installed or generated. That sucks even more.

As described earlier, there is number of prequisites for being able to run kort. First is mysql. You'll need it even if you don't intend to save anything .. you can use kort to just implement user interface for some algorithm that you have implemented in tcl and that is very ok thing to do but current kort implementation still wants to have db connection even if nothing is done with the db connection. For setting up mysql and setting up there a new database schema please consult http://dev.mysql.com/doc/mysql/en/index.html and in there http://dev.mysql.com/doc/mysql/en/create-database.html for instructions. You'll need to create a database with name "kort" and in that database you'll need at least one user account that has at least some privileges (like privilege to connect).

When you can say

mysql -p kort
and you get a password prompt and can connect and get mysql> prompt you're ready to go check your locale. If unsure about creating needed schema objects you can do this:
$ cd /location/of/kort/distribution/kort
$ cat examples/*.txt | awk -f schemabuilder.awk > kortschema.sql
$ more kortschema.sql
$ mysql -p kort
Enter password:
mysql> \. kortschema.sql
mysql>^D
$
and you should have some tables set up. I added there more kortschema.sql because it just might be good idea to read what awk did just output. It should be plain sql. If you have already UTF-8 locale then you can run kort straight away. You can check that by saying
echo $LANG
and if you get something like fi_FI.UTF-8 or something else ending with UTF-8 you most likely have things set up in good manner. If your lang is just fi_FI or en_US or C then most likely have no UTF-8 locale.

Kort will complain if locale does not look like unicode locale. If you for some reason have unicode locale that kort does not recognice as one then please give feedback to author.

I'v successfully run kort regardless of my current locale with these steps that require that you have X windows and that you have UTF-8 locale generated.

$ export LANG=en_US.UTF-8
$ xterm -font '-*-*-*-*-*-*-16-*-*-*-*-*-iso10646-1' -lc -u8  &
(this will open a new window, continue there)
$ export LANG=en_US.UTF-8
$ export TERM=xterm-vt220
$ kort examples/simple_utf8.txt
and this should start kort with app definition file simple_utf8.txt from directory examples. $TERM is set to xterm-vt220 for function keys F1-F4 to work correctly.