WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help  (Read 704 times)

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Background:  A few years ago, a coworker set up our ancient Japanese Epson laptops with tiny core so that I didn't have to throw them away.  Unfortunately, he no longer works here, and I'm not very knowledgeable about Tiny Core (but I'm learning!)

So I'd like, if possible, to fix the keyboard settings and be able to read Japanese writing on the internet.

PROBLEM 1
Japanese Epson Laptop with JIS keyboard can type, but some symbols are in typical English qwerty locations instead of JIS locations (example:  shift+2 is @ instead of ").

Followed directions in FAQ:
http://tinycorelinux.net/faq.html#keyboard

Installed keymaps.tcz.
Tried code:
Code: [Select]
sudo loadkmap < /usr/share/kmap/qwerty/fi-latin9.kmapbut it doesn't change the symbols

Not a big deal, since I can figure it out, but it would be convenient if I could get it to work.
Is there something else I'm not doing?

I tried adding above code (minus sudo) to bootlocal.sh, but again, no change.  Not broken, but could be better.

Problem 2
I want to be able to read Japanese on the internet.  I don't care if I can't type Japanese (though that would be convenient, it's not 100% necessary), but being able to view Japanese characters on websites would be useful.

I downloaded some fonts from google fonts.

I want to put them in /usr/share/fonts (I'm using a file manager called SpaceFM as a gui for file folders to copy paste), but it tells me I don't have permission.

I'm not sure how to proceed.  Advice?

Thanks in advance.
« Last Edit: April 06, 2020, 06:27:44 AM by Rich »

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #1 on: April 01, 2020, 11:17:02 PM »
Okay, solved the font problem.  I kept getting permission denied, so finally, following advice I found in a ubuntu forum, I used the following code in terminal to manually transfer a ttf file:

Code: [Select]
sude cp -f /sdb1/MPLUS1p-Medium.ttf /usr/share/fonts/
That successfully transferred the file without error, and I can now look at web pages in Japanese using the laptop.

So, 1 problem down.  Now, if I can just figure out the keyboard.  Again, not a huge deal.  We can adapt, but it would be nice ...

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7795
Re: Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #2 on: April 02, 2020, 05:45:42 AM »
Hi kirin-rex
Load  kmaps.tcz.  Click on the  Exit  icon and select  Exit to Prompt.  Then execute the following command:
Code: [Select]
sudo loadkmap < /usr/share/kmap/qwerty/fi-latin9.kmap
startx
If the keyboard is to your liking, click on the  Editor  icon and add the following line to your  /opt/bootsync.sh  file:
Code: [Select]
loadkmap < /usr/share/kmap/qwerty/fi-latin9.kmap
The  fi-latin9.kmap  is a  Finnish  keymap.  Maybe you meant  jp106.map ?

    [EDIT]: Changed bootlocal.sh to bootsync.sh  as per reply #12. Rich
« Last Edit: May 03, 2020, 01:22:29 PM by Rich »

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #3 on: April 05, 2020, 10:51:43 PM »
Thank you!  Yes, I was using the jp106.kmap.  So at least I had that part right.  Where I was going wrong was that I was trying to enter the first sudo code using terminal.  Once I exited to prompt, it worked!

Thank you again, Rich!  I really appreciate it!  I'm a teacher in Japan, and we're trying to get computers up and ready to use Google's G-Suite and Google Classroom ... but with COVID-19, students may end up studying at home, anyway!

Thanks for your help!

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7795
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #4 on: April 06, 2020, 06:31:22 AM »
Hi kirin-rex
You are welcome. Glad to hear you got it working. I've marked you original post as solved.

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #5 on: April 06, 2020, 07:19:40 PM »
Oops, still having problems with the kmap.  For some reason, when I reboot, the keyboard is still acting like a US qwerty keyboard.  But when I exit to prompt, even if I don't type anything, the JP keyboard works properly.  When I "startx" to go back to the desktop, it still works.  But if I reboot, it goes back to US QWERTY.

1.  So, I went to "run program" and entered kmaps.tcz and clicked the box that said "run with sudo"

2.  I then clicked on EXIT and selected EXIT TO PROMPT.

3.  Typed the following code:
Code: [Select]
sudo loadkmap < /usr/share/kmap/qwerty/jp106.kmap
I tested it to make sure it works by typing:  "
I erased " and typed
Code: [Select]
startx
4.  I opened bootlocal.sh and typed:
Code: [Select]
loadkmap < /usr/share/kmap/qwerty/jp106.kmapSaved the file.

Rebooted.

Typing SHIFT+2 should (on a jp106 keyboard) give me ", but instead it gives me @ like a US QWERTY.

However, if I click EXIT and EXIT TO PROMPT, I can type " with no problem.  If I erase " and type STARTX, I can still type " with no problem.  But if I reboot, I get @ for SHIFT+2.

Any idea what I'm doing wrong?

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7795
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #6 on: April 06, 2020, 07:33:27 PM »
Hi kirin-rex
Please post the results of the following commands:
Code: [Select]
showbootcodes
cat /opt/,filetool.lst
cat /opt/bootlocal.sh

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #7 on: April 06, 2020, 09:53:17 PM »
I'm unable to copy-paste directly from the tiny-core laptop because it's telling me this forum's login isn't safe (for some reason), so I wrote it down and will type it here.  I'll try to be careful not to make too many mistakes.

Code: [Select]
showbootcodesgave me
Code: [Select]
BOOT_IMAGE=/tce/boot/vmlinuz quiet waitusb=5:UUID="7fb56286-fb74-42a4-8761-c9f348a0e2d1" tce=UUID="7fb56286-fb74-42a4-8761-c9f348a0e2d1" initrd=/tce/boot/core.gz
Code: [Select]
cat /opt/.filetool.lstgave me
Code: [Select]
opt
home

Code: [Select]
cat /opt/bootlocal.shgave me
Code: [Select]
#!/bin/sh
# put other system startup commands here
ifconfig wlan0 up
wpa_supplicant -iwlan0 -c/home/tc/wifi.cfg -Dwext -B
udhcpc -i wlan0 -t 10
loadkmap < /usr/share/kmap/qwerty/jp106.kmap

    [EDIT]: Fixed typo. Changed loadmap to loadkmap.  Rich
« Last Edit: April 09, 2020, 05:34:49 AM by Rich »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7795
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #8 on: April 06, 2020, 10:00:36 PM »
Hi kirin-rex
Is  kmaps.tcz  installed onboot? Is it listed in your  tce/onboot.lst  file?

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #9 on: April 06, 2020, 10:39:53 PM »
Yes, I installed "on boot" and it is listed in the onboot.lst

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7795
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #10 on: April 07, 2020, 06:25:27 AM »
Hi kirin-rex
I don't see anything wrong in your setup. You said:
... However, if I click EXIT and EXIT TO PROMPT, I can type " with no problem.  If I erase " and type STARTX, I can still type " with no problem.  ...
So, if I understand you correctly, just doing  Exit to Prompt  and then  startx  fixes it?

Try moving the command:
Code: [Select]
loadkmap < /usr/share/kmap/qwerty/jp106.kmapfrom  bootlocal.sh  to  bootsync.sh.

It should appear before the line that calls  bootlocal.sh , like this:
Code: [Select]
loadkmap < /usr/share/kmap/qwerty/jp106.kmap
/opt/bootlocal.sh &

    [EDIT]: Fixed typo. Changed loadmap to loadkmap.  Rich
« Last Edit: April 09, 2020, 05:35:36 AM by Rich »

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #11 on: April 09, 2020, 01:55:37 AM »
Thank you, Rich!  You're awesome!

That fixed the problem.

I added the lines in bootsync.sh.

It gave me a little trouble because it didn't want to save.  Same permission trouble I had before the first time I wanted to edit bootlocal.  Luckily, I wrote all the steps on that thread.

I used
Code: [Select]
sudo chown tc:staff /opt/bootsync.sh
sudo chmod 775 /opt/bootsync.sh

That let me save.  Had a minor problem with a misspelling (wrote "loadmap" instead of "loadkmap"), but it was easily found and fixed.

Keyboard seems properly working now.  Just have to add it to the other 13 laptops, but seems to be good!

Thank you again for your outstanding help.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7795
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #12 on: April 09, 2020, 05:32:41 AM »
Hi kirin-rex
I just want to add some notes here in case someone else runs into the same problem.

Here's what I think was happening:

1. bootsync.sh is launched almost at the end of tc-config.
2. bootsync.sh runs synchronously in the foreground effectively blocking tc-config from running until it completes.
3. The last line in bootsync.sh launches bootlocal.sh to run in the background. This allows tc-config to continue
   executing in parallel with bootlocal.sh.
4. tc-config executes its last few commands and returns control to /etc/inittab.
5. /etc/inittab logs in the user which executes the contents ~/.profile which launches X
6. We now have a potential race between bootlocal.sh completing and X starting.


The  "loadkmap < /usr/share/kmap/qwerty/jp106.kmap"  command needs to run before X starts. Placing it in bootlocal.sh does
not guarantee that. Placing it in bootsync.sh does.

Maybe the FAQ page should be updated to recommend using bootsync.sh instead of bootlocal.sh for this function?

... Had a minor problem with a misspelling (wrote "loadmap" instead of "loadkmap"), but it was easily found and fixed. ...
That was my fault. I copy/pasted your misspelling from another post. :)  I will fix those posts.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10221
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #13 on: April 09, 2020, 09:36:49 AM »
FAQ updated, thanks.
The only barriers that can stop you are the ones you create yourself.

Offline kirin-rex

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Japanese Epson Laptop - keyboard help and Japanese font help
« Reply #14 on: April 14, 2020, 05:55:33 PM »
Back to the font problem.
tldr version:  Put a new font in /usr/share/fonts/ but it disappears on reboot.


I want to be able to see Japanese characters when using firefox, so I attempted to install a Japanese font.
Most advice I've seen says to simply copy the font to /usr/share/fonts/, but I got a "permission denied", so I used terminal:
Code: [Select]
sudo cp -f /sdb1/MPLUS1p-Medium.ttf /usr/share/fonts/
That worked ... but on reboot the font is gone again.

Some advice says put is in /usr/local/share/fonts/ but I don't have a fonts folder in /user/local/share.
Other advice says maybe put it in ~/.fonts ... but I don't know where that is.

I'm thinking there's something really simply I need to do to keep the font in the /usr/share/fonts folder.