HomeHome ArchiveArchive

Typing czech characters



  • how can I type czech characters, in particular characters with a tick on them, such as f.ex. ‘š’

Update (2012-12-03):

The previous solution stopped working with Gnome3. New solution: add the following to your \~/.xinitrc:

setxkbmap -layout "ch, cz" -option "grp:lwin_switch"

Solution (in Gnome):

  • add a czech keyboard layout through: System->Settings->Keyboard->Layouots->Add
  • then add a key to switch between the layouts: Layout Options->Layout Switching
  • I chose “Left Win-key switches layout while pressed”

That way, while typing away, I can press the left Win-key, which temporarily switches to the czech keyboard layout, plus the Shift key and the carret (‘\^’) key, thus accessing the czech ‘?’ sigil. When I now press any of the keys ‘s’, ‘z’, ‘c’ etc. X will combine the czech ‘?’ sigil with the corresponding character and produce f.ex. a ‘?’.

Many, many, many kudos to all the people who put up designing and implementing this elegant solution to a non-trivial problem. You deserve my deepest respect!



  • wie kann ich tschechische Zeichen, insbesondere Zeichen mit dem tschechischen Häkchen ‘?’ eintippen?

Update (2012-12-03):

Die ursprüngliche Lösung funktioniert mit Gnome3 nicht mehr. Neue Lösung: das Folgende zu \~/.xinitrc hinzufügen:

setxkbmap -layout "ch, cz" -option "grp:lwin_switch"

Lösung (in Gnome):

  • füge die tschechische Tastaturbelegung hinzu: System->Einstellungen->Tastatur->Belegungen->Hinzufügen
  • belege sodann eine Taste als Umschalter zwischen den Tastaturbelegungen: Belegungseinstellungen->Layout Switching
  • ich hab “Left Win-key switches layout while pressed” gewählt

Dadurch kann ich, während ich am Tippen bin, die linke Win-Taste drücken - welche temporär auf die tschechische Tastaturbelegung umschaltet - dann gleichzeitig die Umschaltetaste (Shift) und das Dächlein ‘\^’, wodurch ich das Häkchen auswähle. Wenn ich nun einen der Buchstaben ‘s’, ‘z’, ‘c’ etc. tippe, wird X diese mit dem Häkchen kombinieren, z.B. zu einem ‘?’.

Vielen, vielen, vielen dank an all die Leute, welche für dieses nicht triviale Problem eine so elegante Lösung gefunden und Implementiert haben. Mein tiefster Respekt gebührt Euch!



  • Jak zadat česká písmenka, hlavně ty z háčkem?

Update (2012-12-03):

Púvodní řešení nefunguje pod Gnome3. Nové řešení: přidat tohle k \~/.xinitrc :

setxkbmap -layout "ch, cz" -option "grp:lwin_switch"

Řešení (v Gnome):

  • přidej české rozvržení klávesnice: System->Settings->Keyboard->Layouts->Add
  • vyber klávesu na přepínání mezi rozvrženíma: Layout Options->Layout Switching
  • já jsem vybral “Left Win-key switches layout while pressed”

Takto múzu, pŕi psaní, zmáčknout levou Win-klávesu - která dočasně přepojí na české rozvržení klávesnice - k tomu přepínací klávesu (Shift) a stříšku ‘\^’, čím vyberu háček a když teď zmáčknu ‘s’, ‘z’, ‘c’ atd., tak my to X zkombinuje k písmenku z háčkem, tedy například k ‘č’.

Moc, moc, moc bych chtěl poděkovat všem, co na takový ne-triviální problém našli a implementovali tak elegantní řešení. Zasluhujete můj nejhlubší respekt!

– Tomáš Pospíšek

PS: Many thanks to the very helpful and knowledgeable people on the #xfce channel

gem doesn’t know about Debian

There’s some interesting piece of software that I want to experiment with. It includes an example Rails application. Nice:

# apt-get install rails
$ cd interesting-example-rails-app
$ ./script/server
Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Uhm, well, why?

$ dpkg -s rails | grep Version
Version: 2.0.2-1ubuntu1

Executing the app with the debugger:

$ ruby -rdebug script/server

actually tells me what’s wrong. config/boot.rb checks whether it should run the Rails version that shipped with the Rails app, that is, by convention, put under vendor/rails.

By default, Debian’s own rails command (wrapper) will symlink everything needed, including vendor/rails to it’s own, packaged Ruby libraries/applications:

ls -l vendor/
insgesamt 0
lrwxrwxrwx 1 joe joe 29 2008-09-16 20:50 actionmailer -> /usr/share/rails/actionmailer
lrwxrwxrwx 1 joe joe 27 2008-09-16 20:50 actionpack -> /usr/share/rails/actionpack
lrwxrwxrwx 1 joe joe 28 2008-09-16 20:50 active_ldap -> /usr/share/rails/active_ldap
lrwxrwxrwx 1 joe joe 28 2008-09-16 20:50 activemodel -> /usr/share/rails/activemodel
lrwxrwxrwx 1 joe joe 29 2008-09-16 20:50 activerecord -> /usr/share/rails/activerecord
lrwxrwxrwx 1 joe joe 31 2008-09-16 20:50 activeresource -> /usr/share/rails/activeresource
lrwxrwxrwx 1 joe joe 30 2008-09-16 20:50 activesupport -> /usr/share/rails/activesupport
lrwxrwxrwx 1 joe joe 16 2008-09-16 20:50 rails -> /usr/share/rails
lrwxrwxrwx 1 joe joe 25 2008-09-16 20:50 railties -> /usr/share/rails/railties

and thus, a Debian rails generated application will allways use Debian’s own versions of Rails and the Active* libraries.

Thus, following Debian’s lead we can “debianize” any downloaded Rails app, by inserting the same set of links into vendor/. Mission accomplished. You can use this script to do this automatically for you.

That however won’t answer the question, why the downloaded Rails app won’t find Debian’s own Rails installation. I’m guessing, the problem is, that gem, here Debian’s gem, doesn’t know anything about Debian’s own Ruby libraries… feels a bit like two parties not wanting to speak to each other. Somewhat surprising, since software is suposed to be .. soft … and flexible…

Debian’s stance on the problem
Inclusion of this explanation into Debian

(all of this of course also applies to Ubuntu and all the other derivatives AFAIK)

improved mybackup

Here’s an improved version of mybackup, a MySql database backup tool. The changes against 0.9.5c are:


  • option to exclude databases
  • by default exclude MySql’s information_schema metainfo DB
  • access TABLE STATUS rows by name instead of position
  • use the standard ‘-‘ for STDOUT instead of ‘BLANK’ which wouldn’t work
  • open log file before writing any output

Tomas Pospisek, tpo at sourcepole.ch

ical to timeline

Allthough this being a hack to scratch my itch named KDE Bug 34682, it took me about 11h all the same. Find a ruby programm attached that dumps a timeline.

This is fork ware. It does what I want but if you need to tune it to your needs then fork it, send me a note and link back to this page, Thanks.

Tomas Pospisek, tpo_deb at sourcepole.ch