Abiword-2.0 and x-unikey (for vietnamese)

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Abiword-2.0 and x-unikey (for vietnamese)

#1 Post by MU »

Screenshot:
Image

phantrongnghia reported, that the solution witk the Gtk2-input-modules is not so good for vietnamese input.

And that Puppys Abiword (2.4) does not support the better x-unikey.
So I recompiled Abiword 2.0 and x-unikey.

This is for vietnamese only, for cyrillic use the Gtk2-modules instead!

Download:
http://dotpups.de/dotpups/Office/Abiwor ... nd-unikey/

Abiword 2.0 installs to
/usr/local/abiword-2.0 , so you still keep Puppys Abiword.
It is 15 MB, as it includes several plugins, and all locale-files (translations).
If you want to use it for an ISO like hacao-linux, you can delete all locale-files except vietnamese to reduce the size.

You can start it from the Dotpups-menu, or by typing "abiword20".
The unikey-Dotpup has no localefiles, it seems to work without them.
Correct me, if I am wrong.

To use vietnamese Abiword:
1.) If you want vietnamese menus, set your locale to
export LANG=vi_VN
You can add that to the script /usr/local/Abiword-2.0/abiword2.0 , but it would be better to add it to /etc/profile
You might have to copy /usr/lib/locale/vi_VN from Hacao-linux.

2.) Start unikey from the Dotpupsmenu.
Click on it, until you see "TX: UTF8"

In Abiword, choose with a right-click
input methods
Vietnamese Input Method (unikey)

Use a font that can display UTF-8, like DejaVu ( http://www.murga.org/~puppy/viewtopic.php?t=8417 )

Mark
Last edited by MU on Wed 07 Jun 2006, 14:59, edited 4 times in total.

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#2 Post by phantrongnghia »

How to make default input is Vietnamese Input Method (unikey)
?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#3 Post by MU »

I don't know that :oops:
Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#4 Post by phantrongnghia »

Will you ask Hacao?
He made vietnamese typing in abiword 2.4!
Thanks

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

Hacao is reading here, too.
He certainly will help us, if he knows a solution. :)

Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

found it in the documentation.

Add this line to /etc/profile:

export GTK_IM_MODULE=unikey

If you want it only in abiword20, add that line to
/usr/local/Abiword-2.0/abiword2.0

Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#7 Post by phantrongnghia »

Abiword not run when i ran in dotpups and console!

Code: Select all

(abiword20:3609): Gtk-CRITICAL **: gtk_box_set_child_packing: assertion `GTK_IS_WIDGET (child)' failed

(abiword20:3609): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

(abiword20:3609): Gtk-CRITICAL **: gtk_widget_queue_resize: assertion `GTK_IS_WIDGET (widget)' failed

(abiword20:3609): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'

(abiword20:3609): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(abiword20:3609): GLib-GObject-CRITICAL **: g_object_notify: assertion `G_IS_OBJECT (object)' failed

(abiword20:3609): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(abiword20:3609): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed

(abiword20:3609): Gtk-CRITICAL **: gtk_box_set_child_packing: assertion `GTK_IS_WIDGET (child)' failed

(abiword20:3609): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

(abiword20:3609): Gtk-CRITICAL **: gtk_widget_queue_resize: assertion `GTK_IS_WIDGET (widget)' failed

(abiword20:3609): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'

(abiword20:3609): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(abiword20:3609): GLib-GObject-CRITICAL **: g_object_notify: assertion `G_IS_OBJECT (object)' failed

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

I updated x-unikey.pup with "ldconfig" and "gtk-query-immodules-2.0".
These are usually just in the developper-addon, but needed by my startscript.

---------------------------
phantrongnghia:
It looks like you installed something, that broke your Gtk-installation.
I tried it now with a complete new Puppy2, and it works fine :roll:
You can try the new x-unikey dotpup, but I think it will not help with your problem.

What Puppy do you use at moment? 108? 109CE? 2?

Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#9 Post by phantrongnghia »

I use puppy 2
I am wrong ,sorry
When I restart computer,abiword run
thanks

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

fine :P

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#11 Post by phantrongnghia »

I am very tired because when I start Abiword,I always choose input method is unikey
But I am very happy because I can typing vietnamese in my own puppy os!
Thanks

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#12 Post by phantrongnghia »

Ah!I explored a news in vietnamese puppy of hacao
He set defaults input method for all appication is X-input method
I guess he replaced x-input method by unikey!
And all appication can type vietnames,however I choose input method is unikey or
X-input method

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#13 Post by MU »

yes, this is what I wrote above:
http://www.murga.org/~puppy/viewtopic.php?p=52745#52745

Works good, if you do that, every Gtk-application uses unikey as default input method.
Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#14 Post by phantrongnghia »

It not set defaults is unikey!
Here is my etc/profile

Code: Select all

PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/root/my-applications/bin"
exec `set -o vi`
ulimit -c 0
if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
 umask 002
else
 umask 022
fi
USER=`id -un`
PS1="# "
LOGNAME=$USER
HISTSIZE=1000
HISTFILE="$HOME/.history"
EDITOR=mp
INPUTRC=/etc/inputrc
TERM=linux
# used by XRN, change to your news server...
# NNTPSERVER="news.dodo.com.au"
# GS_FONTPATH="/usr/X11R6/lib/X11/fonts/Type1"
export PS1 USER LOGNAME HISTSIZE INPUTRC EDITOR TERM
XFINANSDIR="/root/.xfinans"
export XFINANSDIR
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
# MOZ_PLUGIN_PATH="/root/plugins"
export MOZILLA_FIVE_HOME #MOZ_PLUGIN_PATH
KDEDIR="/usr/local/kde"
export KDEDIR

LD_LIBRARY_PATH="/lib:/usr/lib:/usr/X11R6/lib:/root/my-applications/lib"

if [ -e /usr/lib/mozilla ];then
 LD_LIBRARY_PATH="/usr/lib/mozilla:$LD_LIBRARY_PATH"
fi

if [ -e /usr/lib/qt ];then #do not use -d as qt may be link?
 QTDIR=/usr/lib/qt
 export QTDIR
 PATH=$QTDIR/bin:$PATH
 LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
fi
if [ -d /usr/local/kde/bin ];then
 PATH="/usr/local/kde/bin:$PATH"
 LD_LIBRARY_PATH="/usr/local/kde/lib:$LD_LIBRARY_PATH"
fi
export PATH LD_LIBRARY_PATH

#this line gets edited by chooselocale script...
LANG=en_US
TZ="`cat /etc/TZ | tr -d "\n"`"
export TZ
#this is for antialiased fonts in gtk1 apps...
#LD_PRELOAD=/usr/lib/libgdkxft.so
#export LD_PRELOAD
#WISH mini-console needs this...
HOSTNAME="`cat /etc/hostname | tr -d "\n"`"
export HOSTNAME
#Quisp database needs this...
SHSQL_DB="/root/ghttpd/quisp"
export SHSQL_DB

#v1.0.5
#if [ "`cat /bin/bash | head -n 1 | grep "/bin/sh"`" = "" ];then
#if don't have full Bash, then /bin/bash is a script. do test this way, also tests /usr...
if [ "`readlink /bin/bash 2> /dev/null`" = "/usr/bin/bash" ];then #link to /usr/bin/bash, the full Bash.
 SHELL="/bin/bash"
 export SHELL
fi
#...this causes a problem with characters in text-mode apps running in rxvt. for example, in mp
#a vertical line character displays as a 3. so leave the default shell as Busybox sh.
#...no, have a fix, from alienX. added TERM=xterm to /root/.bashrc.
#v2.0.0 additional note: now have /bin/sh a symlink to /bin/bash, so above not used.

#v1.0.5
#Sylpheed 2.0.1 requires this (also some other gtk2 apps)...
export G_FILENAME_ENCODING=@locale

#v1.0.6
#sylpheed uses metamail which requires this...
export MM_RUNASROOT=1

#v1.0.6
DEFAULTBROWSER="`cat /usr/local/bin/defaultbrowser | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTDRAW="`cat /usr/local/bin/defaultdraw  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTHTMLEDITOR="`cat /usr/local/bin/defaulthtmleditor  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTMEDIAPLAYER="`cat /usr/local/bin/defaultmediaplayer  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTPAINT="`cat /usr/local/bin/defaultpaint  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTSPREADSHEET="`cat /usr/local/bin/defaultspreadsheet  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTTEXTEDITOR="`cat /usr/local/bin/defaulttexteditor  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTWORDPROCESSOR="`cat /usr/local/bin/defaultwordprocessor  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
export DEFAULTBROWSER DEFAULTDRAW DEFAULTHTMLEDITOR DEFAULTMEDIAPLAYER DEFAULTPAINT DEFAULTSPREADSHEET DEFAULTTEXTEDITOR DEFAULTWORDPROCESSOR

#v1.0.5
#personal customisation file...
[ -r /etc/profile.local ] && . /etc/profile.local

if [ ! -f /usr/X11R6/bin/X ];then
 echo
 echo "\\033[1;31mSorry, cannot start X. Link /usr/X11R6/bin/X missing."
 echo -n "(suggestion: type 'xorgwizard' to run the Xorg Video Wizard)"
 echo -e "\\033[0;39m"
else
 #want to go straight into X on bootup only...
 if [ ! -f /tmp/bootcnt.txt ];then
  #play.tcl /usr/share/audio/2barks.au &
  touch /tmp/bootcnt.txt
  exec xwin
 fi
fi
export LANG=en_US.UTF-8
export GTK_IM_MODULE=unikey
export XMODIFIERS="@im=unikey"
I added line export GTK_IM_MODULE=unikey,and restarted my computer
It set input method to default
And I still choose input method is unikey

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

you must add the commands, before "xwin" is executed, because "xwin" starts your Desktop.

Put the comands like this:

export LANG=vi_VN
export GTK_IM_MODULE=unikey
export XMODIFIERS="@im=unikey"

#v1.0.5
#personal customisation file...
[ -r /etc/profile.local ] && . /etc/profile.local
Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#16 Post by phantrongnghia »

In Mozilla?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#17 Post by MU »

no, it seems mozilla does not support it :(

But you can type in Abiword.
Then copy&paste.
Select the text with the mouse in Abiword, and Middle-click in Mozilla to paste it.

Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#18 Post by phantrongnghia »

Af ter I reinstalled puppy2seamonkey and installed abiword2,unikey,and copy locale folder and restart computer,i run x-unikey first then abiword,in input method
had unique id defauls and i can not type vietamese

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#19 Post by MU »

you ran unikey from the dotpups-menu?
You must do that once, because it registers unikey to Gtk.

This script executes 2 commands, you also can type them in a consolewindow:


ldconfig -n /usr/lib/gtk-2.0/2.4.0/immodules

gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules


Mark

User avatar
phantrongnghia
Posts: 205
Joined: Mon 24 Apr 2006, 14:11
Location: Hanoi,Vietnam
Contact:

#20 Post by phantrongnghia »

I always run unikey from dotpups menu

Code: Select all

gtk-query-immodules-2.0: command not found
When I run ldconfig-gtk2-unicode
Finished, Gtk2-modules were updated.
Choose in an application like Abiword vietnamese
or cyrillic with
right-click -> input methods.

Choose the font Deja vu for your text.
But input method still have one is defaults

Post Reply