Zaher's Linux Tips


In this page you will find linux tips for:


Using Vim To write hebrew text:

This editor is based on "vi" and can be used with a graphical user interface. To configure this editor for use with hebrew download the cofiguration file ".vimrc". This configuration file sets the default font to a hebrew font
set guifont=-Hebrew-Bible-Medium-R-Normal--16-160-75-75-M-80-ISO8859-8
which can be changes of course. More importantly it sets the following
F6 botton sets Hebrew Righ To Left writing mode.

F5 botton sets English Left To Right writing mode.

Using "GVim" one can write hebrew text files for LaTex or any other purpose.



eLaTex with Hebrew:

LaTex can be used to produce high quality Hebrew documents. Most Linux distributions come with hebrew support in LaTex called heblatex. For a starter you can download one of the following examples:
To compile these examples download the "example.tgz" file then do the following:
tar -xvzf example.tgz
cd example
elatex example.tex

Note the the compilation command for Hebrew documents is "elatex" and not "latex". You can edit these documents using GVim editor. To produce a PostScript/PDF file use
For PostScript:  dvips example.dvi -o example.ps
For PDF:             dvipdf example.dvi

LyX - What You See Is What You Get LaTex Editor.

For those of you who are used to "what you see is what you get" LyX offers a great solution for writing LaTex documents easily and without the need of knowing anything about LaTex commands. LyX offers the possibility to Import/Export LaTex documents. The Exprot option work well, however the Import option does not work well with more advanced latex documents.


 

LyX supports also Right to Left writing, using Hebrew and Arabic LaTex capabilities. In order to impliment this in your account you will need to run LyX for the first time (if you haven't done that yet), then download the configuration file "lyxrc" which configures LyX for using appropriate Hebrew fonts, and implements the transition from Right to Left writing to Left to Right writing and vise-versa using the botton "F12".

The fonts needed for this configuration files can be downloaded here lyxfonts.tgz. Unpack these fonts in your fonts directory, e.g. "/usr/X11R6/lib/X11/fonts/", in which a subdir with the name "lyxfonts" will be produced with all the fonts in it. Add the new subdir to the fonts server configuration files:
  • To the file "/etc/X11/XftConfig" add the following line:
dir "/usr/X11R6/lib/X11/fonts/lyxfonts"
  • To the file "/etc/X11/fs/config" add to the "catalogue" section the subdir:
/usr/X11R6/lib/X11/fonts/lyxfonts
Now restart the font server using the command  "/etc/init.d/xfs restart". Try running LyX again and see if the "F12"  botton and the fonts work.

For documnets with hebrew you will have to open a new document, go to the "Layout" menu, choose "Documnet", go to "Language" tab, and then set "Language:" to Hebrew.

LaTex2HTML with Hebrew:

LaTex2HTML is a great package to convert LaTeX documents to HTML. This package works very well with english documents, even the most complicated ones. It is written in a way that makes it easy to add support of addtional LaTex packages such as the heblatex package.

In order to implement Hebrew support we have to understand first how to write Hebrew HTML documents. The main encodings used in Hebrew HTML are:
  • Visual in which the following line appears:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-8">
This encoding is an old one and does not need BiDirectional support in the browser, and work on all browsers if you have the proper fonts. Howevere, pages written in this encoding (such as Haaretz) have some artifacts due to missmach of fonts and resolution.
  • Logical in which the following line appears:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-8-i">
This encoding is the beast and most used, but need a browser that has BiDirectional support, such as Mozilla and Konqueror. This encoding is recomended for use since it prevents artifacts in the presentation of the web page due to the size of the fonts.
I wrote some partial and basic implementation of Hebrew LaTex for LaTex2HTML, this includes these two files:
  • hebtech.perl which should be copied to "$LATEX2HTML/styles/.", where $LATEX2HTML is the directory where LaTex2HTML is installed (try "/usr/lib/latex2html" or "/usr/share/latex2html/").
  • hebrew.pl which should be copied to "$LATEX2HTML/versions/.".
What these files do is simply produce an HTML document with logical incoding (iso-8859-8-i) and proper alignment of the lines (ALIGN="RIGHT") with the right direction of writing (DIR="Rtl" or DIR="Ltr"). Some heblatex specific commands are also implimented.

THIS IMPLIMINATION IS ONLY BASIC AND WORKS WITH VERY SIMPLE DOCUMENTS.


Koffice with Arabic and Hebrew:

Multilingual support of KOffice is available only when working with KDE3 which supports BiDirectional writing. To add the possibility in writing in a certain language do the following:
  • Open the "KDE Control Center"
  • Go to "Peripherals"
  • Go to "Keyboard"
  • Check "Enable keyboard layouts" botton.
  • Choose the languages you want to use from the "Additional layouts" list.
  • Press on "Apply" botton.
Now you can switch between the languages that you selected using the flags icon on the KDE pannel.

The KOffice includes the following applications.

KWord - A frame-based word processor capable of professional standard documents
KSpread - A powerful spreadsheet application.
KPresenter - A full-featured presentation program.
Kivio - A Visio®-style flowcharting application.
Kontour - A vector drawing application.
Krita - A raster-based image manipulation program like The GIMP or Adobe© Photoshop®.
Kugar - A tool for generating business quality reports.
KChart - An integrated graph and chart drawing tool.


An example of what one can do with KWord is the foloowing:


   

The KOffice seems very promissing with its ability of load/save other office formats and languages, though it is still not perfect.

WINE - Winblows Imulator:

One of the greatest thing ever made, not usefull to many people including me but still great. Recently the development of this project is so fast that I cannot even keep up. It is used to run M$ windows programs under linux. The nicest thing about it is that you do not need windows to be installed on a separate partition of your disk, you can copy an already installed system to some subdirectory in your computer, or just install windows applications using wine itself... simply wonderful.

Some examples of what it can do:

WinZip


Microcal Origin



Windows Media Player



Internet Explorere



Word of Office 2000 Pro




Hebrew fonts for Netscape  on a Linux:

To Install hebrew fonts for Netscape download these fonts .
tar -xvzf HebWeb.tgz
FontPath         "/usr/X11R6/lib/X11/fonts/HebWeb"
or if you are using a font server add the subdir "/usr/X11R6/lib/X11/fonts/HebWeb" to your font server configuration file "/etc/X11/fs/config"

Driver/Module for D-Link DFE-530TX ethernet card:



Enabling Rsh:

Using rsh as is root (not recomended, but some retarded computer center people use it to do backups). To enable the services 'rlogin', 'rexec' and 'rsh' you will need to edit the configuration files '/etc/xinetd.conf' and '/etc/inetd.conf'. However, newer systems use only '/etc/xinetd.conf' with additional files in '/etc/xinet.d/'. In this subdir you can edit the files '/etc/xinet.d/rlogin',  '/etc/xinet.d/rexec' and '/etc/xinet.d/rsh' to enable these services. Change the line
disable             = yes
to:      
disable = no
If you are using PAM you will have to reconfigure that too by editing the file '/etc/pam.d/rsh' to look like:
#%PAM-1.0
# For root login to succeed here with pam_securetty, "rsh" must be
# listed in /etc/securetty.
auth       sufficient   /lib/security/pam_rhosts_auth.so
auth       required     /lib/security/pam_nologin.so
auth       required     /lib/security/pam_securetty.so
auth       required     /lib/security/pam_env.so
account    required     /lib/security/pam_stack.so service=system-auth
session    required     /lib/security/pam_stack.so service=system-auth
and add 'rlogin', 'rexec' and 'rsh' to the file '/etc/securetty' to look like: 
#
# Mandrake-Security : if you remove this comment, remove the next line too.
tty1
# Mandrake-Security : if you remove this comment, remove the next line too.
tty2
# Mandrake-Security : if you remove this comment, remove the next line too.
tty3
# Mandrake-Security : if you remove this comment, remove the next line too.
tty4
# Mandrake-Security : if you remove this comment, remove the next line too.
tty5
# Mandrake-Security : if you remove this comment, remove the next line too.
tty6
# Mandrake-Security : if you remove this comment, remove the next line too.
rsh
# Mandrake-Security : if you remove this comment, remove the next line too.
rexec
# Mandrake-Security : if you remove this comment, remove the next line too.
rlogin
Then edit the files '~root/.rhosts' and '/etc/hosts.equiv' to give access to the remote hosts you want to rsh from. Restart the xined and inetd, or just reboot.

For some reason doing only this in Mandrake Linux is not enough, you will have to run "rsh" as root for the first time, to enable normal users to do it too.