Tiny Core Linux

Tiny Core Base => CorePlus => Topic started by: andfree on April 06, 2016, 02:31:28 AM

Title: Greek keyboard layout
Post by: andfree on April 06, 2016, 02:31:28 AM
Hi. I have installed Tiny Core and I want to add greek keyboard layout and set it so as to can change layout using Alt+Shift combo. I installed kmaps.tcz but judging from what I have read, it's difficult to do it on my own without any help. Then I saw this:

Quote
CorePlus is an installation image and not the distribution. It is recommended for new users who only have access to a wireless network or who use a non-US keyboard layout. It includes the base Core System and installation tools to provide for the setup with the following options: Choice of 7 Window Managers, Wireless support via many firmware files and ndiswrapper, non-US keyboard support, and a remastering tool.

I thought that CorePlus could be a solution for me. I created a liveUSB and booted from it, but I don't see any non-US keyboard support option. I only see a default option, options about Window Manager, extensions for Installation, Wifi, Firmware, a "command line only" option & a "waitusb=5" option. Nothing else. Any help?
Title: Re: Greek keyboard layout
Post by: gerald_clark on April 06, 2016, 04:48:58 AM
Read the book: http://distro.ibiblio.org/tinycorelinux/book.html
Title: Re: Greek keyboard layout
Post by: andfree on April 06, 2016, 05:48:42 AM
Ok. In the book I read this:

Quote
If you have kmaps.tcz installed, you can use this bootcode to set the default console keymap. The console keymap is also used by the tiny X servers (Xvesa and Xfbdev), but not the larger X server Xorg.

I have Xorg-7.7 installed. This means I can't change layout?

I exited to prompt and tried:

Code: [Select]
sudo loadkmap < /usr/share/kmap/qwerty/gr-pc.kmap
startx

But it still types latin.

I also tried gr.kmap instead of gr-pc.kmap. Same result.

I still have Tiny Core and not CorePlus installed.
Title: Re: Greek keyboard layout
Post by: Misalf on April 06, 2016, 06:20:40 AM
Hi,
You need a config file. For example
/usr/local/share/X11/xorg.conf.d/10-keyboard.conf
Code: [Select]
Section "InputClass"
Identifier       "Keyboard Defaults"
MatchIsKeyboard  "yes"
        Option           "xkb_model" "pc105"
Option           "XkbLayout"   "gr,us"
Option           "XkbOptions"  "grp:alt_shift_toggle,terminate:ctrl_alt_bksp"
EndSection

Note, I haven't tested these setting.

https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg
Title: Re: Greek keyboard layout
Post by: andfree on April 06, 2016, 07:53:40 AM
Thank you. I created /usr/local/share/X11/xorg.conf.d/10-keyboard.conf with these settings, rebooted, but still Alt+Shift doesn't change layout to greek.
Title: Re: Greek keyboard layout
Post by: Rich on April 06, 2016, 07:58:07 AM
Hi andfree
Did you remember to add  usr/local/share/X11/xorg.conf.d/10-keyboard.conf  to your  filetool.lst  file and run a backup?
Title: Re: Greek keyboard layout
Post by: Misalf on April 06, 2016, 08:03:50 AM
To test Xorg settings, you only need to "Exit to Prompt", either via Exit menu or via CTRL+ALT+BACKSPACE key combo.
Then run
Code: [Select]
startx
Title: Re: Greek keyboard layout
Post by: Misalf on April 06, 2016, 08:13:06 AM
Works for me.
Σορκσ φορ με.
Title: Re: Greek keyboard layout
Post by: andfree on April 06, 2016, 08:25:57 AM
Hi andfree
Did you remember to add  usr/local/share/X11/xorg.conf.d/10-keyboard.conf  to your  filetool.lst  file and run a backup?

Hi and thanks for answer. No, I didn't know that. This is the reason that after reboot the config file was disappeared?
How should I edit the filetool.list? It has only three lines (the third is blank):

opt
home

To test Xorg settings, you only need to "Exit to Prompt", either via Exit menu or via CTRL+ALT+BACKSPACE key combo.
Then run
Code: [Select]
startx

It seems to have worked. After ALT+SHIFT it types squares instead of latins. Squares I see when I visit pages with greek characters, too. Does this mean I am missing fonts?

Works for me.
Σορκσ φορ με.

As I said, the second line seems squares to me.
Title: Re: Greek keyboard layout
Post by: Misalf on April 06, 2016, 08:38:30 AM
Yes, the reason this file disappeared is because it wasn't backed-up. One of Core's key features is that it runs in RAM, so any added or edited files that should persist need to be explicitly specified.

To edit  .filetool.lst  you can either use the  filetool  GUI,
or
Code: [Select]
editor /opt/.filetool.lst
or
Code: [Select]
echo "usr/local/share/X11/xorg.conf.d/10-keyboard.conf" >> /opt/.filetool.lst
Note that entries in  /opt/.filetool.lst  don't use the leading slash ("/").

I can display Greek characters in Firefox.
You could try installing font extensions like  dejavu-fonts-ttf.tcz .
Title: Re: Greek keyboard layout
Post by: Misalf on April 06, 2016, 08:46:48 AM
Oops - Sorry, I confused  /opt/.filetool.lst  with  onboot.lst .
Above post corrected.
Title: Re: Greek keyboard layout
Post by: andfree on April 06, 2016, 09:25:22 AM
Ευχαριστώ πολύ (meaning "thanks a lot"). All worked. I read and write greek both at firefox and opera. But not at editor (there types "?" instead of letters). It's a matter of incompatibility?
Title: Re: Greek keyboard layout
Post by: patrikg on April 06, 2016, 09:41:27 AM
I think you get like many of us, the lack of support for foreigne language in busybox.
And the default terminal(aterm) don't support it.
Install bash and another terminal (lxterminal) to get correct chars.
Look at this thread to see how i fixed it.
http://forum.tinycorelinux.net/index.php/topic,17945.msg108468.html#msg108468
Title: Re: Greek keyboard layout
Post by: andfree on April 06, 2016, 10:08:38 AM
Thanks, I'll see it. For the moment, I wanted an editor supporting greek, and leafpad does.

P.S.: Maybe this thread should be moved somewhere else, because I didn't install CorePlus after all.
Title: Re: Greek keyboard layout
Post by: andfree on April 07, 2016, 04:02:55 AM
Well, I installed bash and lxterminal, but still greek characters are displayed as "?" in lxterminal.

There are also some more problems relative to greeks:

- I can't use greek characters to name a file I create:

Code: [Select]
Invalid file name
Invalid filename α.txt

But I can do so when I create a directory. I also can do so when I rename a file.

- When I mount my external hard-drive, only files and directories with names in latin appear at rox-filer. Those with greek characters in their names don't.
Title: Re: Greek keyboard layout
Post by: patrikg on April 07, 2016, 07:01:10 AM
Sorry for asking...but do you start bash ??
Or do you change the default shell to bash ??

And do you install kmaps and what commandline args do you use to enable it.
Title: Re: Greek keyboard layout
Post by: andfree on April 07, 2016, 11:14:51 AM
I changed the default shell to bash, but still greek characters displayed as "?":

Code: [Select]
tc@box:~$ echo $SHELL
/bin/sh
tc@box:~$ bash
tc@box:~$ echo $SHELL
/bin/bash
tc@box:~$ ????????

As regards kmaps, I have installed it:

Code: [Select]
tc@box:~$ tce-load -i kmaps
kmaps is already installed!

But I have no idea what commandline args I should use to enable it.
Title: Re: Greek keyboard layout
Post by: patrikg on April 07, 2016, 11:37:29 AM
Try to add

kmap=qwerty/gr
or
kmap=qwerty/gr-pc

to your commandline

And how to modify your commandline, you may read the core book.
http://tinycorelinux.net/corebook.pdf


Title: Re: Greek keyboard layout
Post by: curaga on April 07, 2016, 11:45:53 AM
Did you set up a locale? The default, C, supports just ascii. You need either a Greek locale, or an utf8 locale. See the getlocale.tcz extension.
Title: Re: Greek keyboard layout
Post by: andfree on April 07, 2016, 12:46:50 PM
Code: [Select]
tc@box:~$ sudo getlocale.sh
I choose el_GR.UTF-8/UTF-8:

Code: [Select]
Now processing... /
Locales installed. Creating extension... cp: cannot stat '/usr/lib/locale/locale-archive': No such file or directory
\

Done. The extension is at /mnt/sda1/tce/optional/mylocale.tcz and in onboot.lst
Reboot with lang=xyz (for example lang=) to start using this.


Press enter to quit.

tc@box:~$ ????????

Or I choose el_GR/ISO-8859-7:

Code: [Select]
Now processing... cannot open locale archive "/usr/lib/locale/locale-archive": Read-only file system

Locales installed. Creating extension... /

Done. The extension is at /mnt/sda1/tce/optional/mylocale.tcz and in onboot.lst
Reboot with lang=xyz (for example lang=an_ES) to start using this.


Press enter to quit.

tc@box:~$ ????????


And how to modify your commandline, you may read the core book.
http://tinycorelinux.net/corebook.pdf

Sorry, I can't find where it says about it. Any help to find it?
Title: Re: Greek keyboard layout
Post by: patrikg on April 07, 2016, 01:39:44 PM
What platform do you use??
PC
Raspberry PI

If picore edit your config file like this.
I use nano as editor for easiness.
And all text should be at one line...i start nano with -w to disable linewrap.

Code: (bash) [Select]
tce-load -wi nano.tcz
mount /mnt/mmcblk0p1
sudo nano -w /mnt/mmcblk0p1/cmdline.txt

If PC read "Chapter 10. Bootcodes explained" in book.
Title: Re: Greek keyboard layout
Post by: Misalf on April 07, 2016, 02:08:02 PM
Apart from using bash, an appropriate locale and a capable terminal emulator, it may also be necessary to configure the terminal emulator to use a font which provides requested characters.
--
Note,  tce-load -wi ...  doesn't load the extension if it's already present locally.
So  tce-load -w ... ; tce-load -i ...  is more reliable in such cases.
Title: Re: Greek keyboard layout
Post by: andfree on April 07, 2016, 10:33:56 PM
The book says:

Quote
If using extlinux, the file is called extlinux.cfg, and the codes are stored in the APPEND line:
Code: [Select]
APPEND initrd=/boot/core.gz quiet showapps

I don't find an extlinux.cfg, but a /mnt/sda1/tce/boot/extlinux/extlinux.conf file.

Code: [Select]
sudo editor /mnt/sda1/tce/boot/extlinux/extlinux.conf
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet  waitusb=5:UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" tce=UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2"

I change it like this:
 
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet  waitusb=5:UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" tce=UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" kmap=qwerty/gr lang=el.GR

I reboot, but greek characters are still displayed as "?" in lxterminal.
Title: Re: Greek keyboard layout
Post by: Misalf on April 07, 2016, 11:33:42 PM
I can't get lxterminal to display Greek characters either. Not even German umlauts.
URxvt using Bash works.
Title: Re: Greek keyboard layout
Post by: andfree on April 08, 2016, 12:16:09 AM
I installed urxvt. But greeks aren't displayed there at all and the cursor doesn't move at all when I type greeks.
Title: Re: Greek keyboard layout
Post by: Misalf on April 08, 2016, 12:37:38 AM
You may need to set a different font (f.e. Monospace).
To test, run
Code: [Select]
urxvt -fn xft:Monospace:pixelsize=11
Then run
Code: [Select]
bash
and switch to your keyboard layout.

You can make font settings for urxvt permanent by adding the following to  ~/.Xdefaults .
Code: [Select]
URxvt*font: xft:Monospace:pixelsize=11
Title: Re: Greek keyboard layout
Post by: andfree on April 08, 2016, 12:50:46 AM
Code: [Select]
tc@box:~$ urxvt -fn xft:Monospace:pixelsize=11
urxvt: default locale unavailable, check LC_* and LANG variables. Continuing.
Title: Re: Greek keyboard layout
Post by: Juanito on April 08, 2016, 12:56:47 AM
Do you get something like this with the "locale" command:
Code: [Select]
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Title: Re: Greek keyboard layout
Post by: andfree on April 08, 2016, 01:07:22 AM
Code: [Select]
tc@box:~$ bash
tc@box:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=el.GR
LC_CTYPE="el.GR"
LC_NUMERIC="el.GR"
LC_TIME="el.GR"
LC_COLLATE="el.GR"
LC_MONETARY="el.GR"
LC_MESSAGES="el.GR"
LC_PAPER="el.GR"
LC_NAME="el.GR"
LC_ADDRESS="el.GR"
LC_TELEPHONE="el.GR"
LC_MEASUREMENT="el.GR"
LC_IDENTIFICATION="el.GR"
LC_ALL=
tc@box:~$
Title: Re: Greek keyboard layout
Post by: Juanito on April 08, 2016, 01:12:36 AM
When you made mylocale.tcz locally, did you set your "lang=" bootcode to "el.GR" or "el_GR.UTF-8"?
Title: Re: Greek keyboard layout
Post by: curaga on April 08, 2016, 01:26:35 AM
The locale creation failed above for some reason. Please remove mylocale.tcz, reboot, and try again.
Title: Re: Greek keyboard layout
Post by: andfree on April 08, 2016, 06:27:10 AM
I remove mylocale.tcz.

I reboot.

Code: [Select]
sudo getlocale.sh
I choose el_GR.UTF-8/UTF-8.

Code: [Select]
tc@box:~$ sudo getlocale.sh

Now processing... /
Locales installed. Creating extension... cp: cannot stat '/usr/lib/locale/locale-archive': No such file or directory
\

Done. The extension is at /mnt/sda1/tce/optional/mylocale.tcz and in onboot.lst
Reboot with lang=xyz (for example lang=) to start using this.


Press enter to quit.

tc@box:~$ sudo editor /mnt/sda1/tce/boot/extlinux/extlinux.conf

I try lang=el_GR:

Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet  waitusb=5:UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" tce=UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" kmap=qwerty/gr lang=el_GR


I reboot.

Code: [Select]
tc@box:~$ urxvt -fn xft:Monospace:pixelsize=11
urxvt: default locale unavailable, check LC_* and LANG variables. Continuing.

tc@box:~$ bash

I still can't type greek.

I try lang=el_GR.UTF-8:

Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet  waitusb=5:UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" tce=UUID="b7c9ae56-0223-4d78-9cfb-9ece1ebe91e2" kmap=qwerty/gr lang=el_GR.UTF-8

I reboot.

Code: [Select]
tc@box:~$ urxvt -fn xft:Monospace:pixelsize=11
urxvt: default locale unavailable, check LC_* and LANG variables. Continuing.

tc@box:~$ bash

I still can't type greek.

Code: [Select]
tc@box:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=el_GR.UTF-8
LC_CTYPE="el_GR.UTF-8"
LC_NUMERIC="el_GR.UTF-8"
LC_TIME="el_GR.UTF-8"
LC_COLLATE="el_GR.UTF-8"
LC_MONETARY="el_GR.UTF-8"
LC_MESSAGES="el_GR.UTF-8"
LC_PAPER="el_GR.UTF-8"
LC_NAME="el_GR.UTF-8"
LC_ADDRESS="el_GR.UTF-8"
LC_TELEPHONE="el_GR.UTF-8"
LC_MEASUREMENT="el_GR.UTF-8"
LC_IDENTIFICATION="el_GR.UTF-8"
LC_ALL=
tc@box:~$
Title: Re: Greek keyboard layout
Post by: curaga on April 08, 2016, 11:11:48 AM
Quote
cp: cannot stat '/usr/lib/locale/locale-archive': No such file or directory

This is the error, it's failing to create it for some reason. I can't reproduce, I just booted 7.0 x86, selected el_GR.utf8, and successfully got a greek locale.

Maybe you can run commands from the script manually, one step at a time, and so find out what fails for you?
Title: Re: Greek keyboard layout
Post by: andfree on April 08, 2016, 01:23:02 PM
I removed mylocale.tcz and rebooted.

Code: [Select]
tc@box:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=el_GR.UTF-8
LC_CTYPE="el_GR.UTF-8"
LC_NUMERIC="el_GR.UTF-8"
LC_TIME="el_GR.UTF-8"
LC_COLLATE="el_GR.UTF-8"
LC_MONETARY="el_GR.UTF-8"
LC_MESSAGES="el_GR.UTF-8"
LC_PAPER="el_GR.UTF-8"
LC_NAME="el_GR.UTF-8"
LC_ADDRESS="el_GR.UTF-8"
LC_TELEPHONE="el_GR.UTF-8"
LC_MEASUREMENT="el_GR.UTF-8"
LC_IDENTIFICATION="el_GR.UTF-8"
LC_ALL=
tc@box:~$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
tc@box:~$

I don't know how to continue.
Title: Re: Greek keyboard layout
Post by: andfree on April 13, 2016, 08:29:58 AM
I also tried this:

Code: [Select]
tc@box:~$ locale-gen el_GR.UTF-8
/bin/sh: locale-gen: not found

What other commands should I try?
Title: Re: Greek keyboard layout
Post by: andfree on April 15, 2016, 01:56:19 AM
At a previous post I wrote:

Quote
When I mount my external hard-drive, only files and directories with names in latin appear at rox-filer. Those with greek characters in their names don't.

I also tried nautilus & pcmanfm with same results. With xfe no directories appear at all.

I conclude that it has to do with the language issue.

Some more problems about file-managers:

With all managers referred above, when I try to unmount the drive, I get the message:
Code: [Select]
umount: can't unmount /mnt/sdb1: Operation not permitted
Finally, when I try to mount it with spacefm, I get the message:
Code: [Select]
No handler is configured for this device type, or no unmount command is set.  Add a handler in Settings|Device Handlers or Protocol Handlers.
Title: Re: Greek keyboard layout
Post by: Juanito on April 15, 2016, 02:09:36 AM
Are you trying to unmount the drive/partition from a terminal window when you are still looking at it with a file manager or "cd'ed" into that driver/partition in the terminal?
Title: Re: Greek keyboard layout
Post by: andfree on April 15, 2016, 08:51:41 AM
With rox-filer, which is now installed, I'm looking at that drive/partition (and see only directories that their names consist of latin characters). I click to the green arrow at the upper-left of rox-filer window to change to parent directory and get the message:

Code: [Select]
Do you want to unmount this device?

Unmounting a device makes it safe to remove the disk.

I choose "Unmount" and get the message:

Code: [Select]
Unmounting /mnt/sdb1
umount: can't unmount /mnt/sdb1: Operation not permitted
Unmount failed

Done
There was one error.

I run in terminal:

Code: [Select]
tc@box:/mnt$ umount sdb1
umount: can't unmount /mnt/sdb1: Operation not permitted

But if I run

Code: [Select]
tc@box:/mnt$ sudo umount sdb1
the drive/partition becomes unmounted. So, it's an issue of privileges.
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 05:40:09 AM
Quote
cp: cannot stat '/usr/lib/locale/locale-archive': No such file or directory

This is the error, it's failing to create it for some reason. I can't reproduce, I just booted 7.0 x86, selected el_GR.utf8, and successfully got a greek locale.

Maybe you can run commands from the script manually, one step at a time, and so find out what fails for you?

Without "sudo" there was not error. But I still couldn't type greek at urxvt.

I tried again getlocale.sh with "sudo" and there was error again.

Any help to find the commands of the script to run them step by step?
Title: Re: Greek keyboard layout
Post by: Misalf on April 18, 2016, 06:35:53 AM
Code: [Select]
editor $(which getlocale.sh)

After running something like this
Code: [Select]
sudo nice -n19 localedef -i el_GR -c -f UTF-8 el_GR.UTF-8
sudo nice -n19 localedef -i el_GR -c -f ISO-8859-7 el_GR
/usr/lib/locale/locale-archive  should be present.
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 07:27:31 AM
I deleted mylocale.tcz (from Dependences & Deletions) and rebooted. Then:

Code: [Select]
tc@box:~$ sudo nice -n19 localedef -i el_GR -c -f UTF-8 el_GR.UTF-8
cannot create temporary file: /usr/lib/locale/locale-archive.Wmu4ep: No such file or directory

As regards getlocale.sh:

Code: [Select]
#!/bin/sh

. /etc/init.d/tc-functions

checkroot

SFILE=/usr/local/share/getlocale/SUPPORTED
export tempfile=`mktemp`
temp2=`mktemp`

echo "--separate-output --checklist \"Choose which locales to support:\" 0 42 10 " > $temp2
for i in `cat $SFILE`; do
echo "$i \" \" off \\" >> $temp2
done

dialog --file $temp2 2> $tempfile

[ "$?" -ne 0 ] && exit 1

rm $temp2
clear
echo -e "${BLUE}Press enter to start processing."
read gagme

# Data available. Process.

clear

echo -ne "${BLUE}Now processing... ${CYAN}"

mkdir -p /usr/lib/locale

( for i in `cat $tempfile`; do
dest=${i%%/*}
charset=${i##*/}
locale=${dest%%.*}

nice -n19 localedef -i $locale -c -f $charset $dest
 done
 echo "$dest" > /tmp/examplelocale
) &

rotdash $!

rm $tempfile

echo -ne "\n${BLUE}Locales installed. Creating extension... ${CYAN}"

( tempdir=`mktemp -d`
cd $tempdir
mkdir -p usr/lib/locale
cp -a /usr/lib/locale/locale-archive usr/lib/locale
cd ..
chmod 755 $tempdir

rm -f mylocale.tcz
mksquashfs $tempdir mylocale.tcz > /dev/null 2>&1

rm -rf $tempdir
) &

rotdash $!

TCEDIR=`cat /opt/.tce_dir 2>/dev/null`
readlink /etc/sysconfig/tcedir >/dev/null && TCEDIR=`readlink /etc/sysconfig/tcedir`
OPTIONAL=${TCEDIR}/optional

cp /tmp/mylocale.tcz $OPTIONAL
grep -q "^mylocale.tcz" ${TCEDIR}/onboot.lst 2>/dev/null || echo "mylocale.tcz" >> ${TCEDIR}/onboot.lst
echo "glibc_gconv.tcz" > ${OPTIONAL}/mylocale.tcz.dep
md5sum ${OPTIONAL}/mylocale.tcz > ${OPTIONAL}/mylocale.tcz.md5.txt

echo -e "\n\n${GREEN}Done. The extension is at ${OPTIONAL}/mylocale.tcz and in onboot.lst"
echo "Reboot with lang=xyz (for example lang=`cat /tmp/examplelocale`) to start using this."
echo -e "\n\nPress enter to quit.${NORMAL}"
read gagme

rm -f /tmp/examplelocale

I'm afraid it's too difficult for me to run it step by step. For example "checkroot" is a command? I tried to run it, and I was not able to continue.
Title: Re: Greek keyboard layout
Post by: Juanito on April 18, 2016, 07:38:05 AM
It looks like you need "sudo mkdir -p /usr/lib/locale" first...
Title: Re: Greek keyboard layout
Post by: Misalf on April 18, 2016, 07:50:29 AM
checkroot  is a function from  /etc/init.d/tc-functions  that checks if the user has root privileges.
/etc/init.d/tc-functions  is 'sourced' into  getlocale.sh , and many Core scripts, so these functions don't need to be rewritten in every script.
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 07:54:59 AM
Code: [Select]
tc@box:~$ sudo mkdir -p /usr/lib/locale
tc@box:~$ sudo nice -n19 localedef -i el_GR -c -f UTF-8 el_GR.UTF-8
tc@box:~$ sudo getlocale.sh

Now processing... /
Locales installed. Creating extension... -

Done. The extension is at /mnt/sda1/tce/optional/mylocale.tcz and in onboot.lst
Reboot with lang=xyz (for example lang=) to start using this.


Press enter to quit.

I reboot, open urxvt and I don't believe in my eyes:

Code: [Select]
tc@box:~$ bash
tc@box:~$ Ευχαριστώ πολύ means thanks a lot

Many-many thanks.
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 07:59:42 AM
Now what remains is the problem with external drive. Still directories with names consisted of greek characters don't appear in  rox-filer.
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 08:10:01 AM
I tried to open rox-filer from urxvt (with bash) but:

Code: [Select]
Mounting /mnt/sdb1
mount: can't find /mnt/sdb1 in /etc/fstab
Mount failed

Done
There was one error.
Title: Re: Greek keyboard layout
Post by: patrikg on April 18, 2016, 08:16:42 AM
What are you trying to mount ??
If you mount a fat system you may use some parameters to get the chars correct.
I google a little bit and found this:
http://www.nslu2-linux.org/wiki/HowTo/MountFATFileSystems
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 09:18:23 AM
Unfortunatelly it's NTFS.

I can mount it with rox-filer, but it sees only directories which names consist of latin characters. So, I had the idea that if I started rox-filer from urxvt, it would have maybe seen and the directories which names consist of greek character. I don't know if it makes any sense.
Title: Re: Greek keyboard layout
Post by: Misalf on April 18, 2016, 09:26:08 AM
I'm using
Code: [Select]
sudo mount.ntfs-3g -o iocharset=utf8 /dev/sdb1 /mnt/sdb1
Needs  ntfs-3g.tcz .
Title: Re: Greek keyboard layout
Post by: andfree on April 18, 2016, 09:44:49 AM
I'm using
Code: [Select]
sudo mount.ntfs-3g -o iocharset=utf8 /dev/sdb1 /mnt/sdb1
Needs  ntfs-3g.tcz .

This got the job done. Thanks one more time.
Title: Re: Greek keyboard layout
Post by: andfree on April 20, 2016, 01:30:24 PM
I installed the latest version of firefox and the menus are in greek. Why does this happen and what to do to change it in english?
Title: Re: Greek keyboard layout
Post by: patrikg on April 20, 2016, 01:37:33 PM
It's the locale that sets the language of program.
You can try to start firefox with another lang settings from command line.
Code: (bash) [Select]
(export LANG=C;firefox)
Title: Re: Greek keyboard layout
Post by: andfree on April 20, 2016, 02:06:38 PM
If you mean to add this code at the APPEND line of extlinux.conf, it didn't work.

I have already removed mylocale extension from the onboot list and I have also removed at all the "lang=" option from extlinux.conf, but still firefox is in greek.
Title: Re: Greek keyboard layout
Post by: patrikg on April 20, 2016, 02:10:05 PM
I don't mean you should change the command line args to kernel.
Just try to start firefox from the terminal command line.
With my suggested command.

Sorry this forum is for core linux questions, you should better find your answers to this type of questions on some regular linux forums and http://lmgtfy.com/?q=change+language+in+firefox+linux (http://lmgtfy.com/?q=change+language+in+firefox+linux) and like stackoverflow.

Title: Re: Greek keyboard layout
Post by: Misalf on April 20, 2016, 02:23:23 PM
When your Firefox extension was created by firefox_getLatest.sh, the script downloaded the Firefox package based on your locale settings at that time.
For whatever reason you want to get back to English, you would need to re-run firefox_getLatest.sh with the locale not set to anything else than the default, to get an English version of Firefox.

I don't mean to e rude, but you seem to run into every possible obstacle new Core Linux users may encounter, if they do not read the f manual.
Title: Re: Greek keyboard layout
Post by: andfree on April 20, 2016, 11:12:43 PM
Thank you, it worked.
In fact, I want all menus in english, so I don't think there's a reason to reset the locale to greek again.
You are right. Unfortunatelly, the obstacles were too many for me to face them with only the help of the book, but I'll try to do it better.
Title: Re: Greek keyboard layout
Post by: patrikg on April 21, 2016, 04:03:18 AM
Great that your problem get solved.
superuser.com (http://superuser.com) is also a good site to get answers from.
Title: Re: Greek keyboard layout
Post by: chattrhand on May 04, 2016, 04:02:37 AM
Hi, I'm using German keymap, not Greek, I'm going a different way to set up my keyboard, it may look a bit suboptimal.

But it works reliably and sometimes I explain it successfully to newbies via chat.

It needs a Frugal Installation (on USB-Stick or HDD) and can be done after Restart of a fresh installed Frugal Installation. (but could also be done later)

- If kmaps.tcz isn't just installed, do it now. (using the tc Apps browser)
- open a Terminal and type in the following very long line (extend the terminal to fit into), and press Enter

tc@box:~$ echo 'loadkmap < /usr/share/kmap/qwertz/de-latin1-nodeadkeys.kmap' >> /opt/bootlocal.sh

Check whether it is ok using the following command:

tc@box:~$ cat /opt/bootlocal.sh
#!/bin/sh
# put other system startup commands here
loadkmap < /usr/share/kmap/qwertz/de-latin1-nodeadkeys.kmap
tc@box:~$

The /opt/bootlocal.sh should look like this.
Now open the /home/tc/.xsession file using the editor:

tc@box:~$ editor .xsession

In the editor move to the 3rd line and press enter to insert an empty line
Insert the following content to this line:

sleep 3 && xmodmap -e "clear Mod4" -e "add Mod5 = Mode_switch" &

Save this file and close it, close the terminal and reboot. Up from now this installation uses German keys.


This could easily adapted for a Greek (and other languages) keyboard:
Open a terminal and type in:

tc@box:~$ echo 'loadkmap < /usr/share/kmap/qwerty/gr-pc.kmap' >> /opt/bootlocal.sh

and, within .xsession  insert a new 3rd line containing:

sleep 3 && xmodmap -e "clear Mod4" -e "add Mod5 = Mode_switch" &

Save it and reboot. Now the keyboard should write Greek characters.
Title: Re: Greek keyboard layout
Post by: kostandis loukos on May 03, 2020, 11:18:07 AM
Hello, everybody. I have tried everything and the only thing I managed to do is alt+shift= (it does not show here) mostly latin characters with accents and a Delta, only at the text prompt. Excuse my poor english, but please a DEFINITIVE method to have greek letters typing in Tiny Core. Thank you.
Title: Re: Greek keyboard layout
Post by: Rich on May 03, 2020, 01:32:14 PM
Hi kostandis loukos
Welcome to the forum.

Load  kmaps.tcz.
I see 2 files for greek,  gr.kmap  and gr-pc.kmap.  If one doesn't work correctly, try again with the other.

You must be in the console to change the keyboard. If you are in the GUI, click on the  Exit  icon and select  Exit to Prompt.
Then execute the following command:
Code: [Select]
sudo loadkmap < /usr/share/kmap/qwerty/gr.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/gr.kmap
Title: Re: Greek keyboard layout
Post by: kostandis loukos on May 03, 2020, 05:44:25 PM
Well thank you, but it does not work, with either combination, gr-pc.kmap or gr.kmap.
Perhaps I should try with setxkbmap, but although i have all Xorg tczs installed the command is not recognized by the terminal server. The letters remain english in the terminal, in text editors including LibreOffice...
The only thing that has worked until now is what i told before, via .filetool.lst, as described in other threads and insofar it has produced only accented latin on the console.
Thank you.