redesigning input-method launcher and management system
TRANSCRIPT
2015/12/06Redesigning Input-Method Launcher and Management System 1/27
Redesigning Input-Method Launcher and Management System
Fuminobu TAKEYAMA
openSUSE.Asia Summit 2015 Taipei, Taiwan
2015/12/06Redesigning Input-Method Launcher and Management System 2/27
About me
● Fuminobu TAKEYAMA (武山 文信)– openSUSE ID: ftake
● A package maintainer of openSUSE M17N– A community (weekend) developer– working for a company developing civil infrastructure,
storage devices, electric products, etc.● An organizer of Japan openSUSE user group
2015/12/06Redesigning Input-Method Launcher and Management System 3/27
Geeko Magazine Special Edition
● Publishing 2 issues / 1 year– for the Comic Market
● Technical articles on openSUSE● 500 JPY ≒ 130 TWD
2015/12/06Redesigning Input-Method Launcher and Management System 4/27
Input method
● A way to input various characters
aoi
あおい
青い
2015/12/06Redesigning Input-Method Launcher and Management System 5/27
openSUSE and input methods
● input methods are available just after installation– if $LANG is zh_TW, zh_HK, zh_CN, ja_JP, etc.
2015/12/06Redesigning Input-Method Launcher and Management System 6/27
How IM is started
~/.xim exists?
$INPUT_METHOD
select an input methodaccording to $LANG
start the IM
start an desktop environment
loginru
n ~/
.xim
No
Yes
not defined
Yes
=ibus, fcitx, gcin, ...
/etc/X11/ximwritten in 2004
2015/12/06Redesigning Input-Method Launcher and Management System 7/27
Problems
● No easy way to install and select input method to start● Do not follow desktop environments settings
– Hi-DPI display support– ibus-kimpanel
2015/12/06Redesigning Input-Method Launcher and Management System 8/27
No easy way to select IM
● A user lives under de_DE (Germany) andwants to input Japanese
http://nicovideo.jp/
wwwwwwwwww
うまそううまそうww
まじかよ…まじかよ…
2015/12/06Redesigning Input-Method Launcher and Management System 9/27
Which packages to install?
● If he wants to all the packages for Japanese, he can doby YaST → Software Management → Languages
2015/12/06Redesigning Input-Method Launcher and Management System 10/27
How can he install only the IM?
$ sudo zypper install mozcdon't work
$ sudo zypper install ibus-mozc
OK!
$ sudo zypper install input-method-japanese
ideal?
a Japanese conversion engine
2015/12/06Redesigning Input-Method Launcher and Management System 11/27
How can he select Japanese IM?
● Need to select which input method to be started● INPUT_METHOD to select IM manually
INPUT_METHOD=ibus
2015/12/06Redesigning Input-Method Launcher and Management System 12/27
Env. variable is not good idea
● Where is the right place to define INPUT_METHOD?
● Need a text editor for user-specific setting
/etc/sysconfig/language
/etc/profile.d/*.sh
~/.bashrc
~/.profile
~/.i18n
syst
em-w
ide
user
-spe
cific
Sysconfig Editor
2015/12/06Redesigning Input-Method Launcher and Management System 13/27
Timing problem
● The selected IM is started before desktop environment● No way to know at starting IM
– DPI (font-scale) settings– KIMPanel applet is placed on desktop
● Conflicts between Fcitx and GNOME– fixed the final version of 42.1
by delaying Fcitx
2015/12/06Redesigning Input-Method Launcher and Management System 14/27
We need
● A new IM launcher and its management tool that– allow to select input method to use in a easy way– support modern desktop environments avoiding the timing
problems
2015/12/06Redesigning Input-Method Launcher and Management System 15/27
2015/12/06Redesigning Input-Method Launcher and Management System 16/27
Chameleon TongueAn extensible input method launcher
https://github.com/ftake/chameleon-tongue
2015/12/06Redesigning Input-Method Launcher and Management System 17/27
A tongue of chameleon is extensible.The meanings of “tongue” are:
(1) 舌, (2) 語言 (language)
's tongue舌
2015/12/06Redesigning Input-Method Launcher and Management System 18/27
1-click install is available fromhttp://software.opensuse.org/package/chameleon-tongue
Warning: it is still experimentalDon't forget to stop the old launcher by “~/.xim”
2015/12/06Redesigning Input-Method Launcher and Management System 19/27
CUI tool
● If you want to use IBus/Fcitx
$ im-settings select ibus
$ im-settings select fcitx
2015/12/06Redesigning Input-Method Launcher and Management System 20/27
GUI front-end as a YaST moduleon going
2015/12/06Redesigning Input-Method Launcher and Management System 21/27
Options for IM launcher
● e.g. Use LibreOffice GNOME instead of LibreOffice KDE– for better IM support
$ im-settings config --set global.ooo_force_desktop true
$ im-settings config --set global.ooo_force_desktop false
2015/12/06Redesigning Input-Method Launcher and Management System 22/27
Idea: more interactive 1/2
● Show a message when new input method is installed
2015/12/06Redesigning Input-Method Launcher and Management System 23/27
Idea: more interactive 2/2
● Show IM setup dialog at the first log-in– Install packages if necessary
Input Method Wizard
Fcitx ▼
OK
Mozc ▼
Skip
2015/12/06Redesigning Input-Method Launcher and Management System 24/27
Technical mechanism
~/.config/input-method/profile
/etc/xdg/input-method/profile
select an input method according to $LANG
set GTK_IM_MODULE etc.
start an desktop environment
login
exists
exists
start the selected input method
symbolic link
by XDG autostart
two phases launch
No customization by env. var.
/usr/lib/input-method/profile.d/ibus
2015/12/06Redesigning Input-Method Launcher and Management System 25/27
No timing problems
● The second launch phase of Chameleon tongue is aware of settings from desktop environments– Its DPI setting is applied– It searches KIMPanel before starting IBus
2015/12/06Redesigning Input-Method Launcher and Management System 26/27
From another view point
● If there was a standard input method framework,we would not need applications like Chameleon Tongue
● Many input method frameworks– Fcitx– IBus– Gcin– Uim– SCIM– kinput2, IIMF, …
2015/12/06Redesigning Input-Method Launcher and Management System 27/27
Conclusion
● Chameleon Tongue is a new input method launcher– CUI and GUI tool– support modern desktop environments
● Please join discussion and development– [email protected]– https://www.github.com/ftake/chameleon-tongue