View Single Post
Posts: 111 | Thanked: 62 times | Joined on Apr 2012 @ Hong Kong
#170
Originally Posted by javispedro View Post


Here's a first release: http://depot.javispedro.com/nit/harm..._1.0_armel.deb. xmim should be installed in Harmattan, not inside Easy Debian.

Currently it is very hard to set up, so not for the faint of heart. It can be scripted up if it proves to be something that is worthwhile for the average chroot user.

You need two terminals; one inside Easy Debian and the other outside of it. Best to use SSH otherwise you'll end up tired of window switching and something will probably crash in the middle :P

1. After booting Easy Debian, you will first need to get the window ID of the _Xephyr_ window. This can be done from the terminal that is outside of Easy Debian. Just run xwininfo and tap once on Xephyr. xwininfo will print something like:
Code:
xwininfo: Window id: 0x4200002 "Xephyr on :1 ( ... )"
Here, 0x4200002 is the window id.

2. Now you need to start xmim (I hope you installed the above .deb by now!). Run:
Code:
xmimd -d :1 -x 0x4200002 -v
Replace 0x4200002 with the xephyr window id you got in the above step.

A detailed explanation: -d means the X11 display to use. So we point it to the Xephyr one (":1").
"-x WIN" means "xephyr mode". It will assume that the virtual keyboard is running on a different X Server, and that on THAT other X Server the window id for the Xephyr window is WIN.
Failure to get this option right will cause the virtual keyboard to never popup or to pop up "in the background"!

3. Now get into the terminal inside the chroot. You have to set a few environment variables:
Code:
export GTK_IM_MODULE=xim
export XMODIFIERS="@im=xmim"
4. You can now run any Easy Debian application from that terminal! For example, "oowriter".

As soon as you focus a text box, the virtual keyboard will popup! You can pop it down by "swiping it down", or by tapping outside the text field, as usual. If you unfocus the text box and focus it again the virtual keyboard will show again.

xmim should also print some stuff such as "XIM_OPEN", etc. Otherwise, communication between oowriter and xmim is broken.


There are also some added benefits for N950 users: sticky keys (Fn, Shift, etc) and the SYM key now work as they should, as well as long-pressing a key. The virtual keyboard will not pop up if the real keyboard is open.

Also, xmim can be used with forwarded _desktop_ X11 apps too! You just have to drop the -d and -x options to let it connect to the main X server in the N9/50.
Great! I used it with java and it works great.
However, Chinese character input become symbol(no Unicode support?), Swype copy & paste did not work.