Chinese Language Pets

For efforts in internationalising Puppy and solving problems in this area
Message
Author
icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#376 Post by icake »

1. How to invoke fcitx and scim on Puppy

a. run a Puppy linux English system on your pc (e.g. fd- fatdog64 7.1.0 or jlh - just lighthouse 7.0.2.b2 )

b. download and install the appropriate fcitx or scim pets or txzes
for fd, its either
fd64-7.0.1-fcitx64_4.2.7-en-zh-raring-13.0.3.txz or
fd64-7.0.1-scim64_1.4.14-en-zh-raring-13.0.3.txz
for jlh, its either
fcitx64_4.2.7-en-zh-raring-13.1.1.pet or
scim64_1.4.14-en-zh-raring-13.1.1.pet

c. install the pet/txz on your Puppy English system
i. for txz, mouse right click on the txz file, select install, confirm ok all the way
ii. for pet, mouse double left click on the pet file, confirm ok all the way

d. when the installation process under c is finished, restart X windows
either
menu, shutdown, restart X server, confirm ok; or
open terminal, type "restartwm", press return
for half-Chinese pets 12.x.x and 13.x.x with x.x at or above 1.0, this restart X step is automatic, so for jlh installing 13.1.1.pets, it will be done by the system automatically.

e. after system has restart X windows, open an application allowing user input (geany, leafpad, Libreoffice word, cals, gnumeric, osmo planner etc)

f. mover cursor to input field, press ctrl + space
the fcitx or scim ready tray will appear on the screen
fcitx on the top central, scim on lower right hand corner

g. select your input method
fcitx: mouse right click on any parts of the fcitx tray, select input method, mouse left click on the target input method on the drop down list
scim: mouse left click on the name of the default input method (just to the right of the SCIM sign on the left hand side of the SCIM tray), select either Chinese (simplified) or Chinese (traditional), select target input method on the pop-up list

h. move cursor to your application user input area, start typing using the keys specified by your input method

i. when the required word is found on the selection screen, select by typing the code number (1, 2, 3...) or mouse left click on the word

j. you can move up or down a page on the selection window by pressing + or -, page up or page down, as defined by the input method.

2. you like yong but unfortunately I ran into many funny issues in getting yong to run on fd. I will try again later and let you know.

3. I belief Google pinyin is closest to sogou pinyin and Gpy is included in both fcitx and scim pets

4. I have not repackaged fd before and I have to learn from scratch. I guess it would be much faster if you could try getting the fcitx or scim txzes working. However in case you really cannot make it, I will do something.

stemsee

#377 Post by stemsee »

re-testing

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese Language pets/txzes

#378 Post by icake »

** (Note: A more recent version of half-Chinese and Chinese language pets for fatdog64 710 is now available. Please see the posting dated Feb 11, 2017. icake)

I finally managed to run yong input method platform (
Last edited by icake on Sat 11 Feb 2017, 12:44, edited 1 time in total.

stemsee

#379 Post by stemsee »

Thanks icake

Must have been a lot of work! It is working correctly now on FD64-710.

For your interest, sogou pinyin is available on linux. I read that it becomes an input method option in fcitx. Maybe could be added to yong (not that it is needed!)

I will try these packages out with JustLighthouse too.

Thanks again
stemsee

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#380 Post by jamesbond »

icake - thanks for supporting the Chinese language input in Fatdog.

You're saying that it is difficult to modify Fatdog and difficult to make it work. Can you please elaborate which part is difficult, why is it difficult, and whether there is any way we can make it easier for you to do what you do in the future?
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

TeX Dog
Posts: 287
Joined: Wed 06 Jul 2016, 17:57

#381 Post by TeX Dog »

May just be language differences. I am in a kick to learn to cook Chinese ( really Taiwan style ) and most I find is mostly English with odd grammar and some important details still only in Chinese. I think the reverse would also occur.
I thought for years You (JB) was from Italy

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#382 Post by icake »

With reference to the post by jamesbond earlier today, I am summarizing below the challenges I faced and the solutions I used in getting the yong input method platform to run on the fatdog64 7.1.0 system (fd).

Before I continue, may I make use of this opportunity to thank all the contributors to the Puppy community for their effort firstly in bringing the Puppy system to this world and secondly for their continuous effort to bring updates and improvements to create a better Puppy everyday.

The purposes of this summary are:
a. provide information for jamesbond and his team as feedback with the potential to making fd better

b. provide useful information for serious users of fd for modifying or work around with fd

c. provide documentation for myself as future references before I forgot

I want to emphasis that none of these descriptions are meant to be negative comments nor complaints about fd which is one of the most powerful and fast Puppy I have ever used.

Special notes: I realize that my experience with modifying the fd system is quite unique, relatively narrow and very specific. All I did was trying to get the Chinese input platforms (including fcitx, scim and yong) to run successfully on fd. So my prospective will likely be different compare to other modifications. Some of the issues below might also arise from the Chinese input platform programs themselves and have nothing to do with fd. So please be mindful in viewing these:

1. When a txz package was installed to fd, at the end of the installation process, a xdialog message saying that the package ***.txz was installed successfully was shown on the screen. It is absolutely normal and necessary to have such a message shown when everything went smoothly. However, during my work on fd, the same successful message was also shown without any warning when there were errors during the installation. These errors include:
a. when the /install/doinst.sh program file is not executable
b. when there are errors running the scripts inside /install/doinst.sh (e.g. spelling errors, if then logical errors, directory not found, file cannot be opened, program crashed - see 3 below for more details)

2. the default $LANG in fd is en_US.UTF-8 but for some unknown reasons, $LANG was changed to C during the installation of the yong.txz package. (I am not sure whether this was caused by fd or yong). Because yong depends on the value of $LANG to install different items to the system and so will lead to unexpected results.

My solution: disabled the testing of $LANG in yong.

3. for some unknown reasons, when the command "exec /usr/bin/gtk-query-immodules-2.0 --update-cache" was ran in fd, all the required information were correctly setup. But the program then crashed and exited abnormally
So if the command was ran by a line inside doinstal.sh, it will exit immediately and all scripts below this line will not be executed. Meanwhile the xdialog message saying that the package xxx.txz was installed successfully will still be shown
If the command was ran in a terminal, the terminal would flash once, then the terminal closed and disappeared (typical program crash)

My solution: move the command as the very last statement inside doinstal.sh and insert before that line (the 2nd last line) another command to run a 5 seconds delay restartwm script to regain control of the program throw right after the crash.

4. fd starts seamonkey using the command exec seamonkey -spot. However this caused yong Chinese input method platform unable to run in seamonkey.

My solution: replace exec seamonkey -spot with exec seamonkey.

5. the location of some key system files for fd are quite different compare to other Puppy systems:

a. font files are in /usr/share/fonts/X11/TTF instead of /usr/share/fonts/default/TTF
b. desktop menu fonts are defined in /etc/xdg/templates/_root_.jwmrc and /etc/xdg/templates/JWMRC instead of /root/.jwm/jwmrc-theme and /root/.jwm/themes/*-jwmrc
c. startup file xinitrc is in /etc/X11/xinitrc instead of /root/.xinitrc
d. a new wmexit program was used to exit from X by James Budiono 2012

All of the above caused a 15 minutes job for creating a new half-Chinese pet to become a 15 hours job for creating the first fd txz.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#383 Post by jamesbond »

Thank you icake for the feedback. I've written a very long reply and about to post it here, but then I thought it may be off-topic, so I'm PM-ing you instead. I'm happy for you to publish the content of that PM if you think it will help others.

@Tex Dog: You're not the only one :)
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#384 Post by icake »

Here is the full pm dated Jan 20 from jamesbond in response to my posting yesterday. I think it contains extremely useful information for serious fatdog64 users and jamesbond had already indicated that it can be published:
Thank you icake for the feedback.

icake wrote:
I want to emphasis that none of these descriptions are meant to be negative comments nor complaints about fd...
Understood, thanks!

My comments below is meant to shed some lights on why things are as they are. I have re-paraphrased your original feedback to make it shorter; if my re-write is different from your original meaning please correct me.

___________________

1. Installing keeps showing "success" when installation actually fails (doinst.sh not executable and/or errs out).

RE: By the time doinst.sh is run, the package has already been installed (files expanded / copied). So it is too late to flag that installation fails even if doinst.sh fails.

Fatdog's package installation steps are basically:
a) tar -xf package-name.txz -C /
b) some administrative steps to record the installed files, etc.
c) sh /install/doinst.sh if doinst.sh exists
By the way doinst.sh does not need to be executable. It will still be run otherwise.

This behaviour is inherited from Slackware package management tool from which Fatdog's one is based on; it considers doinst.sh script optional and its failure non-fatal.

I cannot change the behaviour of this script because it is the building blocks used in higher-level package management tools (slapt-get and gslapt) (as I highlighted here: http://www.murga-linux.com/puppy/viewto ... 770#939770), changing the behaviour may cause unwanted side effects.

I do agree that it makes it more difficult to debug install scripts.

My suggestion on how to create install script:
a) create a package without install scripts. Put it in /tmp.
b) launch a sandbox (run sandbox.sh from terminal).
c) inside the sandbox.sh, install the package from CLI (installpkg /tmp/pkgname.txz)
d) Then create the install script, test it as needed. Create your install script in /tmp also (this is one location shared between host and the sandbox).
e) If you need to start over, just exit from sandbox and restart from step b)
f) when done, you can re-create the package with the install script inside by copying the install script from /tmp to your package source folder
g) Test the final package inside sandbox again, make sure that it works.
h) You can launch a "desktop inside desktop" by typing "xwin" inside sandbox.


___________________


2. Default lang is UTF-8, but LANG changed to C in installation process.

RE: That's because /sbin/installpkg explicitly sets LANG=C before running. It's done to make certain operations "faster" and "predictable" (some operation with numbers will result with a "comma" or a "dot" to indicate thousand separators and decimals, and the script is hardcoded to handle only one of these).

This behaviour is inherited from Slackware package management tool from which Fatdog's one is based on.


___________________


3. "exec /usr/bin/gtk-query-immodules-2.0 --update-cache" crashed.
If the command was ran in a terminal, the terminal would flash once, then the terminal closed and disappeared (typical program crash)

RE: From my understanding, this is not a crash. For the terminal case, if you use "exec", the shell is replaced by gtk-query-immodules itself, and once it finishes the terminal as nothing else to run, so it quits. Try running the same command without the "exec" part, and see if that works?


___________________



4. fd starts seamonkey using the command exec seamonkey -spot.

RE: Yes, this is how we run network programs, seamonkey being the most obvious ones.
In my fcitx startup script, I actually run two instances of fctix:
Code:

Code: Select all

# cat /etc/xdg/Startup/fcitx-xdg 
#!/bin/dash 
fcitx-autostart # start root 
[ $(id -u) -eq 0 ] && run-as-spot fcitx-autostart # start spot
And I have two configurations, one for root, and one for spot.


___________________



5. the location of some key system files for fd are quite different compare to other Puppy systems.

RE: Yes, mainly for two reasons:
- The first reason is that we try not to patch things if possible, so the locations we use are the locations given in the original upstream source packages.
- The second reason is that Fatdog is multi-user, so we have two sets of configurations: one system-wide configuration (mostly reside in /etc) and one per-user configurations (in $HOME).

a. font files are in /usr/share/fonts/X11/TTF instead of /usr/share/fonts/default/TTF

RE: this is the default locations from Xorg

___________________

b. desktop menu fonts are defined in /etc/xdg/templates/_root_.jwmrc and /etc/xdg/templates/JWMRC instead of /root/.jwm/jwmrc-theme and /root/.jwm/themes/*-jwmrc

RE: I agree that this is not obvious. The reason why the config file is there is because we use fixmenus from technosaurus here: ("http://www.murga-linux.com/puppy/viewtopic.php?t=70804"), which uses a master configuration file in /etc/xdg/templates/JWMRC, and re-creates them for each user as needed.
The first 3 lines of the script has this:
Code:

Code: Select all

[ ! -d ${HOME}/.jwm ] && mkdir ${HOME}/.jwm 
[ -f ${HOME}/.jwm/JWMRC ] || cp /etc/xdg/templates/JWMRC ${HOME}/.jwm/JWMRC 
. ${HOME}/.jwm/JWMRC 

___________________

c. startup file xinitrc is in /etc/X11/xinitrc instead of /root/.xinitrc

RE: /root/.xinitrc is symlinked to /etc/X11/xinitrc, so if you edit /root/.xinitrd you actually edit /etc/X11/xinitrc automatically.

___________________

d. a new wmexit program was used to exit from X

RE: Yes, I consolidated all the various "exit from X" programs (wmexit, restartwm, etc etc) into one. I think later Woof-CE based pups are following similar approach.

___________________

Hope this helps.

If you feel this can help others, please feel free to publish it in your thread (or I can do that myself - let me know). The reason why I don't do that myself is because I feel that this long post may be off-topic.

Again, thank you for making the Chinese input works on Fatdog despite the difficulties you faced.

cheers!
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.

Thanks jamesbond for the quick and full reply. icake

stemsee

#385 Post by stemsee »

No wonder!

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#386 Post by icake »

Barry Kauler has recently released 2 new Puppy systems:
quirky SlaQ x86_64 8.1.6 on Jan 9, 2017 and
quirky xerus x86_64 8.1.6 on Jan 13, 2017

Main features:
SlaQ 8.1.6 was built from Slackware 14.2 binary packages
Xerus 8.1.6 was built from Ubuntu 16.04 x86_64 binary packages

More information including background, announcement and release notes:
SlaQ 8.1.6: http://distro.ibiblio.org/quirky/quirky ... -8.1.6.htm
Xerus 8.1.6: http://distro.ibiblio.org/quirky/quirky ... -8.1.6.htm

Download SlaQ 8.1.6:
http://distro.ibiblio.org/quirky/quirky ... laq-8.1.6/ or
http://ftp.nluug.nl/ftp/pub/os/Linux/di ... laq-8.1.6/

Download Xerus 8.1.6:
http://distro.ibiblio.org/quirky/quirky ... rus-8.1.6/ or
http://ftp.nluug.nl/ftp/pub/os/Linux/di ... rus-8.1.6/

I have created 6 half-Chinese language pets for slaq and xerus:
fcitx Chinese input platform: fcitx_4.2.7-en-zh-xenial-16.1.0.pet (24.6 mb)
scim Chinese input platform: scim_1.4.14-en-zh-xenial-16.1.0.pet (22.1 mb)
yong Chinese input platform:
yong3264_4.2.0-en-zh-xenial-16.1.0.pet (8.6 mb)
yong3264_th_2016.11.5-en-zh-xenial-16.1.0.pet (7.9 mb)
yong3264_thjj_2016.7.29-en-zh-xenial-16.1.0.pet (8.4 mb)
yong3264_thth_2014.8.5-en-zh-xenial-16.1.0.pet (9.5 mb)

Plus 2 Chinese language pets each for slaq and xerus:
xerus:
Simplified Chinese: xerus64-8.1.6-zhcn-16.1.0.pet (2.4 mb)
Traditional Chinese: xerus64-8.1.6-zhhk-16.1.0.pet (2.0 mb)

SlaQ:
Simplified Chinese: slaq64-8.1.6-zhcn-16.1.0.pet (2.4 mb)
Traditional Chinese: slaq64-8.1.6-zhhk-16.1.0.pet (2.0 mb)

To use:
(a) any 1 of the 6 half-Chinese language pets enables you to display and input Chinese in quirky SlaQ x86_64 8.1.6 or quirky xerus x86_64 8.1.6

(b) the Chinese language pets will give you Simplified Chinese or Traditional Chinese menus, icon labels for quirky SlaQ x86_64 8.1.6 or quirky xerus x86_64 8.1.6

All these half-Chinese and Chinese language pets are now available for download from the public sharing folders. Please see the first posting for download addresses.

stemsee

#387 Post by stemsee »

Hi icake

I am not able to get yong input method to work with google chrome/chromium browser on FatDog64 710! It works with tor/firefox ok.

Any pointers?

stemsee

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#388 Post by icake »

One way to get yong input method platform run on google-chrome under fatdog64 7.1.0 (fd):

1. In fd, go to /opt/google/chrome, open file google-chrome using geany

find this section at the end:

Code: Select all

# Make sure that the profile directory specified in the environment, if any,
# overrides the default.
if [[ -n "$CHROME_USER_DATA_DIR" ]]; then
  # Note: exec -a below is a bashism.
  exec -a "$0" "$HERE/chrome"  \
    --user-data-dir="$CHROME_USER_DATA_DIR" "$@"
else
  exec -a "$0" "$HERE/chrome"  "$@"
fi
2. change the else part like this:

Code: Select all

else
  #exec -a "$0" "$HERE/chrome"  "$@"
  exec -a "$0" "$HERE/chrome" "$@" --user-data-dir="$HOME"
fi
3. Save the file

4. run in terminal:
google-chrome-stable --no-sandbox

and yong should be available in google-chrome

Let me know if you can find a better way or if the above does not work for you.

stemsee

#389 Post by stemsee »

Thanks icake

Working now.

I had an idea that it was the isolation due to sandboxing. i also tested out this code using unshare. Needs further exploration, but works.

Code: Select all

unshare google-chrome-stable --no-sandbox 
stemsee

stemsee

#390 Post by stemsee »

你奥,icake

When I have yong installed and I still want to make the system chinese aswell do I still need to install a half-chinese pet?

Or must I uninstall yong and thn install a half chinese pet and then the chinese system pet?

With yong installed and then installing half-cinese pet and the chinese system pet after restart X everything is chinese, but yong no longer works and neither does fcitx. Also after subsequent restart, the system changes with only some menu items and desktop icons retain chinese text.

In this case what steps must be taken so that only yong is installed and full cinese system, but no fcitx or sscim?
隙隙

stemsee

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#391 Post by icake »

Stemsee,
When I have yong installed and I still want to make the system chinese as well do I still need to install a half-chinese pet?
no
Or must I uninstall yong and then install a half chinese pet and then the chinese system pet?
only 1 half-Chinese pet (yong, fcitx or scim) + 1 chinese pet
With yong installed and then installing half-chinese pet and the chinese system pet after restart X everything is chinese, but yong no longer works and neither does fcitx. Also after subsequent restart, the system changes with only some menu items and desktop icons retain chinese text.

In this case what steps must be taken so that only yong is installed and full chinese system, but no fcitx or scim?

I think you cannot install more than 1 half-Chinese language pets (yong + SCIM or fcitx) to one English system because they will interfere with each other and funny things will happen.
To make it work, I would recommend a fresh start from the English system rather than trying to fix your combo.

For your information, I had spent a few hours this morning trying to create the yong Chinese language pet for fatdog64 7.1.0 but ran into some issues. After changing the locale to either zh_CN or zh_HK, yong cannot run on most applications. yong is available in urxvt and applications that can specify the input method (need to choose yong as the input method) (e.g. Abiword and osmo). I will keep on working.

While waiting may I suggest that you try out the other Chinese ready Puppy systems such as the quirky SlaQ 8.1.6 or quirky Xerus 8.1.6.

stemsee

#392 Post by stemsee »

Hi icake

I found this.
After I load the fatdog-710-NLS.sfs the system is easily changed to chinese system but yong no longer works.

stemsee

icake
Posts: 556
Joined: Fri 27 Jul 2012, 00:58

Chinese language pets

#393 Post by icake »

The Fatdog Team had released Fatdog64-710 Final on Dec 4, 2016

More information including background, announcement and release notes:
http://www.murga-linux.com/puppy/viewtopic.php?t=109067

Download Fatdog64-710:
http://distro.ibiblio.org/fatdog/iso/
http://ftp.nluug.nl/ibiblio/distributions/fatdog/iso/
http://mirror.aarnet.edu.au/pub/fatdog/iso/
http://ftp.cc.uoc.gr/mirrors/linux/fatdog/iso/

(a) I have created 6 half-Chinese language pets for Fatdog64-710:
fcitx Chinese input platform: fcitx64_4.2.7-fd64710-en-zh-raring-13.1.0.txz (15 mb)
scim Chinese input platform: scim64_1.4.14-fd64710-en-zh-raring-13.1.0.txz (12 mb)
yong Chinese input platform:
yong_4.2.0-fd64710-en-zh-raring-13.1.0.txz (5.5 mb)
yong_th_2016.11.5-fd64710-en-zh-raring-13.1.0.txz (4.7 mb)
yong_thjj_2016.7.29-fd64710-en-zh-raring-13.1.0.txz (5.1 mb)
yong_thth_2014.8.5-fd64710-en-zh-raring-13.1.0.txz (6.1 mb)

(b) I have also created 2 Chinese language pets:
Simplified Chinese: fd64-7.1.0-zhcn-13.1.0.txz (1.6 mb)
Traditional Chinese: fd64-7.1.0-zhhk-13.1.0.txz (1.1 mb)

To use:
(c) after install any 1 of the 6 half-Chinese language pets under (a):
your Fatdog64 710 system will be able to display and input Chinese (desktop menus, sub-menus and icon labels are still English)

(d) after install any 1 of the 6 half-Chinese language pets under (a) and also install 1 of the 2 Chinese language pets under (b):
your Fatdog64 710 system will be able to display and input Chinese; plus
your desktop menus, sub-menus and icon labels will be changed to Simplified Chinese or Traditional Chinese

more information about the fcitx64 4.2.7 pet, please see postings dated Feb 4 and 12, 2015 on page 15 of this subject
more information about the scim64 1.4.14 pet, please see postings dated Feb 6 and 13, 2015 on page 15 of this subject
more information about the yong pets, please see posting dated Dec 31, 2016 on page 25 of this subject

All these half-Chinese and Chinese language pets are now available for download from the public sharing folders. Please see the first posting for download addresses.

stemsee

#394 Post by stemsee »

The packages listed are not yet visible on google drive. I'll try again later. Have you tested with fatdog-NLS.sfs . The system can change between mutiple interface languages. Previous yong only works when locale is english, not portugues or chinese. Looking forward to testing out this new set of packages.

FatDog keyboard layout doesn't seem to work properly, either. When I switch to potuguese keyboard layout none of the particular portuguese characters are evident.

stemsee

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#395 Post by step »

stemsee wrote: FatDog keyboard layout doesn't seem to work properly, either. When I switch to potuguese keyboard layout none of the particular portuguese characters are evident.

stemsee
Hi stemsee, this specific issue seems to be unrelated to icake's Chinese pets. Can you please take it to the Fatdog64-710 thread? Thank you.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

Post Reply