Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Greek Accented Vowels Howto (Ελληνικοι χαρακτήρες)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Greek
View previous topic :: View next topic  
Author Message
Deathwing00
Moderator
Moderator


Joined: 13 Jun 2003
Posts: 4079
Location: Dresden, Germany

PostPosted: Mon Nov 10, 2003 11:10 pm    Post subject: Greek Accented Vowels Howto (Ελληνικοι χαρακτ Reply with quote

1. Introduction

Why of this document?

This document was created to solve the trouble caused to users when they tried to type greek characters inside the X enviroinment. This document is mainly directed to greek users who would like to be able to type correctly greek characters in their favorite applications.

2. System Configuration

Keyboard Configuration on X

The first thing we need to do is to configure the X server in order to set the appropiate keyboard layout. We will use a dual layout, as it is necessary to have a latin-character layout in order to be able to interact correctly with the system. So we edit /etc/X11/XF86Config and we set up they keyboard as shown bellow.

Code listing 2.1: Keyboard Layout Configuration in /etc/X11/XF86Config

Code:
Section "InputDevice"
    Identifier   "Keyboard"
    Driver   "Keyboard"
    Option   "AutoRepeat"  "500 30"
    Option   "XkbRules"    "xfree86"
    Option   "XkbModel"    "pc104"
    Option   "XkbLayout"   "us,el"
    Option   "XkbOptions"  "grp:alt_shift_toggle"
EndSection


Important: Beware that the options you have to add/chage are the two last: XkbLayout and XkbOptions. The rest must be configured to match your system. Also note that we used here Option "XkbLayout" "us,el", but sure you can use any possible keyboard layout combination.

Note: The option Option "XkbOptions" "grp:alt_shift_toggle" will allow you to switch keyboard layout inside X by just pressing the following key combination: ALT + SHIFT.


X Font Configuration


We don't have to worry about fonts, as Gentoo itself has already installed the appropiate True Type Fonts to type in Greek. We'll just have to keep in mind that we'll have to choose them when we get into X if we want to write in Greek correctly. There are some fonts that do not support Greek by default.

System Variable Exportation

If we have arrived to this point, it means that the greek keyboard layout is working... but not totally correct. You might write in Greek, but you'll notice you are unable to type accented greek vowels. Our next step will ensure that we will be able to type accents on vowels. To do that, we have to set two variables in our profile. In this example, the variables are set system-wide for all users.

Code listing 2.2: Adding system-wide variables in /etc/profile

Code:
export LC_CTYPE=el_GR
export LC_COLLATE=el_GR


After this is done, we just have to issue the following command in order to have the system updated. Elsewhere we would have to reboot the system for the changes to take effect.

Code listing 2.3: Updating the system settings

Code:
$ source /etc/profile




--------------------------------------------------------------------------------

Updated November 10, 2003

--------------------------------------------------------------------------------

Ioannis Aslanidis
Author

Arkalis Evangelos
Contributor

Theofilos Intzoglou
Contributor

--------------------------------------------------------------------------------
Back to top
View user's profile Send private message
feliguelo
n00b
n00b


Joined: 13 Apr 2004
Posts: 8

PostPosted: Wed Aug 25, 2004 3:08 pm    Post subject: two languages with accents Reply with quote

Thanks for the information. Now I have an Hellenic keyboard with accents and everything but the problem is that now I don't have the accents for Castellano (Spanish) that is my native language.

The thing is that I have to choose between Hellenic or Castellano when I define LC_CTYPE, depending on its value I get accents in one language or in the other.
I have tried this:
Code:
export LC_CTYPE="es_ES@euro el_GR"

and many variants like "es_ES el_GR", "el_GR,es_ES" and so on, but they don't work.

Of course what I can do it to export everytime the right value in a xterminal and start the application i want from that xterminal but it isn't a very practical solution.

Any idea?
Back to top
View user's profile Send private message
Deathwing00
Moderator
Moderator


Joined: 13 Jun 2003
Posts: 4079
Location: Dresden, Germany

PostPosted: Wed Aug 25, 2004 5:38 pm    Post subject: Reply with quote

Yo tambiιn uso el teclado en castellano y tampoco he encontrado forma de hacer funcionar los acentos a la vez en castellano y en griego a la vez... estamos en ello, cuando sepamos algo te lo contaremos ;)
Back to top
View user's profile Send private message
feliguelo
n00b
n00b


Joined: 13 Apr 2004
Posts: 8

PostPosted: Thu Aug 26, 2004 4:00 pm    Post subject: Reply with quote

It is curious how difficult can be certain things in GNU/Linux when it can manage the real complex task in a easier and more efficient way than other OS.

I'm also searching in maling lists, forums and google, let's see what we can get. By now what I have is a button in the KDE launching bar
Code:
"export LC_CTYPE=el_GR.UTF-8 && kedit"


So I have a text editor where i can write Hellenic with accents and later paste it in the others applications.

Geia sas
Saludos

P.S. When I type "Geia sas" in Hellenic and I submit the post, it becomes "???? ???", i wonder why.

--
Vaya sorpresa, no esperaba encontrarme a un helιnico que usa la misma distribuciσn GNU/Linux que yo y con el mismo problema de acentos con el teclado.
Back to top
View user's profile Send private message
Deathwing00
Moderator
Moderator


Joined: 13 Jun 2003
Posts: 4079
Location: Dresden, Germany

PostPosted: Thu Aug 26, 2004 5:07 pm    Post subject: Reply with quote

feliguelo wrote:
By now what I have is a button in the KDE launching bar
Code:
"export LC_CTYPE=el_GR.UTF-8 && kedit"


This one is indeed a good idea.

feliguelo wrote:
P.S. When I type "Geia sas" in Hellenic and I submit the post, it becomes "???? ???", i wonder why.


Check that you are not sending it in UTF and that your browser codepage is set properly.
Back to top
View user's profile Send private message
feliguelo
n00b
n00b


Joined: 13 Apr 2004
Posts: 8

PostPosted: Thu Aug 26, 2004 10:48 pm    Post subject: Reply with quote

Quote:
Check that you are not sending it in UTF and that your browser codepage is set properly.

Yes, I had to choose the proper codepage in the browser (cp 1253) when editing the text.

Ευχαριστώ
Γεια σας
Back to top
View user's profile Send private message
gakrivas
n00b
n00b


Joined: 17 May 2005
Posts: 3

PostPosted: Thu Jun 02, 2005 3:29 pm    Post subject: /etc/profile ignored; followed instructions for gr accent Reply with quote

Hi,

I can write in Greek, both in consoles and from X. I can't use the accent from X, though I can use the accent from a console.

I suspect that my /etc/profile is totally ignored. Maybe I need a command to be executed upon login?

Thanks. My /etc/profile:

# /etc/profile:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/profile,v 1.23 2003/04/29 21:23:18 azarah Exp $

if [ -e "/etc/profile.env" ]
then
. /etc/profile.env
fi

# 077 would be more secure, but 022 is generally quite realistic
umask 022

if [ `/usr/bin/whoami` = 'root' ]
then
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/usr/bin:${PATH}"
fi
unset ROOTPATH

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]
then
export INPUTRC="/etc/inputrc"
fi

# Extract the value of EDITOR
[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="`. /etc/conf.d/basic 2>/dev/null; echo $EDITOR`"
[ -z "$EDITOR" ] && EDITOR="/bin/nano"
export EDITOR

export XAUTHORITY="${HOME}/.Xauthority"
PATH=/usr/lib/ccache/bin:"${PATH}"
export LC_CTYPE=el_GR@euro.UTF-8
export LC_COLLATE=el_GR@euro.UTF-8
Back to top
View user's profile Send private message
Kosmas
Apprentice
Apprentice


Joined: 14 Sep 2006
Posts: 266
Location: Greece

PostPosted: Sat Sep 16, 2006 11:36 am    Post subject: Reply with quote

Quote:
Hi,

I can write in Greek, both in consoles and from X. I can't use the accent from X, though I can use the accent from a console.

I suspect that my /etc/profile is totally ignored. Maybe I need a command to be executed upon login?

I made a post last week about that.
If you have el_GR@euro you have a problem in KDE mostly with accenting greek letters
If you just change to el_GR all works ok
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Greek All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum