Tiny Core Base > CorePlus

Greek keyboard layout

<< < (9/13) > >>

andfree:
I deleted mylocale.tcz (from Dependences & Deletions) and rebooted. Then:


--- Code: ---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
--- End code ---

As regards getlocale.sh:


--- Code: ---#!/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
--- End code ---

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.

Juanito:
It looks like you need "sudo mkdir -p /usr/lib/locale" first...

Misalf:
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.

andfree:

--- Code: ---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.
--- End code ---

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


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

Many-many thanks.

andfree:
Now what remains is the problem with external drive. Still directories with names consisted of greek characters don't appear in  rox-filer.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version