Thursday, August 20, 2015

Linux terminal Arabic support for Gnome 3.16

Salam (or Hello :) ) everyone,
I've spent a couple of time on figuring out how to correctly display Arabic characters on the Gnome Terminal under Fedora 22 (Gnome 3.16).

At first, I have:

as you can see, the Arabic characters are disconnected (unbidden) to each other, which is wrong and ugly at the same time.

The solution
1) if you didn't installed freebidi, you can have it by typing:
sudo dnf install fribidi.x86_64

2) then type:
to enable the bidirectional characters display.

If you want to enable bicon all the time in the terminal, I mean, if you restart your terminal, you have to re-type bicon again to enable bidirectional display.

Warning: this caused my Gnome 3.16.2 gdm to freeze or failed to start after login!
So, all what you have to do is to edit the .bashrc file and add the script (taken from here) inside .bashrc file:
# hack to launch bicon if not launched
if ! [[ "$(ps -p $(ps -p $(echo $$) -o ppid=) -o comm=)" =~ 'bicon'* ]]; then

To accomplish this, type in the Terminal:
nano .bashrc

and then add the script above to enable bicon at the startup of the Terminal.

And that is it :)
Post a Comment