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

Re: Two questions about console utf8 support



On Sat, Dec 15, 2001 at 12:52:30AM +0330, Behdad Esfahbod wrote:
> Console utf-8 mode is the only one specific to each tty, the others 
> (font, keymap, keyboard mode) are not set for all ttys, then the only 
> thing you need to set for each one is just ESC%G, you can also put one 
> in your command prompt (in /etc/bashrc, /etc/csh.cshrc, ...), because 
> applications may alter console mode.

Well, I do know that with framebuffer the font at least does have to
be set for each tty, and doing it once doesn't work. That's why I
mentioned that I was using the framebuffer. I believe this is not true
for keymap at least. What would probably be the best thing for me to do
is put the following in my ~/.bash_profile or in /etc/profile:

if [ test to see if I'm on the console ]; then
  unicode_start
fi

And something in the equivalent logout file to undo it. Can anyone
suggest the most appropriate test, and also the proper way to deal with
incoming ssh connections, which I make quite frequently?

> > It might also be nice to get unicode going on from early in the bootup
> > process. Should I put something in the rcS.d directory that sets
> > everything up unicodely (kbd_mode -u plus ESC%G) ? I wonder if that
> > would work on all my consoles, or if I'd have to wrap getty as above. I
> > could also just put something in the /etc/profile, which would satisfy
> > me since I don't use tcsh..
> 
> It's just there, /etc/rc.d/init.d/keytable does these: loads the 
> keyboard map, calls /sbin/setsysfont to load the fonts, then you just 
> need to set keyboard in unicode mode there. Also maybe all keyboard 
> material should go in something like /sbin/setsyskeyb, to allow one to 
> run it to get system's default keyboard.

Nope. You're thinking Red Hat, not Debian. /etc/init.d/keymap.sh sets
the keymap, and /etc/init.d/console-screen.sh sets the font. I don't
want to modify the system-provided scripts, so that upgrades of the
package that provides those files won't force me to merge the
differences by hand, when it's not strictly necessary. Therefore I can
add my own init.d script. Also, /sbin is for Debian to manage - I would
put local scripts of that nature in /usr/local/sbin (or I might package
them as Debian packages ... not so unlikely actually).

- Jimmy Kaplowitz
jimmy@xxxxxxxxxxxxx / jim@xxxxxxxx
--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/