PDA

View Full Version : Add Arabic & Persian support to the terminal



zero-n
April 10th, 2010, 12:51 PM
Terminal by default don't support Arabic well so we need to do some modification to allow it to work properly:

1- Install the following packages:

sudo apt-get install libfribidi0 libfribidi-dev2- Download & install THIS (https://launchpad.net/%7Ebehnam/+archive/ppa/+build/574785/+files/bicon_0.2.0-1ubuntu0%7Eppa4_i386.deb) package.

3- Open /usr/share/applications/gnome-terminal.desktop by any editor you like:

gksudo gedit /usr/share/applications/gnome-terminal.desktop4- Add the following line to the end of file:

Terminal=true
Exec=/usr/bin/bicon.bin
5- If you have a terminal icon in desktop remove and make a new one.

6- That's all.

Now you can work well with Arabic & Persian in the terminal. You can create files, folders in both languages in a proper manner & you can can see file & folders names correctly.

Finally:
This also added Arabic & Persian support to xterm & PuTTY.

ejlal
April 12th, 2010, 10:55 PM
salam,

thank you zero-n, great job:)!

yasir.elsharif
April 25th, 2010, 09:40 AM
Thanks zero-n, This is magnificent, fabulous, 3ageeeb .... you are the one=D>=D>=D>

only missing the amd-64 bit
which is:
https://launchpad.net/~behnam/+archive/ppa/+build/574789/+files/bicon_0.2.0-1ubuntu0~ppa4_amd64.deb (https://launchpad.net/%7Ebehnam/+archive/ppa/+build/574789/+files/bicon_0.2.0-1ubuntu0%7Eppa4_amd64.deb)
this goes instead of step 2 where you download and install bicon package

zero-n
April 26th, 2010, 07:34 AM
thanks for adding the link of amd-64-bit package.

q8istud
October 17th, 2010, 08:30 AM
hello zero-n,

I'm followed your steps but still can't see any Arabic or Persian fonts in terminal.

is your solution worked with Ubuntu 10.10 ??

thanks

zero-n
October 18th, 2010, 06:23 PM
Hello q8istud (http://ubuntuforums.org/member.php?u=1011092),

I am using 10.04 LTS but i have 10.10 CD i will this guide there & give you a feed back

LOLSKAT0R
December 7th, 2010, 03:03 AM
hohooh! super thanks bro! I was just going to install mlterm (http://mlterm.sourceforge.net/) before I landed on your thread. Working like a charm!
Cheers!

koba101
December 22nd, 2010, 01:24 AM
will this support RTL and connect the characters? 'cause i tried that and it doesn't do it, or is there anything i'm missing

p.s. if it does...good work

GNULinuxUser
January 9th, 2011, 02:21 AM
I have followed your instructions and Arabic text worked fine until I noticed that my console started doing this

http://www.about-gnulinux.com/blog/wp-content/uploads/ArabConsoleBug.png

As you can notice, when the string grows longer of your input on the terminal it starts with a carriage return on the same line rather than prompting for your input on the next one!

Any idea of the cause? Any missing "new line" command here or there?
Thank you again.

zero-n
January 9th, 2011, 03:28 PM
Hi GNULinuxUser (http://ubuntuforums.org/member.php?u=1220587),

i've faced this problem before but honestly i didn't try to solve it.

i you find out a soultion share it with me ;)

GNULinuxUser
January 9th, 2011, 11:28 PM
Hi GNULinuxUser (http://ubuntuforums.org/member.php?u=1220587),

i've faced this problem before but honestly i didn't try to solve it.

i you find out a soultion share it with me ;)
I definitely will brief you with any new updates on the topic as soon as I thoroughly look into it when I get some time.
Thank you so much for your reply.

GNULinuxUser
January 11th, 2011, 05:02 AM
I am yet interested to know if you pursued using your command line with these new modifications?
Because I find it not convenient at all for my use!

Or did you simply uninstall the packages and it worked back again in its original setting ?

zero-n
January 11th, 2011, 10:34 AM
no i have done Ubuntu 10.10 fresh installation on that computer to try the new Ubuntu release.

tx99h4
March 15th, 2012, 02:13 PM
Thanks man!

(but if I type CTRL-ALT-T in gnome-> letters are separated, or CTRL-ALT-F1 and login it does not work --> squares appears!)

lancioni
May 16th, 2012, 07:06 AM
Thank you for your wonderful work!

I found a minor problem with a java application using jline as an input console. When you press a backspace (independently from which keyboard you are using, Arabic or otherwise) a division by zero error occurs:

Exception in thread "main" java.lang.ArithmeticException: / by zero
at jline.ConsoleReader.backspace(ConsoleReader.java:1 414)
at jline.ConsoleReader.backspace(ConsoleReader.java:1 436)
at jline.ConsoleReader.readLine(ConsoleReader.java:62 8)
at jline.ConsoleReader.readLine(ConsoleReader.java:45 7)termi
at opennlp.ccg.util.JLineReader.readLine(JLineReader. java:80)
at opennlp.ccg.TextCCG.main(TextCCG.java:174)

In normal terminal usages, this does not happen. Nor it happen with jline if you comment out the two lines added in the terminal configuration file in order to enable bicon support.

Thank you,

Giuliano

BenginM
May 30th, 2012, 08:08 PM
Salutation Akhy , Nice work and i salute you. :)

# but i must conform this did not work for me.

I use irssi on a screen session in gnome-termianl , the characters is set to UTF-8 i have tried severel fonst incloding GNU Unifont , makes no differance , still the Arabic letters are shown as left-aligned . left-to-right

# https://bugs.launchpad.net/ubuntu/+source/vte/+bug/263822

Salutation .

BenginM
June 1st, 2012, 11:30 PM
Salutation Akhy , Nice work and i salute you. :)

# but i must conform this did not work for me.

I use irssi on a screen session in gnome-termianl , the characters is set to UTF-8 i have tried severel fonst incloding GNU Unifont , makes no differance , still the Arabic letters are shown as left-aligned . left-to-right

# https://bugs.launchpad.net/ubuntu/+source/vte/+bug/263822

Salutation .

Works fine in Kconsole .