The first step that if you want to type Arabic in Ubuntu is you must have SCIM in your Ubuntu machine.
Scim by default is supported by Ubuntu, so after you installed your Ubuntu in your machine you’ll get Scim already installed. The next thing is you have to install the input languange.
1. To install it you can do the following things (i grabbed this from ichsan’s blog):
Install language for Japanese, Korean, Arabic and others.
apt-get install scim-anthy, scim-hangul, scim-tables-additional
2. Create an 644 permission file: /etc/X11/Xsession.d/75custom-scim_init which contains
3. Run scim -d
5. Restart X (Ctrl+Alt+Backspace)
Actually you just need scim-tables-additional if you want to type in arabic, but it is fine in case in the future you want to type japanese or korean character.