redesigning input-method launcher and management system

27
2015/12/06 Redesigning Input-Method Launcher and Management System 1/27 Redesigning Input-Method Launcher and Management System Fuminobu TAKEYAMA openSUSE.Asia Summit 2015 Taipei, Taiwan

Upload: fuminobu-takeyama

Post on 16-Apr-2017

341 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Redesigning Input-Method Launcher and Management System

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

Page 2: Redesigning Input-Method Launcher and Management System

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

Page 3: Redesigning Input-Method Launcher and Management System

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

Page 4: Redesigning Input-Method Launcher and Management System

2015/12/06Redesigning Input-Method Launcher and Management System 4/27

Input method

● A way to input various characters

aoi

あおい

青い

Page 5: Redesigning Input-Method Launcher and Management System

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.

Page 6: Redesigning Input-Method Launcher and Management System

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

Page 7: Redesigning Input-Method Launcher and Management System

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

Page 8: Redesigning Input-Method Launcher and Management System

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

まじかよ…まじかよ…

Page 9: Redesigning Input-Method Launcher and Management System

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

Page 10: Redesigning Input-Method Launcher and Management System

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

Page 11: Redesigning Input-Method Launcher and Management System

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

Page 12: Redesigning Input-Method Launcher and Management System

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

Page 13: Redesigning Input-Method Launcher and Management System

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

Page 14: Redesigning Input-Method Launcher and Management System

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

Page 15: Redesigning Input-Method Launcher and Management System

2015/12/06Redesigning Input-Method Launcher and Management System 15/27

Page 16: Redesigning Input-Method Launcher and Management System

2015/12/06Redesigning Input-Method Launcher and Management System 16/27

Chameleon TongueAn extensible input method launcher

https://github.com/ftake/chameleon-tongue

Page 17: Redesigning Input-Method Launcher and Management System

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舌

Page 18: Redesigning Input-Method Launcher and Management System

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”

Page 19: Redesigning Input-Method Launcher and Management System

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

Page 20: Redesigning Input-Method Launcher and Management System

2015/12/06Redesigning Input-Method Launcher and Management System 20/27

GUI front-end as a YaST moduleon going

Page 21: Redesigning Input-Method Launcher and Management System

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

Page 22: Redesigning Input-Method Launcher and Management System

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

Page 23: Redesigning Input-Method Launcher and Management System

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

Page 24: Redesigning Input-Method Launcher and Management System

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

Page 25: Redesigning Input-Method Launcher and Management System

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

Page 26: Redesigning Input-Method Launcher and Management System

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, …

Page 27: Redesigning Input-Method Launcher and Management System

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