NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

UTF-8 capable console for NetBSD (howto)



Hi,
some days ago I realize that mlterm-fb, although capable to work
with different character sets and sophisticated inputs methods, 
doesn't support typing of "plain" latin characters from charsets 
covered previously by, for example, iso-8859-2 on NetSBD console 
- even though wscons is capable to emit required sequences.

To make long story short: with my, somewhat crude, patch we
are able to use mlterm-fb as full-featured UTF-capable NetBSD
terminal, for all (probably) characters supported by wskbd,
without installing Xorg-related modules.

Steps:

1. Enable framebuffer console on your system. In my case it is
   available by default, intel-based one. In other cases  see 
   howto made by  Izumi Tsutsui and use VESA:
   https://gist.github.com/tsutsui/5689730

2. Unpack mlterm, patch sources using following diff, and build 
   with desired options - although '--with-gui=fb' is somewhat 
   required. ;)
   http://smutek.pl/netbsd/mlterm-wscons-keyboard.diff

   (keysyms, at least in Net, looks like a two-byte valid UTF-16,
    encoded entities - it makes things easier)

3. Create wscons map for your language - I already made one for
   Polish "programmer's" keyboard:
   http://smutek.pl/netbsd/ukbd.pl.utf-8

   Available keysyms are defined in /usr/include/dev/wscons/wsksymdef.h

   Put your map somewhere, for example into /usr/share/wscons/keymaps/,
   with appropriate name.

   Remember about mode-switch key (for my case it is a Alt_Gr) that
   should be also defined in your map:

   keycode 230 = Mode_switch Multi_key

4. Add following line to /etc/wscons.cfg (change filename to one,
   created by you):
   mapfile /usr/share/wscons/keymaps/ukbd.pl.utf-8

5. Run /etc/rc.d/wscons forcestart as root

6. As user run mlterm-fb from first terminal.


Thanks to:
 - Izumi Tsutsui for inspiration
 - Maxime Villard for NVMM, it helps me a lot


PS. I also made a keymap for USB keyboard and classic ISO-8859-2,
    it is available from: http://smutek.pl/netbsd/ukbd.pl.iso8859-2

Regards,
-- 
Piotr 'aniou' Meyer


Home | Main Index | Thread Index | Old Index