WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Greek keyboard layout  (Read 32799 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Greek keyboard layout
« Reply #30 on: April 08, 2016, 04:26:35 AM »
The locale creation failed above for some reason. Please remove mylocale.tcz, reboot, and try again.
The only barriers that can stop you are the ones you create yourself.

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #31 on: April 08, 2016, 09: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:~$

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Greek keyboard layout
« Reply #32 on: April 08, 2016, 02:11:48 PM »
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?
The only barriers that can stop you are the ones you create yourself.

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #33 on: April 08, 2016, 04: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.

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #34 on: April 13, 2016, 11: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?

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #35 on: April 15, 2016, 04: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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Greek keyboard layout
« Reply #36 on: April 15, 2016, 05: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?

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #37 on: April 15, 2016, 11: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.

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #38 on: April 18, 2016, 08: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?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Greek keyboard layout
« Reply #39 on: April 18, 2016, 09: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.
Download a copy and keep it handy: Core book ;)

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #40 on: April 18, 2016, 10: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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Greek keyboard layout
« Reply #41 on: April 18, 2016, 10:38:05 AM »
It looks like you need "sudo mkdir -p /usr/lib/locale" first...

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Greek keyboard layout
« Reply #42 on: April 18, 2016, 10: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.
Download a copy and keep it handy: Core book ;)

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #43 on: April 18, 2016, 10: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.

Offline andfree

  • Full Member
  • ***
  • Posts: 127
Re: Greek keyboard layout
« Reply #44 on: April 18, 2016, 10: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.